scripts/create_test_subset.py
def export_ped_file(  # pylint: disable=invalid-name
    project: str,
    replace_with_participant_external_ids: bool = False,
    replace_with_family_external_ids: bool = False,
) -> List[str]:
    """
    Generates a PED file for the project, returs PED file lines in a list
    """
    route = f'/api/v1/family/{project}/pedigree'
    opts = []
    if replace_with_participant_external_ids:
        opts.append('replace_with_participant_external_ids=true')
    if replace_with_family_external_ids:
        opts.append('replace_with_family_external_ids=true')
    if opts:
        route += '?' + '&'.join(opts)

    cmd = f"""\
        curl --location --request GET \
        'https://sample-metadata.populationgenomics.org.au{route}' \
        --header "Authorization: Bearer {_get_google_auth_token()}"
        """

    lines = subprocess.check_output(cmd, shell=True).decode().strip().split('\n')
    return lines

    Generates a PED file for the project, returs PED file lines in a list
    
Generates a PED file for the project, returs PED file lines in a list
Generates a PED file for the project returs PED file lines in a list
def export_ped_file(  
    project: str,
    replace_with_participant_external_ids: bool = False,
    replace_with_family_external_ids: bool = False,
) -> List[str]:
    route = f'/api/v1/family/{project}/pedigree'
    opts = []
    if replace_with_participant_external_ids:
        opts.append('replace_with_participant_external_ids=true')
    if replace_with_family_external_ids:
        opts.append('replace_with_family_external_ids=true')
    if opts:
        route += '?' + '&'.join(opts)
    cmd = f"""\
        curl --location --request GET \
        'https://sample-metadata.populationgenomics.org.au{route}' \
        --header "Authorization: Bearer {_get_google_auth_token()}"
        """
    lines = subprocess.check_output(cmd, shell=True).decode().strip().split('\n')
    return lines
def export_ped_file ( project : str , replace_with_participant_external_ids : bool = False , replace_with_family_external_ids : bool = False , ) -> List [ str ] : route = f'/api/v1/family/{project}/pedigree' opts = [ ] if replace_with_participant_external_ids : opts . append ( 'replace_with_participant_external_ids=true' ) if replace_with_family_external_ids : opts . append ( 'replace_with_family_external_ids=true' ) if opts : route += '?' + '&' . join ( opts ) cmd = f"""\
        curl --location --request GET \
        'https://sample-metadata.populationgenomics.org.au{route}' \
        --header "Authorization: Bearer {_get_google_auth_token()}"
        """ lines = subprocess . check_output ( cmd , shell = True ) . decode ( ) . strip ( ) . split ( '\n' ) return lines
Generates a PED file for the project, returs PED file lines in a list
Generates a PED file for the project returs PED file lines in a list
# pylint: disable=invalid-name """
    Generates a PED file for the project, returs PED file lines in a list
    """
project
str
replace_with_participant_external_ids
bool
replace_with_family_external_ids
bool