Resolve rsIDs, navigate Build 156 JSON-based RefSNP records, follow multi-hop merge chains through RsMergeArch / SNPHistory, and normalize variant identifiers across rsID, SPDI, HGVS-g/c/p, and VCF conventions. The skill emphasizes rsID as a cluster identifier rather than a unique variant identifier and treats SPDI / ClinGen Allele Registry CA ID as the canonical join key.
pip install myvariant biopython requests pandas
# Optional: bulk download for genome-wide rsID lookup (each ~5-20GB compressed)
wget ftp://ftp.ncbi.nlm.nih.gov/snp/latest_release/JSON/refsnp-chr17.json.bz2
wget ftp://ftp.ncbi.nlm.nih.gov/snp/latest_release/JSON/refsnp-merged.json.bz2
wget ftp://ftp.ncbi.nlm.nih.gov/snp/latest_release/JSON/refsnp-withdrawn.json.bz2
Tell the agent what to do: - "Resolve rs429358 to its current canonical rsID through any merge chain" - "Convert chr19:44908684:T:C to SPDI canonical form and find any associated rsID" - "For these 500 deprecated rsIDs, trace merge histories and report final rsIDs" - "Normalize this VCF's IDs by replacing rsIDs with SPDI" - "Check whether rs1799963 is withdrawn or merged, and report ALFA + gnomAD frequencies"
"Look up rs121913529 in Build 156 and return: current canonical rsID, GRCh38 coordinates, all alleles, gene context, and merge history."
"Resolve rs334 (HbS sickle cell variant) and report SPDI canonical form plus ALFA frequencies by ancestry."
"Is rs1801131 (MTHFR A1298C) multi-allelic in dbSNP? Show the full alleles list."
"rs1799963 was reported in a 2018 paper. Trace its merge chain to the current canonical rsID."
"For these 100 rsIDs from a 2010 candidate-gene study, identify which are still current, which have merged, and which are withdrawn."
"Convert chr17:43091031:G:A (VCF format, GRCh38) to canonical SPDI and lookup the associated rsID."
"Given HGVS notation NM_000059.3:c.5946delT, find the genomic SPDI on GRCh38 and the corresponding rsID."
"For my VCF of 50k variants, replace IDs with canonical SPDI; flag multi-allelic sites where rsID is ambiguous."
"For rs6025 (factor V Leiden), give me ALFA per-ancestry frequencies AND gnomAD v4 grpmax FAF95 and reconcile any discrepancy."
"Identify variants where ALFA AF and gnomAD AF differ by >2x and flag for review."
"Stream-parse
refsnp-chr17.json.bz2to extract all rsIDs in BRCA1 + BRCA2 regions with their ALFA frequencies.""From
refsnp-merged.json.bz2, build a deprecated-rsID lookup table for our cohort's old genotyping array."
is_withdrawn=true with withdrawal reason./spdi/{spdi}/rsids); for rsID-to-coord, parse primary_snapshot_data.placements_with_allele.rsID -> variant mappings silently fail.db=snp) returns a thin legacy summary.RsMergeArch is insufficient.SNPHistory.bcp.gz (or refsnp-withdrawn.json.bz2), not RsMergeArch.refsnp-chr{N}.json.bz2) rather than streaming all of dbSNP.