scripts/export/genomes/genome_fetch.py
def export_gca_accessions(upid_gca):
    """
    Retrieves reference proteomes ids and their associated gca accessions
    as well as the taxonomic rank/domain (eukaryotes, bacteria etc)

    upid_gca: Uniprot's tab separated file (UPID_GCA.tsv)
    """

    # need to check if the path provided is a valid file
    upid_gca_fp = open(upid_gca, 'r')

    prot_gca_pairs = {}

    for prot in upid_gca_fp:
        prot = prot.strip().split('\t')
        if prot[1] != '':
            prot_gca_pairs[prot[0]] = prot[1]
        else:
            prot_gca_pairs[prot[0]] = -1

    upid_gca_fp.close()

    return prot_gca_pairs

    Retrieves reference proteomes ids and their associated gca accessions
    as well as the taxonomic rank/domain (eukaryotes, bacteria etc)

    upid_gca: Uniprot's tab separated file (UPID_GCA.tsv)
    
Retrieves reference proteomes ids and their associated gca accessions
as well as the taxonomic rank/domain (eukaryotes, bacteria etc)

Uniprot's tab separated file (UPID_GCA.tsv)
Retrieves reference proteomes ids and their associated gca accessions as well as the taxonomic rank / domain ( eukaryotes bacteria etc ) Uniprot ' s tab separated file ( UPID_GCA . tsv )
def export_gca_accessions(upid_gca):
    upid_gca_fp = open(upid_gca, 'r')
    prot_gca_pairs = {}
    for prot in upid_gca_fp:
        prot = prot.strip().split('\t')
        if prot[1] != '':
            prot_gca_pairs[prot[0]] = prot[1]
        else:
            prot_gca_pairs[prot[0]] = -1
    upid_gca_fp.close()
    return prot_gca_pairs
def export_gca_accessions ( upid_gca ) : upid_gca_fp = open ( upid_gca , 'r' ) prot_gca_pairs = { } for prot in upid_gca_fp : prot = prot . strip ( ) . split ( '\t' ) if prot [ 1 ] != '' : prot_gca_pairs [ prot [ 0 ] ] = prot [ 1 ] else : prot_gca_pairs [ prot [ 0 ] ] = - 1 upid_gca_fp . close ( ) return prot_gca_pairs
Retrieves reference proteomes ids and their associated gca accessions
as well as the taxonomic rank/domain (eukaryotes, bacteria etc)
Retrieves reference proteomes ids and their associated gca accessions as well as the taxonomic rank / domain ( eukaryotes bacteria etc )
"""
    Retrieves reference proteomes ids and their associated gca accessions
    as well as the taxonomic rank/domain (eukaryotes, bacteria etc)

    upid_gca: Uniprot's tab separated file (UPID_GCA.tsv)
    """ # need to check if the path provided is a valid file
upid_gca