bio-clinical-databases-dbsnp-queries
Resolves rsIDs, navigates RsMergeArch/SNPHistory merge chains, and converts between rsID, SPDI, HGVS, and VCF representations using the dbSNP Build 156 JSON architecture. Use when normalizing variant identifiers, joining variant databases by cluster ID, or tracking deprecated rsIDs through historical merges.
npx skills add BioTender-max/awesome-bio-agent-skills --skill dbsnp-queries --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Resolves rsIDs, traverses RsMergeArch/SNPHistory chains, and converts among rsID, SPDI, HGVS, and VCF representations using the dbSNP Build 156 JSON architecture. Use when normalizing variant identifiers, joining variant databases by cluster ID, or tracking deprecated rsIDs through historical merges.
How it works
- Provides methods to fetch full Build 156 RefSNP JSON via Variation Services /v0/refsnp/{id}, extracting current and merged data.
- Includes functions to resolve multi-hop merge chains by following merged_snapshot_data and detecting cycles.
- Demonstrates SPDI, HGVS, and VCF conversion pathways through canonicalization endpoints, contextual HGVS, and SPDI mappings.
- Uses explicit Python examples for:
- RefSNP fetch: Variation Services /v0/refsnp/{id}
- Multi-hop resolution via merged_snapshot_data
- SPDI ↔ rsID lookups, HGVS contextuals, and VCF-to-SPDI canonicalization
- ALFA/gnomAD frequency lookups via Variation Services
When to use it
- To resolve a single rsID to coordinates and alleles with full Build 156 data
- To resolve historical/deprecated rsIDs by following merge history
- To perform bulk rsID normalization, or convert between representations for joins across databases
- To convert between SPDI, HGVS, and VCF representations using the canonical bridge
What it can touch
- Variation Services REST API at https://api.ncbi.nlm.nih.gov/variation/v0
- SPDI/HGVS/VCF conversion endpoints under Variation Services
- Local JSON parsing structures for primary_snapshot_data and merged_snapshot_data
Caveats
- Build 156 is JSON-only; Build 151 used relational SQL dumps. E-utilities db=snp may return a thin pre-156 summary missing key fields.
- rsID is a cluster identifier, not a single-variant ID; multi-allelic sites are common (~6-8%).
- Withdrawal data live in SNPHistory.bcp.gz, not RsMergeArch.
- The sample code includes cycle detection for merge chains and warns about potential stale IDs if not followed through the full chain.
## Version Compatibility Reference examples tested with: myvariant 1.0+, requests 2.31+, biopython 1.83+, Entrez Direct 21.0+. dbSNP Build 156 (September 2022) is the current schema; Build 151 (2017) was the last with relational SQL dumps. Builds 152-155 dual-released JSON+SQL; 156+ is JSON-only. Before using code patterns, verify installed versions match. If versions differ: - Python: `pip show <package>` then `help(module.function)` to check signatures - CLI: `<tool> --version` then `<tool> --help` to confirm flags If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying. The Variation Services REST API uses path-based versioning (`/variation/v0/`); E-utilities `db=snp` returns thin legacy summaries missing build-156 schema fields. # dbSNP Queries and rsID Normalization **'Look up this rsID / normalize variant representations'** -> Resolve rsIDs through merge chains, compute canonical SPDI, and convert between rsID, HGVS-g, HGVS-c, and VCF allele representations. - Python (aggregator): `myvariant.MyVariantInfo().getvariant(rsid, fields=['dbsnp', 'clinvar', 'gnomad_exome'])` - Pyth
- Version Compatibility
- rsID Is a Cluster Identifier, Not a Variant Identifier
- Build 156 Schema Overhaul: What Changed
- RsMergeArch: The Multi-Hop Merge Footgun
- SPDI: The Canonical Variant Representation
- Decision Tree by Query Scenario
- Single rsID Resolution
- Multi-Hop Merge Resolution
- SPDI <-> HGVS <-> VCF Conversion
- ALFA Frequencies vs gnomAD
- Per-Operation Failure Modes
- Reconciliation: When Sources Disagree
- Quantitative Thresholds and Conventions
- Common Errors
What does the bio-clinical-databases-dbsnp-queries skill do?
Resolves rsIDs, navigates RsMergeArch/SNPHistory merge chains, and converts between rsID, SPDI, HGVS, and VCF representations using the dbSNP Build 156 JSON architecture. Use when normalizing variant identifiers, joining variant databases by cluster ID, or tracking deprecated rsIDs through historical merges.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill dbsnp-queries --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
