bio-clinical-databases-myvariant-queries
Query myvariant.info API for aggregated variant annotations from multiple databases (ClinVar, gnomAD, dbSNP, COSMIC, etc.) in a single request. Use when annotating variants with clinical and population data from multiple sources simultaneously.
Best use case
bio-clinical-databases-myvariant-queries is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Query myvariant.info API for aggregated variant annotations from multiple databases (ClinVar, gnomAD, dbSNP, COSMIC, etc.) in a single request. Use when annotating variants with clinical and population data from multiple sources simultaneously.
Teams using bio-clinical-databases-myvariant-queries should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/bio-clinical-databases-myvariant-queries/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How bio-clinical-databases-myvariant-queries Compares
| Feature / Agent | bio-clinical-databases-myvariant-queries | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Query myvariant.info API for aggregated variant annotations from multiple databases (ClinVar, gnomAD, dbSNP, COSMIC, etc.) in a single request. Use when annotating variants with clinical and population data from multiple sources simultaneously.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
## Version Compatibility
Reference examples tested with: SnpEff 5.2+, pandas 2.2+
Before using code patterns, verify installed versions match. If versions differ:
- Python: `pip show <package>` then `help(module.function)` to check signatures
If code throws ImportError, AttributeError, or TypeError, introspect the installed
package and adapt the example to match the actual API rather than retrying.
# MyVariant.info Queries
**"Annotate my variants from multiple databases at once"** → Query the myvariant.info aggregation API to retrieve ClinVar, gnomAD, dbSNP, COSMIC, and other annotations in a single request per variant.
- Python: `myvariant.MyVariantInfo().getvariants(ids, fields='clinvar,gnomad,dbnsfp')`
## Required Imports
```python
import myvariant
```
## Initialize Client
```python
mv = myvariant.MyVariantInfo()
```
## Query Single Variant
**Goal:** Retrieve aggregated annotations for a single variant from multiple databases in one request.
**Approach:** Query myvariant.info by HGVS notation or rsID, which returns ClinVar, gnomAD, dbSNP, COSMIC, and CADD data.
```python
# Query by HGVS notation (recommended)
result = mv.getvariant('chr7:g.140453136A>T')
# Query by rsID
result = mv.getvariant('rs121913527')
# Query by gene and protein change
result = mv.getvariant('BRAF:p.V600E')
```
## Query Multiple Variants
**Goal:** Batch-query up to 1000 variants in a single API call with field selection for efficiency.
**Approach:** Pass a list of variant identifiers to `getvariants()` with specific field filters to minimize response size.
```python
variants = [
'chr7:g.140453136A>T',
'chr17:g.7577120C>T',
'rs121913527'
]
# Batch query (up to 1000 variants per request)
results = mv.getvariants(variants)
# With specific fields
results = mv.getvariants(
variants,
fields=['clinvar', 'gnomad_exome', 'dbsnp']
)
```
## Search Variants
**Goal:** Search for variants by gene, clinical significance, or genomic region using query syntax.
**Approach:** Use Lucene-style query strings with `mv.query()` to filter by gene symbol, ClinVar fields, or coordinate ranges.
```python
# Search by gene
results = mv.query('clinvar.gene.symbol:BRCA1', size=100)
# Search pathogenic variants in gene
results = mv.query(
'clinvar.gene.symbol:BRCA1 AND clinvar.clinical_significance:Pathogenic',
size=100
)
# Search by genomic region
results = mv.query('chr7:140400000-140500000')
```
## Available Fields
Common field paths for annotations:
| Field | Description |
|-------|-------------|
| `clinvar` | ClinVar annotations |
| `gnomad_exome` | gnomAD exome frequencies |
| `gnomad_genome` | gnomAD genome frequencies |
| `dbsnp` | dbSNP annotations |
| `cosmic` | COSMIC cancer mutations |
| `cadd` | CADD deleteriousness scores |
| `dbnsfp` | dbNSFP functional predictions |
| `snpeff` | SnpEff annotations |
## Extract Specific Annotations
**Goal:** Extract ClinVar classification, gnomAD frequency, and CADD score from a variant result.
**Approach:** Navigate the nested JSON response using dictionary access to reach specific annotation fields.
```python
result = mv.getvariant('chr7:g.140453136A>T')
# ClinVar classification
clinvar_sig = result.get('clinvar', {}).get('clinical_significance')
# gnomAD allele frequency
gnomad_af = result.get('gnomad_exome', {}).get('af', {}).get('af')
# CADD score
cadd_phred = result.get('cadd', {}).get('phred')
```
## Batch Processing with DataFrame
**Goal:** Convert batch variant query results into a structured pandas DataFrame for downstream analysis.
**Approach:** Query multiple rsIDs with selected fields, extract key annotations per variant, and assemble into a DataFrame.
```python
import pandas as pd
variants = ['rs121913527', 'rs1800566', 'rs104894155']
results = mv.getvariants(variants, fields=['clinvar', 'gnomad_exome'])
records = []
for r in results:
records.append({
'query': r.get('query'),
'clinvar_sig': r.get('clinvar', {}).get('clinical_significance'),
'gnomad_af': r.get('gnomad_exome', {}).get('af', {}).get('af')
})
df = pd.DataFrame(records)
```
## Rate Limiting
**Goal:** Handle large variant sets exceeding the 1000-variant-per-request API limit.
**Approach:** Split variants into chunks and query sequentially, relying on myvariant's built-in rate limiting.
```python
# myvariant handles rate limiting automatically
# For large batches, use chunks
def batch_query(variants, chunk_size=1000):
all_results = []
for i in range(0, len(variants), chunk_size):
chunk = variants[i:i + chunk_size]
results = mv.getvariants(chunk)
all_results.extend(results)
return all_results
```
## Related Skills
- clinvar-lookup - Detailed ClinVar queries
- gnomad-frequencies - gnomAD-specific frequency queries
- dbsnp-queries - dbSNP rsID lookupsRelated Skills
tooluniverse-clinical-trial-matching
AI-driven patient-to-trial matching for precision medicine and oncology. Given a patient profile (disease, molecular alterations, stage, prior treatments), discovers and ranks clinical trials from ClinicalTrials.gov using multi-dimensional matching across molecular eligibility, clinical criteria, drug-biomarker alignment, evidence strength, and geographic feasibility. Produces a quantitative Trial Match Score (0-100) per trial with tiered recommendations and a comprehensive markdown report. Use when oncologists, molecular tumor boards, or patients ask about clinical trial options for specific cancer types, biomarker profiles, or post-progression scenarios.
tooluniverse-clinical-trial-design
Strategic clinical trial design feasibility assessment using ToolUniverse. Evaluates patient population sizing, biomarker prevalence, endpoint selection, comparator analysis, safety monitoring, and regulatory pathways. Creates comprehensive feasibility reports with evidence grading, enrollment projections, and trial design recommendations. Use when planning Phase 1/2 trials, assessing trial feasibility, or designing biomarker-driven studies.
tooluniverse-clinical-guidelines
Search and retrieve clinical practice guidelines across 12+ authoritative sources including NICE, WHO, ADA, AHA/ACC, NCCN, SIGN, CPIC, CMA, CTFPHC, GIN, MAGICapp, PubMed, EuropePMC, TRIP, and OpenAlex. Covers disease management, cardiology, oncology, diabetes, pharmacogenomics, and more. Use when users ask about clinical guidelines, treatment recommendations, standard of care, evidence-based medicine, or drug-gene dosing recommendations.
clinicaltrials-database
Query ClinicalTrials.gov via API v2. Search trials by condition, drug, location, status, or phase. Retrieve trial details by NCT ID, export data, for clinical research and patient matching.
clinical-trials-search
Search ClinicalTrials.gov with natural language queries. Find clinical trials, enrollment, and outcomes using Valyu semantic search.
clinical-trial-protocol-skill
Generate clinical trial protocols for medical devices or drugs. This skill should be used when users say "Create a clinical trial protocol", "Generate protocol for [device/drug]", "Help me design a clinical study", "Research similar trials for [intervention]", or when developing FDA submission documentation for investigational products.
clinical-reports
Write comprehensive clinical reports including case reports (CARE guidelines), diagnostic reports (radiology/pathology/lab), clinical trial reports (ICH-E3, SAE, CSR), and patient documentation (SOAP, H&P, discharge summaries). Full support with templates, regulatory compliance (HIPAA, FDA, ICH-GCP), and validation tools.
clinical-diagnostic-reasoning
Identify and counteract cognitive biases in medical decision-making through systematic error analysis and contextual algorithm application. For diagnostic reasoning, treatment decisions, and clinical judgment improvement. NOT for basic medical knowledge, technical procedures, or non-clinical healthcare domains.
clinical-decision-support
Generate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
bio-variant-calling-clinical-interpretation
Clinical variant interpretation using ClinVar, ACMG guidelines, and pathogenicity predictors. Prioritize variants for diagnostic and research applications. Use when interpreting clinical significance of variants.
bio-clinical-databases-variant-prioritization
Filter and prioritize variants by pathogenicity, population frequency, and clinical evidence for rare disease analysis. Use when identifying candidate disease-causing variants from exome or genome sequencing.
bio-clinical-databases-tumor-mutational-burden
Calculate tumor mutational burden from panel or WES data with proper normalization and clinical thresholds. Use when assessing immunotherapy eligibility or characterizing tumor immunogenicity.