| biothings_query_genesA | Search genes via Lucene query, returning gene details and query metadata. **IMPORTANT:** This endpoint requires structured queries using specific field names.
Simple natural language queries like "CDK2 gene" or "human kinase" will **NOT** work.
You **MUST** specify the field you are querying, e.g., `symbol:CDK2`, `name:"cyclin-dependent kinase 2"`, `taxid:9606`.
Use this tool when you need to *search* for genes based on criteria, not when you already know the specific gene ID.
If you know the exact Entrez or Ensembl ID, use the `get_gene` tool instead for faster retrieval.
**Supported Query Features (based on Lucene syntax):**
1. Simple Term Queries: `q=cdk2` (Searches across default fields)
2. Fielded Queries: `q=symbol:CDK2`, `q=name:"cyclin-dependent kinase 2"`
3. Range Queries: `q=taxid:[9606 TO 10090]`
4. Boolean Queries: `q=symbol:CDK2 AND taxid:9606`
5. Wildcard Queries: `q=symbol:CDK*`
Returns gene details including symbol, name, taxid, and entrezgene.
|
| biothings_query_many_genesA | Batch query genes by multiple terms, returning a list of gene details. Perform multiple gene searches in a single request using a comma-separated list of query terms.
Unlike `query_genes`, the `query_list` parameter takes multiple **terms** (like gene IDs, symbols, names)
rather than full query strings. The `scopes` parameter defines which fields these terms should be searched against.
**Endpoint Usage:**
- Query multiple symbols: `query_list=CDK2,BRCA1` with `scopes=symbol`
- Query multiple Entrez IDs: `query_list=1017,672` with `scopes=entrezgene`
- Query mixed IDs/symbols: `query_list=CDK2,672` with `scopes=symbol,entrezgene`
|
| biothings_get_geneA | Fetch a specific gene by Entrez or Ensembl ID. Retrieves detailed information for a **single, specific gene** using its exact known identifier.
**This is the preferred tool over `query_genes` for fetching a specific gene when you already know
its standard ID (Entrez or Ensembl) and don't need complex search filters.**
**Supported Identifiers:**
- Entrez Gene ID: e.g., `1017`
- Ensembl Gene ID: e.g., `ENSG00000123374`
|
| biothings_get_genesA | Fetch multiple genes by a comma-separated list of Entrez or Ensembl IDs. Retrieves detailed information for **multiple specific genes** in a single request using their exact known identifiers.
**This is the preferred tool over `query_many_genes` for fetching multiple specific genes when you already know
their standard IDs (Entrez, Ensembl) and don't need complex search filters.**
**Input Format:** Accepts a comma-separated list of gene IDs (Entrez or Ensembl).
**Example:** `gene_ids=1017,1018` or `gene_ids=ENSG00000123374,ENSG00000134057`
|
| biothings_get_gene_metadataA | Retrieve MyGene.info database metadata including stats and fields. Retrieve metadata about the underlying MyGene.info gene annotation database, **NOT** information about specific genes.
**Use this tool ONLY to understand the database itself** (e.g., to discover available fields, check data versions,
or get overall statistics). It **CANNOT** be used to find or retrieve data for any particular gene.
**Returned Information:**
- `stats`: Database statistics (e.g., total number of genes)
- `fields`: Available gene annotation fields and their data types
- `index`: Information about the backend data index
- `version`: Data version information
|
| biothings_query_variantsA | Search variants via Lucene query (e.g., rsID, gene name), returning variant details and query metadata. Search for variants using a query string with various filtering options, leveraging the MyVariant.info API.
**Use this tool for *searching* variants based on criteria.**
If you already know the exact variant ID (HGVS, rsID), use the `get_variant` tool for faster direct retrieval.
**Supported Query Features (Lucene syntax):**
1. Simple Queries: `q=rs58991260` (Find by rsID)
2. Fielded Queries: `q=dbsnp.vartype:snp`, `q=dbnsfp.polyphen2.hdiv.pred:(D P)`
3. Range Queries: `q=dbnsfp.polyphen2.hdiv.score:>0.99`
4. Wildcard Queries: `q=dbnsfp.genename:CDK*`
5. Boolean Queries: `q=_exists_:dbsnp AND dbsnp.vartype:snp`
6. Genomic Interval Queries: `q=chr1:69000-70000`
|
| biothings_query_many_variantsA | Batch query variants by multiple identifiers (e.g., rsIDs, HGVS IDs). Perform multiple variant queries in a single request using a comma-separated list of variant identifiers.
This tool takes multiple **terms** (like rsIDs, HGVS IDs) in `query_list` and searches for them within the specified `scopes`.
**Endpoint Usage:**
- Query multiple rsIDs: `query_list=rs58991260,rs2500` with `scopes=dbsnp.rsid`
- Query multiple HGVS IDs: `query_list=chr7:g.140453134T>C,chr1:g.69511A>G`
- Query mixed IDs: `query_list=rs58991260,chr1:g.69511A>G` with `scopes=dbsnp.rsid,_id`
|
| biothings_get_variantA | Fetch a specific variant by HGVS or rsID. Retrieves detailed annotation data for a **single, specific variant** using its identifier.
**This is the preferred tool over `query_variants` for fetching a specific variant when you already know
its standard ID (HGVS or rsID) and don't need complex search filters.**
**Supported Identifiers:**
- HGVS ID (e.g., `chr7:g.140453134T>C`). *Note: MyVariant.info primarily uses hg19-based HGVS IDs.*
- dbSNP rsID (e.g., `rs58991260`)
|
| biothings_get_variantsA | Fetch multiple variants by a comma-separated list of HGVS or rsIDs. Retrieves annotation data for **multiple specific variants** in a single request using their identifiers.
**This is the preferred tool over `query_many_variants` for fetching multiple specific variants when you already know
their standard IDs (HGVS or rsID).**
**Input Format:** Accepts a comma-separated list of variant IDs (HGVS or dbSNP rsIDs).
**Examples:** `variant_ids=chr7:g.140453134T>C,chr1:g.69511A>G` or `variant_ids=rs58991260,rs2500`
|
| biothings_query_chemsC | Search chemical compounds via Lucene query (e.g., name, formula), returning compound details and query metadata. Search for chemical compounds using a query string with various filtering options.
**Supported Query Features:**
1. Simple Queries: "C6H12O6" - Find compounds with molecular formula, "glucose" - Find compounds with name
2. Fielded Queries: "pubchem.molecular_formula:C6H12O6", "pubchem.molecular_weight:[100 TO 200]"
3. Range Queries: "pubchem.xlogp:>2", "pubchem.topological_polar_surface_area:[50 TO 100]"
4. Boolean Queries: "pubchem.hydrogen_bond_donor_count:>2 AND pubchem.hydrogen_bond_acceptor_count:>4"
Returns compound details including PubChem data like formula, weight, and XLogP.
|
| biothings_query_many_chemsB | Batch query chemical compounds by multiple terms (e.g., names, InChIKeys). Perform multiple chemical queries in a single request.
**Supported Usage:**
1. Multiple Query Types: ["C6H12O6", "C12H22O11"] (formulas), ["glucose", "sucrose"] (names)
2. Field Scoping: Search in specific fields using scopes parameter
3. Result Filtering: Return specific fields using fields parameter
|
| biothings_get_chemB | Fetch a specific chemical compound by ID (e.g., InChIKey, PubChem CID). Retrieves detailed information about a specific chemical compound using its identifier.
**Supported ID formats:**
- InChIKey: "KTUFNOKKBVMGRW-UHFFFAOYSA-N" (Glucose)
- PubChem CID: "5793" (Glucose)
- SMILES: "C([C@@H]1[C@H]([C@@H]([C@H]([C@H](O1)O)O)O)O"
Returns comprehensive chemical information including structural properties, physical properties,
chemical properties, stereochemistry information, and chemical identifiers.
|
| biothings_get_chemsA | Fetch multiple chemical compounds by a comma-separated list of IDs. Retrieves information for multiple chemical compounds in a single request.
**Input Format:** Accepts comma-separated list of chemical IDs in various formats:
- InChIKeys: "KTUFNOKKBVMGRW-UHFFFAOYSA-N,XEFQLINVKFYRCS-UHFFFAOYSA-N"
- PubChem CIDs: "5793,5281"
- Mixed formats: "KTUFNOKKBVMGRW-UHFFFAOYSA-N,5281"
|
| biothings_get_taxonA | Fetch a specific taxon by NCBI ID or scientific name. Retrieves detailed information about a specific taxon using its identifier.
**Supported Identifiers:**
- NCBI ID: 9606 (Homo sapiens)
- Scientific name: "Homo sapiens"
Returns comprehensive taxon information including basic information (ID, scientific name, common name),
taxonomic classification (rank, parent taxon), lineage information, alternative names and authorities,
and gene data availability.
|
| biothings_get_taxonsA | Fetch multiple taxa by a comma-separated list of NCBI IDs or scientific names. Retrieves information for multiple taxa in a single request.
**Input Format:** Accepts comma-separated list of taxon IDs (either NCBI IDs or scientific names).
**Examples:**
- Multiple NCBI IDs: "9606,10090" (Homo sapiens and Mus musculus)
- Multiple scientific names: "Homo sapiens,Mus musculus"
- Mixed IDs: "9606,Mus musculus" (Homo sapiens by NCBI ID and Mus musculus by name)
|
| biothings_query_taxonsB | Search taxa via Lucene query (e.g., scientific name, rank), returning taxon details and query metadata. Search for taxa using a query string with various filtering options.
**Supported Query Features:**
1. Simple Queries: "scientific_name:Homo sapiens", "common_name:human"
2. Fielded Queries: "rank:species", "parent_taxid:9606", "has_gene:true"
3. Range Queries: "taxid:[9606 TO 10090]", "lineage:>9606"
4. Boolean Queries: "rank:species AND has_gene:true", "scientific_name:Homo* AND NOT rank:genus"
5. Wildcard Queries: "scientific_name:Homo*", "common_name:*mouse*"
|
| biothings_query_many_taxonsA | Batch query taxa by multiple terms (e.g., scientific names, common names). Perform multiple taxon queries in a single request.
**Supported Usage:**
1. Multiple Query Types: ["Homo sapiens", "Mus musculus"] (scientific names), ["human", "mouse"] (common names)
2. Field Scoping: Search in specific fields using scopes parameter: ["scientific_name", "common_name"]
3. Result Filtering: Return specific fields using fields parameter: ["scientific_name", "common_name", "rank"]
|
| biothings_download_entrez_dataA | Download data from NCBI Entrez databases using Bio.Entrez. Downloads data records from specified NCBI Entrez databases. This tool is designed to be called
by automated agents (like LLMs) or other services.
**Critical Configuration:**
The server hosting this API *must* have the `ENTREZ_EMAIL` environment variable set
to a valid email address. NCBI requires this for Entrez queries to monitor usage
and prevent abuse. Without it, NCBI may block requests.
**Parameters:**
- `ids` (List[str], required): A list of unique identifiers for the records to fetch
from the specified Entrez database. Example: `["NM_000546.6", "AY123456.1"]`
- `db` (DB_LITERAL, required): The target NCBI Entrez database.
Common choices for sequences: 'nucleotide', 'protein'.
Other examples: 'gene', 'pubmed', 'taxonomy'.
Ensure the `ids` provided are appropriate for the selected `db`.
- `reftype` (Literal["fasta", "gb"], required): The desired format for the
downloaded data.
- "fasta": Returns data in FASTA format.
- "gb": Returns data in GenBank format.
Ensure the chosen `reftype` is compatible with the selected `db`.
**Returns:**
On success: Returns the downloaded data as a single raw string with the
data fetched from Entrez in the specified `reftype`.
**Example Usage:**
To fetch the FASTA sequence for human TP53 mRNA (NM_000546.6):
```
download_entrez_data(
ids=["NM_000546.6"],
db="nucleotide",
reftype="fasta"
)
```
|
| biothings_download_entrez_data_localA | Download data from NCBI Entrez databases and save to local file. Same as download_entrez_data but saves the result to a local file instead of returning the content.
This is useful for large downloads or when you want to persist the data.
**Parameters:**
- `ids` (List[str], required): A list of unique identifiers for the records to fetch
- `db` (DB_LITERAL, required): The target NCBI Entrez database
- `reftype` (Literal["fasta", "gb"], required): The desired format for the downloaded data
- `output_path` (Optional[str]): Custom output path. If None, generates unique filename
**Returns:**
LocalFileResult containing:
- `path`: Path to the saved file
- `format`: File format used
- `success`: Whether the operation succeeded
- `error`: Error message if failed
**Example Usage:**
```
download_entrez_data_local(
ids=["NM_000546.6"],
db="nucleotide",
reftype="fasta",
output_path="tp53_sequence.fasta"
)
```
|