Get GO terms for list of NCBI genes from Gene Ontology API using Python
1
0
Entering edit mode
2.7 years ago

I'm trying to get GO terms for a list of NCBI/Entrez genes by querying the Gene Ontology API from Python. I've managed to do this for single genes, like this:

gene_id = 1493
r = requests.get("http://api.geneontology.org/api/bioentity/gene/NCBIGene:" + str(gene_id) + '/function',verify = False)

I could of course loop over my gene IDs one by one, but is there a way to query an entire gene set at once? The GO API documentation (http://api.geneontology.org/api) has some query examples for bioentity sets, but they don't seem to fit my use case.

python gene-ontology • 803 views
ADD COMMENT
2
Entering edit mode
2.6 years ago
Shred ★ 1.6k

It is not possible, as the request is executed accepting only a string as a value. Visiting their github profile, it appears somehow as a scheduled enhancement https://github.com/geneontology/biolink-api/issues/13

ADD COMMENT

Login before adding your answer.

Traffic: 2106 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6