Gene database

From aipoch/medical-research-skills · View interactive version

Gene database is an AI agent skill from the GitHub repository aipoch/medical-research-skills. Query the NCBI Gene database via E-utilities and the NCBI Datasets API; use it when you need to search genes by symbol/ID and retrieve annotations (RefSeq, GO, location, phenotype) for single or batch gene lists.

How to use this skill

Skill file

Source: https://github.com/aipoch/medical-research-skills

When to Use

Key Features

Dependencies

Example Usage

The following examples assume the repository provides these scripts:

- scripts/query_gene.py

- scripts/fetch_gene_data.py

- scripts/batch_gene_lookup.py

1) Search by symbol/name (E-utilities / ESearch)

python scripts/query_gene.py --search "BRCA1" --organism "human"

Example advanced query strings:

python scripts/query_gene.py --search "insulin[gene name] AND human[organism]"
python scripts/query_gene.py --search "dystrophin[gene name] AND muscular dystrophy[disease]"
python scripts/query_gene.py --search "human[organism] AND 17q21[chromosome]"

2) Retrieve gene information by Gene ID

Using E-utilities (format-oriented retrieval):

python scripts/query_gene.py --id 672 --format json

Using NCBI Datasets API (consolidated gene payload):

python scripts/fetch_gene_data.py --gene-id 672

Or by symbol + taxon:

python scripts/fetch_gene_data.py --symbol BRCA1 --taxon human
python scripts/fetch_gene_data.py --symbol TP53 --taxon "Homo sapiens" --output json

3) Batch lookup for gene list annotation

From a file of symbols (organism required for symbol disambiguation):

python scripts/batch_gene_lookup.py --file gene_list.txt --organism human

From a comma-separated list of Gene IDs:

python scripts/batch_gene_lookup.py --ids 672,7157,5594 --output results.json

Implementation Details

API selection guidance

Query patterns (E-utilities)

Typical fielded query components include:

Rate limits and API keys

Obtain an API key from: https://www.ncbi.nlm.nih.gov/account/

Error handling recommendations

Output/data formats

Depending on endpoint/script options, gene data may be returned as:

Additional references

If present in the repository, consult:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.