dbsnp-database

Query NCBI dbSNP to resolve rsIDs, VCF coordinates, and HGVS strings for genetic variants.

Updated Sep 9, 2026
One-click install
npx skills add https://github.com/xlinh2301/EditCTC --skill dbsnp-database-xlinh2301
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dbsnp-database
Source: https://github.com/xlinh2301/EditCTC/tree/main/.agents/skills/dbsnp-database
Command: npx skills add https://github.com/xlinh2301/EditCTC --skill dbsnp-database-xlinh2301

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires polite-http, python-dotenv, and includes scripts (resource) and references (resource) components.

What problem does it solve? Looking up short genetic variants (SNPs, indels) in NCBI's dbSNP database requires juggling multiple REST endpoints, SPDI conversions, rate limits, and assembly differences. This Skill wraps all of that in a single CLI so you can map between rsIDs, genomic coordinates, and HGVS notation and retrieve variant summaries without writing custom HTTP code. ## Core Features & Use Cases - Bidirectional Variant Resolution: Convert VCF-style coordinates or HGVS strings to rsIDs, and resolve rsIDs back to genomic placements on GRCh38 or GRCh37, with automatic assembly fallback. - Variant Record Retrieval: Fetch abbreviated RefSNP records including variant type, gene associations, clinical significances, and minor allele frequencies, with an optional full-payload mode. - Regional Search: Enumerate all rsIDs within a chromosomal region via NCBI E-utilities with automatic pagination and truncation reporting. - Use Case: Given a variant reported as 8 19962213 C T, resolve it to its rsID, then retrieve the gene associations and clinical significance for that rsID in two commands. ## Quick Start Ask the assistant to look up the dbSNP record for rs7412, including its variant type, associated genes, and clinical significance.

Frequently Asked Questions about dbsnp-database

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the rsID for a variant from genomic coordinates?▼

Use the resolve-variant command with chromosome, 1-based position, reference allele, and alternate allele, for example: uv run scripts/dbsnp_cli.py resolve-variant 8 19962213 C T --output /tmp/resolve.json. It returns matching rsIDs as JSON.

How do I convert an HGVS string to an rsID in dbSNP?▼

Run resolve-hgvs with the HGVS expression wrapped in single quotes, such as 'NC_000008.11:g.19962213del'. The script converts it to SPDI via NCBI Variation Services and returns the corresponding rsIDs.

Does dbSNP lookup work with GRCh37 coordinates?▼

Yes. The resolve-variant and resolve-hgvs commands try GRCh38 first and automatically fall back to GRCh37, noting the fallback in the output. You can also force an assembly with the --assembly flag using a RefSeq accession like GCF_000001405.25.

Why did my dbSNP query return an HTTP 500 reference mismatch error?▼

An HTTP 500 reference mismatch means the reference allele you provided does not match the base at that position in the requested assembly. Do not retry the same query; verify the coordinates and try the other assembly (GRCh38 versus GRCh37).

Do I need an NCBI API key to query dbSNP?▼

No, the skill works without a key at 3 requests per second. Setting the NCBI_API_KEY environment variable raises the limit to 10 requests per second, which is recommended for many queries or if you hit HTTP 429 errors.

When should I not use dbSNP for variant analysis?▼

dbSNP is not the right source for clinical pathogenicity classifications with submitter rationales (use ClinVar), ancestry-stratified allele frequencies (use gnomAD), or functional effect prediction of novel mutations. dbSNP focuses on variant identification and mapping.