dbsnp-database
Query NCBI dbSNP for SNP records by rsID, gene, or region via E-utilities and Variation Services REST API. Retrieve alleles, MAF, variant class (SNV/indel/MNV), clinical links, cross-DB IDs (ClinVar, dbVar, 1000G). Free; 3 req/sec (10 with key). For clinical pathogenicity use clinvar-database; for population frequencies use gnomad-database.
npx skills add BioTender-max/awesome-bio-agent-skills --skill dbsnp-database --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
Fetches dbSNP records by rsID, gene, or region using NCBI E-utilities and the Variation Services REST API. Retrieves data including alleles, variant class (snv/indel/mnv), cross-DB IDs (ClinVar, dbVar, 1000G), and (via ESummary/Variation Services) allele frequencies. Provides batch querying via EPost+EFetch and region-based searches.
How it works
- Provides a Quick Start and Core API sections demonstrating:
- rsID Lookup via E-utilities: efetch with db=snp and esummary for JSON results; parses SNR/MAF-related fields and limited clinical data.
- Genic Variant Search: esearch to obtain rsIDs for a gene, with optional ClinVar-filtered results.
- Chromosomal Region Search: esearch queries using coordinates and assembly to return rsIDs in a region.
- Variant Summary via ESummary: fetch_snp_summaries retrieves per-rs data including global_mafs, chrpos, and clinical_significance.
- Batch rsID Query via EPost+EFetch: uploads a list of rsIDs to the history server and retrieves summaries in batches.
- NCBI Variation Services API: fetch_refsnp returns structured JSON with placements, alleles, and allele frequencies; parse_allele_frequencies extracts frequencies per study.
- Includes example Python code snippets for each operation, operating with an email parameter required by NCBI.
When to use it
- When you need allele frequencies and variant class for a known rsID
- When searching all dbSNP variants in a gene or chromosomal region by name or coordinates
- When resolving rsIDs to genomic coordinates and HGVS notation
- When checking if a variant has ClinVar links
- When batch-fetching hundreds of rsIDs
- When cross-referencing variant positions to dbSNP rsIDs for downstream annotation
- For clinical pathogenicity use clinvar-database; for population frequencies use gnomad-database
What it can touch
- Uses tools: claude-code (as declared)
- Interacts with NCBI E-utilities endpoints and Variation Services REST API via HTTP requests in Python examples
Caveats
- Rate limits: 3 requests/second without API key; 10 requests/second with free API key. Requires an email parameter for NCBI requests.
- Some fields like maf/mafallele were removed from ESummary in 2024; recommended to use global_mafs or Variation Services outputs for frequencies.
- Clinical significance is not guaranteed to be present for all records; for full pathogenicity context, use clinvar-database.
- License: CC0-1.0
# dbSNP Database ## Overview NCBI dbSNP is the primary public repository for short human genetic variants, cataloguing over 1 billion SNPs, indels, and MNVs with allele frequencies, functional annotations, and cross-references to ClinVar, gnomAD, and 1000 Genomes. Variants are identified by stable rsIDs (reference SNP cluster IDs). Access is free via two APIs: the legacy NCBI E-utilities and the newer NCBI Variation Services REST API, which returns structured JSON. ## When to Use - Looking up allele frequencies and variant class for a known rsID - Searching all dbSNP variants in a gene or chromosomal region by name or coordinates - Resolving rsIDs to genomic coordinates (GRCh38/GRCh37) and HGVS notation - Checking whether a variant of interest has clinical significance links to ClinVar entries - Batch-fetching hundreds of rsIDs efficiently using epost+efetch history server - Cross-referencing a list of variant positions to dbSNP rsIDs for downstream annotation - For clinical pathogenicity classifications use `clinvar-database`; dbSNP provides IDs and frequency but not curated clinical significance - For population frequency stratified by ancestry use `gnomad-database`; dbSNP MAF is
- Overview
- When to Use
- Prerequisites
- Quick Start
- Core API
- Query 1: rsID Lookup via E-utilities
- Query 2: Gene Variant Search
- Query 3: Chromosomal Region Search
- Query 4: Variant Summary — MAF, Alleles, Clinical Significance
- Query 5: Batch rsID Query with EPost+EFetch
- Query 6: NCBI Variation Services API
- Key Concepts
- rsID vs. ss ID (Submitted SNP)
- MAF vs. Clinical Significance
pip install requests pandas matplotlib xml.etree.ElementTree is part of Python stdlib — no additional install needed
What does the dbsnp-database skill do?
Query NCBI dbSNP for SNP records by rsID, gene, or region via E-utilities and Variation Services REST API. Retrieve alleles, MAF, variant class (SNV/indel/MNV), clinical links, cross-DB IDs (ClinVar, dbVar, 1000G). Free; 3 req/sec (10 with key). For clinical pathogenicity use clinvar-database; for population frequencies use gnomad-database.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill dbsnp-database --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.
