dbsnp.genes
import bedrock_bio as bb
rel = bb.load_table('dbsnp.genes')
rel = rel.filter("assembly_accession = 'GCF_000001405.25' AND chromosome = '1'")
df = rel.limit(5).pl() # Polars
df = rel.limit(5).df() # Pandas
df.head()| sources | build | assembly_accession | assembly_name | chromosome | position | ref_allele | alt_allele | rsid | gene_id | gene_symbol | is_pseudogene | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/snp/arc... | b157 | GCF_000001405.25 | GRCh37.p13 | 1 | 10001 | T | A | rs1570391677 | 100287102 | DDX11L1 | True |
| 1 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/snp/arc... | b157 | GCF_000001405.25 | GRCh37.p13 | 1 | 10001 | T | C | rs1570391677 | 100287102 | DDX11L1 | True |
| 2 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/snp/arc... | b157 | GCF_000001405.25 | GRCh37.p13 | 1 | 10002 | A | C | rs1570391692 | 100287102 | DDX11L1 | True |
| 3 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/snp/arc... | b157 | GCF_000001405.25 | GRCh37.p13 | 1 | 10003 | A | C | rs1570391694 | 100287102 | DDX11L1 | True |
| 4 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/snp/arc... | b157 | GCF_000001405.25 | GRCh37.p13 | 1 | 10007 | T | C | rs1639538116 | 100287102 | DDX11L1 | True |
library(bedrockbio)
library(dplyr)
lf <- load_table("dbsnp.genes")
df <- filter(lf, assembly_accession == "GCF_000001405.25", chromosome == "1") |> collect()
head(df)Sample output (5 rows, showing 8 of 12 columns) assembly_accession | chromosome | build | assembly_name | position | ref_allele | alt_allele | rsid ------------------ | ---------- | ----- | ------------- | -------- | ---------- | ---------- | ------------ 0 GCF_000001405.25 | 1 | b157 | GRCh37.p13 | 10001 | T | A | rs1570391677 1 GCF_000001405.25 | 1 | b157 | GRCh37.p13 | 10001 | T | C | rs1570391677 2 GCF_000001405.25 | 1 | b157 | GRCh37.p13 | 10002 | A | C | rs1570391692 3 GCF_000001405.25 | 1 | b157 | GRCh37.p13 | 10003 | A | C | rs1570391694 4 GCF_000001405.25 | 1 | b157 | GRCh37.p13 | 10007 | T | C | rs1639538116
Description
Section titled “Description”Genes overlapping each dbSNP variant, from the dbSNP GENEINFO and PSEUDOGENEINFO annotations.
Gene overlap is annotated per dbSNP record, so alternate alleles at the same site carry the same genes. gene_id is an NCBI Gene ID, not an Ensembl ID.
Partitions
Section titled “Partitions”assembly_accession'GCF_000001405.25''GCF_000001405.40'
chromosome'1''10''11''12''13''14''15''16''17''18''19''2''20''21''22''3''4''5''6''7''8''9''MT''X''Y'
Schema
Section titled “Schema”| Column | Type | Description |
|---|---|---|
sources |
STRUCT(url TEXT, filename TEXT, last_modified_at TIMESTAMPTZ, sha256 TEXT)[] |
Source provenance for the row. |
build |
TEXT |
dbSNP build version (e.g. b157). |
assembly_accession |
TEXT |
Partition column. Versioned RefSeq assembly accession (GCF) for the variant coordinates. |
assembly_name |
TEXT |
Exact NCBI assembly name, including its patch release (for example, GRCh38.p14). |
chromosome |
TEXT |
Partition column. Chromosome on which the variant is located (1-22, X, Y, MT). |
position |
INT |
Variant position within the chromosome (1-based). |
ref_allele |
TEXT |
Reference allele. |
alt_allele |
TEXT |
Alternate allele. |
rsid |
TEXT |
NCBI RefSNP identifier. |
gene_id |
TEXT |
NCBI Gene ID (e.g. 348 for APOE). Not an Ensembl ID. |
gene_symbol |
TEXT |
Gene symbol (e.g. APOE). |
is_pseudogene |
BOOLEAN |
Whether the gene is a pseudogene (from PSEUDOGENEINFO rather than GENEINFO). |