Datasets:
Download README.md from allelix/allelix-rsid-identity: direct link, hf CLI and curl.
- Browser
- Download file 4.16 kB
-
https://huggingface.co/datasets/allelix/allelix-rsid-identity/resolve/main/README.md
- Command line
-
hf download hf://datasets/allelix/allelix-rsid-identity/README.md
-
curl -L -o README.md https://huggingface.co/datasets/allelix/allelix-rsid-identity/resolve/main/README.md
license: cc0-1.0
task_categories:
- tabular-classification
tags:
- genomics
- dbsnp
- rsid
- cross-build
- GRCh37
- GRCh38
- bioinformatics
- sqlite
pretty_name: Allelix rsID Identity Table
size_categories:
- 1M<n<10M
Allelix rsID Identity Table
Pre-built SQLite cache mapping rsID allele positions between GRCh37 and GRCh38 genome builds, derived from dbSNP build 157 for use with Allelix.
What's in the file
rsid_identity.sqlite.gz is a gzipped SQLite database containing the rsid_identity table with 4,851,120 rows covering 3,046,373 rsIDs that appear in at least one Allelix annotation database (ClinVar, GWAS Catalog, SNPedia, PharmGKB).
Schema
CREATE TABLE rsid_identity (
rsid TEXT NOT NULL,
chrom TEXT NOT NULL,
pos37 INTEGER NOT NULL,
ref37 TEXT NOT NULL,
alt37 TEXT NOT NULL,
pos38 INTEGER NOT NULL,
ref38 TEXT NOT NULL,
alt38 TEXT NOT NULL,
palindromic INTEGER NOT NULL
);
CREATE INDEX idx_rsid_identity_rsid ON rsid_identity(rsid);
CREATE INDEX idx_rsid_identity_pos37 ON rsid_identity(chrom, pos37);
CREATE INDEX idx_rsid_identity_pos38 ON rsid_identity(chrom, pos38);
Columns
| Column | Description |
|---|---|
rsid |
dbSNP rsID (e.g. rs429358) |
chrom |
Chromosome (1-22, X, Y, MT; no "chr" prefix) |
pos37 |
Genomic position on GRCh37 |
ref37 |
Reference allele on GRCh37 |
alt37 |
Alternate allele on GRCh37 |
pos38 |
Genomic position on GRCh38 |
ref38 |
Reference allele on GRCh38 |
alt38 |
Alternate allele on GRCh38 |
palindromic |
1 if the allele set equals its complement (strand-ambiguous), 0 otherwise |
Multi-allelic sites
An rsID with multiple alternate alleles has one row per allele. For example, rs1801133 (MTHFR C677T) has three rows for its three observed alternate alleles (A, C, T).
Inclusion criteria
An rsID is included only when it has exactly one primary-assembly placement per build, on the same chromosome, with allele sets that match on the same strand or (for SNVs) after complementing. Exclusions from the 3,073,779 rsID universe:
| Reason | Count |
|---|---|
| Only placed on GRCh37 | 196 |
| Only placed on GRCh38 | 296 |
| Multiple placements on one build | 685 |
| Alleles unpairable between builds | 205 |
| Chromosome changed between builds | 2 |
How Allelix uses this
Allelix downloads this file automatically during allelix db update. The identity table serves three purposes:
- Reference allele population for array data on both GRCh37 and GRCh38.
- rsID recovery for rsID-less VCF files on both builds, via locus-based lookup.
- GRCh37 → GRCh38 coordinate translation for cross-build enrichment against gnomAD, AlphaMissense, and CADD. Palindromic sites abstain from translation to avoid strand-ambiguous mismatches.
Building from source
The cache can be rebuilt from dbSNP VCFs using the build script included with Allelix:
python scripts/build_rsid_identity_cache.py \
--data-dir /path/to/dbsnp/vcfs \
--output rsid_identity.sqlite \
--work-dir /tmp/identity-build \
--gzip
The build streams both GRCh37 and GRCh38 dbSNP VCFs through an 8 MB Bloom filter, then joins candidates in SQLite. Peak memory is ~40 MB; runtime is ~3 hours on a 1 GB VPS.
Integrity
| Property | Value |
|---|---|
| File | rsid_identity.sqlite.gz |
| Size (compressed) | 148 MB |
| Size (uncompressed) | 436 MB |
| SHA-256 | 2a00787cd0be4e7572efd21686013c49f3d0180137cd4403730524d50a5db285 |
| Rows | 4,851,120 |
| Distinct rsIDs | 3,046,373 |
Source and license
- Source: NCBI dbSNP build 157 (GRCh37 VCF: GCF_000001405.25; GRCh38 VCF: GCF_000001405.40)
- License: CC0 1.0 / Public Domain — derived from NCBI dbSNP, a United States Government Work in the public domain
- Citation: Sherry ST, et al. "dbSNP: the NCBI database of genetic variation." Nucleic Acids Res. 2001;29(1):308-311.