scripts/parse_nagim.py
def transfer(
    tmp_dir,
    use_batch: bool,
    dry_run: bool,
):
    """
    Transfer data from the Terra workspaces to the GCP bucket. Must be run with
    a personal account, because the read permissions to Terra buckets match
    to the Terra user emails for whom the workspace is sharred, so Hail service
    acounts won't work here.
    """
    if not tmp_dir:
        tmp_dir = tempfile.gettempdir()

    if use_batch:
        hbatch = setup_batch(
            title='Transferring NAGIM data',
            keep_scratch=False,
            tmp_bucket=f'cpg-{NAGIM_PROJ_ID}-{NAMESPACE}-tmp',
            analysis_project_name=NAGIM_PROJ_ID,
        )
    else:
        hbatch = None

    for source in SOURCES_TO_PROCESS:
        SOURCES[source].transfer(hbatch)

    if use_batch:
        hbatch.run(wait=True, dry_run=dry_run)
        if dry_run:
            return

    samples = _parse_sample_project_map(SAMPLE_TO_PROJECT_TSV_PATH)

    # Find GVCFs, CRAMs and other files after transferring, and checks that all
    # of them have corresponding tbi/crai/md5.
    _find_upload_files(
        samples,
        tmp_dir,
        overwrite=True,  # Force finding files
    )

    Transfer data from the Terra workspaces to the GCP bucket. Must be run with
    a personal account, because the read permissions to Terra buckets match
    to the Terra user emails for whom the workspace is sharred, so Hail service
    acounts won't work here.
    
Transfer data from the Terra workspaces to the GCP bucket. Must be run with
a personal account, because the read permissions to Terra buckets match
to the Terra user emails for whom the workspace is sharred, so Hail service
acounts won't work here.
Transfer data from the Terra workspaces to the GCP bucket . Must be run with a personal account because the read permissions to Terra buckets match to the Terra user emails for whom the workspace is sharred so Hail service acounts won ' t work here .
def transfer(
    tmp_dir,
    use_batch: bool,
    dry_run: bool,
):
    if not tmp_dir:
        tmp_dir = tempfile.gettempdir()
    if use_batch:
        hbatch = setup_batch(
            title='Transferring NAGIM data',
            keep_scratch=False,
            tmp_bucket=f'cpg-{NAGIM_PROJ_ID}-{NAMESPACE}-tmp',
            analysis_project_name=NAGIM_PROJ_ID,
        )
    else:
        hbatch = None
    for source in SOURCES_TO_PROCESS:
        SOURCES[source].transfer(hbatch)
    if use_batch:
        hbatch.run(wait=True, dry_run=dry_run)
        if dry_run:
            return
    samples = _parse_sample_project_map(SAMPLE_TO_PROJECT_TSV_PATH)
    _find_upload_files(
        samples,
        tmp_dir,
        overwrite=True,  
    )
def transfer ( tmp_dir , use_batch : bool , dry_run : bool , ) : if not tmp_dir : tmp_dir = tempfile . gettempdir ( ) if use_batch : hbatch = setup_batch ( title = 'Transferring NAGIM data' , keep_scratch = False , tmp_bucket = f'cpg-{NAGIM_PROJ_ID}-{NAMESPACE}-tmp' , analysis_project_name = NAGIM_PROJ_ID , ) else : hbatch = None for source in SOURCES_TO_PROCESS : SOURCES [ source ] . transfer ( hbatch ) if use_batch : hbatch . run ( wait = True , dry_run = dry_run ) if dry_run : return samples = _parse_sample_project_map ( SAMPLE_TO_PROJECT_TSV_PATH ) _find_upload_files ( samples , tmp_dir , overwrite = True , )
Transfer data from the Terra workspaces to the GCP bucket.
Transfer data from the Terra workspaces to the GCP bucket .
"""
    Transfer data from the Terra workspaces to the GCP bucket. Must be run with
    a personal account, because the read permissions to Terra buckets match
    to the Terra user emails for whom the workspace is sharred, so Hail service
    acounts won't work here.
    """ # Find GVCFs, CRAMs and other files after transferring, and checks that all # of them have corresponding tbi/crai/md5. # Force finding files
tmp_dir
use_batch
bool
dry_run
bool