Variant¶
Use variant commands for compact annotation, source-backed interpretation context, and optional predictive and population-genetics sections.
Accepted variant identifiers¶
BioMCP supports multiple input forms:
- rsID:
rs113488022 - HGVS genomic:
chr7:g.140453136A>T - gene-protein form:
BRAF V600E,BRAF p.Val600Glu
These exact formats are accepted by biomcp get variant and the exact-ID
helper commands.
Search variants¶
By gene and protein change:
biomcp search variant -g BRAF --hgvsp V600E --limit 5
biomcp search variant -g BRAF --hgvsp p.Val600Glu --limit 5
biomcp search variant BRAF p.Val600Glu --limit 5
By residue alias shorthand:
By protein shorthand when gene context is already supplied:
Standalone protein shorthand like R620W returns variant-specific recovery
guidance instead of falling back to gene or condition discovery.
By significance:
With population and score filters:
Get a variant record¶
biomcp get variant rs113488022
biomcp get variant "chr7:g.140453136A>T"
biomcp get variant "BRAF V600E"
biomcp get variant "BRAF p.Val600Glu"
The default output favors concise, clinically relevant context first.
When BioMCP can derive a compact literature-facing alias, variant search rows
and detail cards also show Legacy Name, and JSON output includes
legacy_name.
Shorthand such as PTPN22 620W or R620W is not treated as an exact variant
ID. Use biomcp search variant for those inputs.
Request variant sections¶
Prediction section:
ClinVar-focused section:
ClinVar JSON also exposes top_disease when condition aggregation is available,
reusing the highest-ranked ClinVar condition row already shown in the section.
Population section:
Population JSON exposes additive compact frequency fields:
allele_frequency_raw and allele_frequency_percent. Markdown keeps the raw
gnomAD AF line and appends the compact percent inline.
CIViC section:
GWAS section (trait associations from GWAS Catalog):
GWAS JSON exposes supporting_pmids as an ordered, deduplicated array when the
section loads successfully. null means either the GWAS section was not loaded
or GWAS Catalog was temporarily unavailable. In the unavailable case, JSON also
includes gwas_unavailable_reason with a source-specific message.
Predictions (aggregated prediction scores):
Conservation (GERP, phyloP):
COSMIC (somatic mutation data):
CGI (Cancer Genome Interpreter annotations):
cBioPortal (frequency data):
All supported sections:
Helper commands¶
biomcp variant trials "BRAF V600E" # search trials mentioning this mutation
biomcp variant articles "BRAF V600E" # search PubMed for this variant
biomcp variant oncokb "BRAF V600E" # OncoKB lookup (requires ONCOKB_TOKEN)
Search GWAS associations¶
By gene:
By trait:
Trait search uses GWAS Catalog trait endpoints first, then study-association fallback paths when needed.
Optional enrichment¶
Variant base output may include cBioPortal enrichment when available.
OncoKB is accessed explicitly via biomcp variant oncokb "<gene> <variant>" and requires ONCOKB_TOKEN.
Prediction requirements¶
Prediction sections may require ALPHAGENOME_API_KEY depending on source path.
Unsupported inputs are surfaced with explicit validation messages.
JSON mode¶
biomcp --json get variant "BRAF V600E"
biomcp --json get variant rs7903146 gwas
biomcp --json search gwas --trait "type 2 diabetes"
Practical tips¶
- Use
search variantfirst for shorthand or ambiguous inputs. - Start with the base card, then add source sections such as
clinvar,civic, orpopulationonly when needed. - Use
allwhen you need a one-shot export for review or downstream comparison.