Skills › Scientific Agent Skills › database-lookup › gene-ontology.md
gene-ontology.md
147 lines · skills/database-lookup/references/gene-ontology.md at 5f2bc03
Gene Ontology (GO) API Reference
Raw lines 1 to 23## Base URLs
4- **QuickGO (EBI, recommended)**: `https://www.ebi.ac.uk/QuickGO/services` — most reliable endpoint
5- **GO API**: `https://api.geneontology.org/api` — current OpenAPI schema: `https://api.geneontology.org/openapi.json`
6- **AmiGO / GOlr (Solr-based)**: `https://golr.geneontology.org/solr`
Base URLs
- QuickGO (EBI, recommended):
https://www.ebi.ac.uk/QuickGO/services— most reliable endpoint - GO API:
https://api.geneontology.org/api— current OpenAPI schema:https://api.geneontology.org/openapi.json - AmiGO / GOlr (Solr-based):
https://golr.geneontology.org/solr
GO API (api.geneontology.org)
Raw lines 16 to 1718### 1. GO Term Lookup
19```
20GET https://api.geneontology.org/api/ontology/term/{go_id}
21```
22Example:
23```
24GET https://api.geneontology.org/api/ontology/term/GO%3A0008150
25```
26Returns JSON with term name, definition, namespace (biological_process / molecular_function / cellular_component), synonyms.
1. GO Term Lookup
GET https://api.geneontology.org/api/ontology/term/{go_id}Example:
GET https://api.geneontology.org/api/ontology/term/GO%3A0008150Returns JSON with term name, definition, namespace (biological_process / molecular_function / cellular_component), synonyms.
Raw lines 18 to 2728### 2. Gene/Protein Annotations (Bioentity)
29```
30GET https://api.geneontology.org/api/bioentity/gene/{gene_id}/function
31```
32Example — GO annotations for a UniProt protein:
33```
34GET https://api.geneontology.org/api/bioentity/gene/UniProtKB%3AP04637/function
35```
36Returns GO annotations with evidence codes, qualifiers, references.
2. Gene/Protein Annotations (Bioentity)
GET https://api.geneontology.org/api/bioentity/gene/{gene_id}/functionExample — GO annotations for a UniProt protein:
GET https://api.geneontology.org/api/bioentity/gene/UniProtKB%3AP04637/functionReturns GO annotations with evidence codes, qualifiers, references.
Raw lines 28 to 3738### 3. Genes Annotated to a GO Term
39```
40GET https://api.geneontology.org/api/bioentity/function/{go_id}/genes
41```
42Example:
43```
44GET https://api.geneontology.org/api/bioentity/function/GO%3A0006915/genes?rows=20
45```
46Returns genes/proteins annotated with that GO term.
3. Genes Annotated to a GO Term
GET https://api.geneontology.org/api/bioentity/function/{go_id}/genesExample:
GET https://api.geneontology.org/api/bioentity/function/GO%3A0006915/genes?rows=20Returns genes/proteins annotated with that GO term.
Raw lines 38 to 4748### 4. Search Entities
49```
50GET https://api.geneontology.org/api/search/entity/autocomplete/{query}
51```
52Example:
53```
54GET https://api.geneontology.org/api/search/entity/autocomplete/apoptosis
55```
4. Search Entities
GET https://api.geneontology.org/api/search/entity/autocomplete/{query}Example:
GET https://api.geneontology.org/api/search/entity/autocomplete/apoptosisRaw lines 48 to 5657### 5. Ontology Ancestors / Descendants
58```
59GET https://api.geneontology.org/api/ontology/term/{go_id}/graph
60```
62---
5. Ontology Ancestors / Descendants
GET https://api.geneontology.org/api/ontology/term/{go_id}/graphRaw lines 57 to 63
QuickGO API (EBI — recommended for robust annotation queries)
Raw lines 64 to 6566### 1. GO Term Details
67```
68GET https://www.ebi.ac.uk/QuickGO/services/ontology/go/terms/{go_ids}
69```
70Example:
71```
72GET https://www.ebi.ac.uk/QuickGO/services/ontology/go/terms/GO:0008150
73```
74Accepts comma-separated IDs (up to 25).
1. GO Term Details
GET https://www.ebi.ac.uk/QuickGO/services/ontology/go/terms/{go_ids}Example:
GET https://www.ebi.ac.uk/QuickGO/services/ontology/go/terms/GO:0008150Accepts comma-separated IDs (up to 25).
Raw lines 66 to 7576### 2. Search Annotations
77```
78GET https://www.ebi.ac.uk/QuickGO/services/annotation/search?geneProductId={uniprot_id}
79```
80Example — annotations for TP53:
81```
82GET https://www.ebi.ac.uk/QuickGO/services/annotation/search?geneProductId=P04637&limit=25
83```
2. Search Annotations
GET https://www.ebi.ac.uk/QuickGO/services/annotation/search?geneProductId={uniprot_id}Example — annotations for TP53:
GET https://www.ebi.ac.uk/QuickGO/services/annotation/search?geneProductId=P04637&limit=25Raw lines 76 to 8485### 3. Annotations by GO Term
86```
87GET https://www.ebi.ac.uk/QuickGO/services/annotation/search?goId=GO:0006915&taxonId=9606&limit=25
88```
3. Annotations by GO Term
GET https://www.ebi.ac.uk/QuickGO/services/annotation/search?goId=GO:0006915&taxonId=9606&limit=25Raw lines 85 to 8990### 4. Filter Annotations by Evidence
91```
92GET https://www.ebi.ac.uk/QuickGO/services/annotation/search?geneProductId=P04637&goUsage=descendants&evidenceCode=ECO:0000269&limit=25
93```
4. Filter Annotations by Evidence
GET https://www.ebi.ac.uk/QuickGO/services/annotation/search?geneProductId=P04637&goUsage=descendants&evidenceCode=ECO:0000269&limit=25Raw lines 90 to 9495### 5. GO Term Children
96```
97GET https://www.ebi.ac.uk/QuickGO/services/ontology/go/terms/GO:0008150/children
98```
5. GO Term Children
GET https://www.ebi.ac.uk/QuickGO/services/ontology/go/terms/GO:0008150/childrenRaw lines 95 to 99100### 6. GO Term Ancestors (Chart)
101```
102GET https://www.ebi.ac.uk/QuickGO/services/ontology/go/terms/GO:0006915/ancestors?relations=is_a,part_of
103```
6. GO Term Ancestors (Chart)
GET https://www.ebi.ac.uk/QuickGO/services/ontology/go/terms/GO:0006915/ancestors?relations=is_a,part_ofRaw lines 100 to 104105### 7. Search GO Terms by Name
106```
107GET https://www.ebi.ac.uk/QuickGO/services/ontology/go/search?query=apoptosis&limit=10
108```
7. Search GO Terms by Name
GET https://www.ebi.ac.uk/QuickGO/services/ontology/go/search?query=apoptosis&limit=10Raw lines 105 to 109110## QuickGO Annotation Search Parameters
111| Parameter | Description |
112|-----------|-------------|
113| `geneProductId` | UniProt accession (e.g., P04637) |
114| `goId` | GO term (e.g., GO:0006915) |
115| `goUsage` | `exact` or `descendants` (include child terms) |
116| `taxonId` | NCBI taxonomy ID (9606 = human) |
117| `evidenceCode` | ECO code (e.g., ECO:0000269 = experimental) |
118| `aspect` | `biological_process`, `molecular_function`, `cellular_component` |
119| `limit` | Results per page (max 200) |
120| `page` | Page number (1-based) |
QuickGO Annotation Search Parameters
| Parameter | Description |
|---|---|
geneProductId | UniProt accession (e.g., P04637) |
goId | GO term (e.g., GO:0006915) |
goUsage | exact or descendants (include child terms) |
taxonId | NCBI taxonomy ID (9606 = human) |
evidenceCode | ECO code (e.g., ECO:0000269 = experimental) |
aspect | biological_process, molecular_function, cellular_component |
limit | Results per page (max 200) |
page | Page number (1-based) |
122## QuickGO Response Format
123```json
124{
125 "numberOfHits": 1234,
126 "results": [
127 {
128 "geneProductId": "P04637",
129 "symbol": "TP53",
130 "goId": "GO:0006915",
131 "goName": "apoptotic process",
132 "evidenceCode": "ECO:0000269",
133 "goAspect": "biological_process",
134 "taxonId": 9606,
135 "reference": "PMID:12345678",
136 "assignedBy": "UniProt"
137 }
138 ]
139}
140```
QuickGO Response Format
{
"numberOfHits": 1234,
"results": [
{
"geneProductId": "P04637",
"symbol": "TP53",
"goId": "GO:0006915",
"goName": "apoptotic process",
"evidenceCode": "ECO:0000269",
"goAspect": "biological_process",
"taxonId": 9606,
"reference": "PMID:12345678",
"assignedBy": "UniProt"
}
]
}Raw lines 122 to 141142## Notes
143- QuickGO (EBI) is generally more robust and better documented for annotation queries.
144- GO API pagination uses `start`/`rows` on supported bioentity routes. Inspect the current OpenAPI schema for per-route parameters; the autocomplete route replaces the former general entity-search route.
145- URL-encode GO IDs when constructing paths (e.g., `GO%3A0008150` for `GO:0008150`).
146- Three GO namespaces: biological_process (BP), molecular_function (MF), cellular_component (CC).
147- Evidence codes: IDA (direct assay), IMP (mutant phenotype), IGI (genetic interaction), IEA (electronic annotation), etc.
Notes
- QuickGO (EBI) is generally more robust and better documented for annotation queries.
- GO API pagination uses
start/rowson supported bioentity routes. Inspect the current OpenAPI schema for per-route parameters; the autocomplete route replaces the former general entity-search route. - URL-encode GO IDs when constructing paths (e.g.,
GO%3A0008150forGO:0008150). - Three GO namespaces: biological_process (BP), molecular_function (MF), cellular_component (CC).
- Evidence codes: IDA (direct assay), IMP (mutant phenotype), IGI (genetic interaction), IEA (electronic annotation), etc.