scripts/export/genomes/genome_fetch.py
def extract_genome_acc(prot_rdf):
    """
    Extracts and returns the assembly accession from the proteome rdf
    which provided as input. Returns -1 if not available

    prot_rdf: A Uniprot's proteome rdf url or file path
    """
    g = Graph()

    response = requests.get(prot_rdf).status_code

    if response == httplib.OK:
        g.load(prot_rdf)

        for s, p, o in g:
            if string.find(o, "GCA") != -1:
                return os.path.split(o)[1]

    return -1

    Extracts and returns the assembly accession from the proteome rdf
    which provided as input. Returns -1 if not available

    prot_rdf: A Uniprot's proteome rdf url or file path
    
Extracts and returns the assembly accession from the proteome rdf
which provided as input. Returns -1 if not available

A Uniprot's proteome rdf url or file path
Extracts and returns the assembly accession from the proteome rdf which provided as input . Returns - 1 if not available A Uniprot ' s proteome rdf url or file path
def extract_genome_acc(prot_rdf):
    g = Graph()
    response = requests.get(prot_rdf).status_code
    if response == httplib.OK:
        g.load(prot_rdf)
        for s, p, o in g:
            if string.find(o, "GCA") != -1:
                return os.path.split(o)[1]
    return -1
def extract_genome_acc ( prot_rdf ) : g = Graph ( ) response = requests . get ( prot_rdf ) . status_code if response == httplib . OK : g . load ( prot_rdf ) for s , p , o in g : if string . find ( o , "GCA" ) != - 1 : return os . path . split ( o ) [ 1 ] return - 1
Extracts and returns the assembly accession from the proteome rdf
which provided as input.
Extracts and returns the assembly accession from the proteome rdf which provided as input .
"""
    Extracts and returns the assembly accession from the proteome rdf
    which provided as input. Returns -1 if not available

    prot_rdf: A Uniprot's proteome rdf url or file path
    """
prot_rdf