SKILL.md
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>thenhelp(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
import myvariant
Initialize Client
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.
# 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.
