get_ontology_stats
Retrieve statistical data on Gene Ontology terms, including counts and recent updates, for specific ontologies or overall analysis.
Instructions
Get statistics about GO ontologies (term counts, recent updates)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ontology | No | Specific ontology or "all" for overall stats |
Implementation Reference
- src/index.ts:558-615 (handler)The handler function that executes the get_ontology_stats tool, returning hardcoded statistics about GO ontologies including term counts, root terms, and evidence codes.private async handleGetOntologyStats(args: any) { try { const stats = { ontology: args.ontology || 'all', last_updated: new Date().toISOString().split('T')[0], note: 'Statistics are approximate and may vary based on data access methods', sources: { quickgo: 'https://www.ebi.ac.uk/QuickGO/', go_consortium: 'https://geneontology.org/', amigo: 'http://amigo.geneontology.org/' }, approximate_counts: { molecular_function: { description: 'Molecular activities of gene products', estimated_terms: '~11,000', root_term: 'GO:0003674' }, biological_process: { description: 'Larger processes accomplished by multiple molecular activities', estimated_terms: '~30,000', root_term: 'GO:0008150' }, cellular_component: { description: 'Locations relative to cellular structures', estimated_terms: '~4,000', root_term: 'GO:0005575' } }, evidence_codes: { experimental: ['EXP', 'IDA', 'IPI', 'IMP', 'IGI', 'IEP'], high_throughput: ['HTP', 'HDA', 'HMP', 'HGI', 'HEP'], computational: ['IBA', 'IBD', 'IKR', 'IRD', 'ISS', 'ISO', 'ISA', 'ISM', 'IGC', 'RCA'], author_statement: ['TAS', 'NAS'], curator_statement: ['IC', 'ND'], electronic: ['IEA'] } }; return { content: [ { type: 'text', text: JSON.stringify(stats, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error getting ontology stats: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
- src/index.ts:325-335 (schema)Input schema definition for the get_ontology_stats tool, specifying optional 'ontology' parameter.{ name: 'get_ontology_stats', description: 'Get statistics about GO ontologies (term counts, recent updates)', inputSchema: { type: 'object', properties: { ontology: { type: 'string', description: 'Specific ontology or "all" for overall stats' }, }, required: [], }, },
- src/index.ts:349-350 (registration)Registration in the tool request handler switch statement that dispatches to the handleGetOntologyStats method.case 'get_ontology_stats': return this.handleGetOntologyStats(args);