Datasets:
Add dataset card
Browse files
README.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc0-1.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- tabular-classification
|
| 5 |
+
tags:
|
| 6 |
+
- genomics
|
| 7 |
+
- dbsnp
|
| 8 |
+
- rsid
|
| 9 |
+
- cross-build
|
| 10 |
+
- GRCh37
|
| 11 |
+
- GRCh38
|
| 12 |
+
- bioinformatics
|
| 13 |
+
- sqlite
|
| 14 |
+
pretty_name: Allelix rsID Identity Table
|
| 15 |
+
size_categories:
|
| 16 |
+
- 1M<n<10M
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# Allelix rsID Identity Table
|
| 20 |
+
|
| 21 |
+
Pre-built SQLite cache mapping rsID allele positions between GRCh37 and GRCh38 genome builds, derived from [dbSNP build 157](https://www.ncbi.nlm.nih.gov/snp/) for use with [Allelix](https://github.com/dial481/allelix).
|
| 22 |
+
|
| 23 |
+
## What's in the file
|
| 24 |
+
|
| 25 |
+
`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).
|
| 26 |
+
|
| 27 |
+
### Schema
|
| 28 |
+
|
| 29 |
+
```sql
|
| 30 |
+
CREATE TABLE rsid_identity (
|
| 31 |
+
rsid TEXT NOT NULL,
|
| 32 |
+
chrom TEXT NOT NULL,
|
| 33 |
+
pos37 INTEGER NOT NULL,
|
| 34 |
+
ref37 TEXT NOT NULL,
|
| 35 |
+
alt37 TEXT NOT NULL,
|
| 36 |
+
pos38 INTEGER NOT NULL,
|
| 37 |
+
ref38 TEXT NOT NULL,
|
| 38 |
+
alt38 TEXT NOT NULL,
|
| 39 |
+
palindromic INTEGER NOT NULL
|
| 40 |
+
);
|
| 41 |
+
|
| 42 |
+
CREATE INDEX idx_rsid_identity_rsid ON rsid_identity(rsid);
|
| 43 |
+
CREATE INDEX idx_rsid_identity_pos37 ON rsid_identity(chrom, pos37);
|
| 44 |
+
CREATE INDEX idx_rsid_identity_pos38 ON rsid_identity(chrom, pos38);
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
### Columns
|
| 48 |
+
|
| 49 |
+
| Column | Description |
|
| 50 |
+
|--------|-------------|
|
| 51 |
+
| `rsid` | dbSNP rsID (e.g. rs429358) |
|
| 52 |
+
| `chrom` | Chromosome (1-22, X, Y, MT; no "chr" prefix) |
|
| 53 |
+
| `pos37` | Genomic position on GRCh37 |
|
| 54 |
+
| `ref37` | Reference allele on GRCh37 |
|
| 55 |
+
| `alt37` | Alternate allele on GRCh37 |
|
| 56 |
+
| `pos38` | Genomic position on GRCh38 |
|
| 57 |
+
| `ref38` | Reference allele on GRCh38 |
|
| 58 |
+
| `alt38` | Alternate allele on GRCh38 |
|
| 59 |
+
| `palindromic` | 1 if the allele set equals its complement (strand-ambiguous), 0 otherwise |
|
| 60 |
+
|
| 61 |
+
### Multi-allelic sites
|
| 62 |
+
|
| 63 |
+
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).
|
| 64 |
+
|
| 65 |
+
### Inclusion criteria
|
| 66 |
+
|
| 67 |
+
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:
|
| 68 |
+
|
| 69 |
+
| Reason | Count |
|
| 70 |
+
|--------|-------|
|
| 71 |
+
| Only placed on GRCh37 | 196 |
|
| 72 |
+
| Only placed on GRCh38 | 296 |
|
| 73 |
+
| Multiple placements on one build | 685 |
|
| 74 |
+
| Alleles unpairable between builds | 205 |
|
| 75 |
+
| Chromosome changed between builds | 2 |
|
| 76 |
+
|
| 77 |
+
## How Allelix uses this
|
| 78 |
+
|
| 79 |
+
Allelix downloads this file automatically during `allelix db update`. The identity table serves three purposes:
|
| 80 |
+
|
| 81 |
+
1. **Reference allele population** for array data on both GRCh37 and GRCh38.
|
| 82 |
+
2. **rsID recovery** for rsID-less VCF files on both builds, via locus-based lookup.
|
| 83 |
+
3. **GRCh37 → GRCh38 coordinate translation** for cross-build enrichment against gnomAD, AlphaMissense, and CADD. Palindromic sites abstain from translation to avoid strand-ambiguous mismatches.
|
| 84 |
+
|
| 85 |
+
## Building from source
|
| 86 |
+
|
| 87 |
+
The cache can be rebuilt from dbSNP VCFs using the build script included with Allelix:
|
| 88 |
+
|
| 89 |
+
```bash
|
| 90 |
+
python scripts/build_rsid_identity_cache.py \
|
| 91 |
+
--data-dir /path/to/dbsnp/vcfs \
|
| 92 |
+
--output rsid_identity.sqlite \
|
| 93 |
+
--work-dir /tmp/identity-build \
|
| 94 |
+
--gzip
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
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.
|
| 98 |
+
|
| 99 |
+
## Integrity
|
| 100 |
+
|
| 101 |
+
| Property | Value |
|
| 102 |
+
|----------|-------|
|
| 103 |
+
| File | `rsid_identity.sqlite.gz` |
|
| 104 |
+
| Size (compressed) | 148 MB |
|
| 105 |
+
| Size (uncompressed) | 436 MB |
|
| 106 |
+
| SHA-256 | `2a00787cd0be4e7572efd21686013c49f3d0180137cd4403730524d50a5db285` |
|
| 107 |
+
| Rows | 4,851,120 |
|
| 108 |
+
| Distinct rsIDs | 3,046,373 |
|
| 109 |
+
|
| 110 |
+
## Source and license
|
| 111 |
+
|
| 112 |
+
- **Source:** [NCBI dbSNP build 157](https://www.ncbi.nlm.nih.gov/snp/) (GRCh37 VCF: GCF_000001405.25; GRCh38 VCF: GCF_000001405.40)
|
| 113 |
+
- **License:** [CC0 1.0 / Public Domain](https://creativecommons.org/publicdomain/zero/1.0/) — derived from NCBI dbSNP, a United States Government Work in the public domain
|
| 114 |
+
- **Citation:** Sherry ST, et al. "dbSNP: the NCBI database of genetic variation." Nucleic Acids Res. 2001;29(1):308-311.
|