refseq.alignments
import bedrock_bio as bb
rel = bb.load_table('refseq.alignments')
rel = rel.filter("assembly_accession = 'GCF_000001405.25'")
df = rel.limit(5).pl() # Polars
df = rel.limit(5).df() # Pandas
df.head()| sources | assembly_accession | sequence_accession | start | end | score | is_forward_strand | alignment_id | alignment_type | annotation_method | ... | mismatch_count | target_coverage_fraction | gapped_identity_fraction | gap_open_identity_fraction | ungapped_identity_fraction | rank | bit_score | e_value | is_curated_alignment | not_for_annotation_code | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/genomes... | GCF_000001405.25 | NC_000001.10 | 20398 | 21446 | 1049.0 | True | cbaa27a6-261d-4cde-a2d2-47fa634f930b | match | RefSeq | ... | 0 | 1.0 | 1.0 | 1.0 | 1.0 | 1 | 1953.30 | 0.0 | <NA> | <NA> |
| 1 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/genomes... | GCF_000001405.25 | NC_000001.10 | 52353 | 53496 | 1144.0 | True | f44de988-f66d-4059-a083-42aaa0da28cf | match | RefSeq | ... | 0 | 1.0 | 1.0 | 1.0 | 1.0 | 1 | 2130.10 | 0.0 | <NA> | <NA> |
| 2 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/genomes... | GCF_000001405.25 | NC_000001.10 | 62916 | 63985 | 1070.0 | True | 97d4de9b-3480-4524-b512-8098b350b20a | match | RefSeq | ... | 0 | 1.0 | 1.0 | 1.0 | 1.0 | 1 | 1992.38 | 0.0 | <NA> | <NA> |
| 3 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/genomes... | GCF_000001405.25 | NC_000001.10 | 126542 | 129325 | 2784.0 | True | 1dab45d8-19fa-4a25-9b29-44108685dad8 | match | RefSeq | ... | 0 | 1.0 | 1.0 | 1.0 | 1.0 | 1 | 5182.27 | 0.0 | <NA> | <NA> |
| 4 | [{'url': 'https://ftp.ncbi.nlm.nih.gov/genomes... | GCF_000001405.25 | NC_000001.10 | 130968 | 134936 | 3969.0 | True | ddd9180a-fe80-49c2-bd7d-183b78c783d1 | match | RefSeq | ... | 0 | 1.0 | 1.0 | 1.0 | 1.0 | 1 | 7387.64 | 0.0 | <NA> | <NA> |
library(bedrockbio)
library(dplyr)
lf <- load_table("refseq.alignments")
df <- filter(lf, assembly_accession == "GCF_000001405.25") |> collect()
head(df)Sample output (5 rows, showing 8 of 27 columns) assembly_accession | sequence_accession | start | end | score | is_forward_strand | alignment_id | alignment_type ------------------ | ------------------ | ------ | ------ | ----- | ----------------- | ------------------------ | -------------- 0 GCF_000001405.25 | NC_000001.10 | 20398 | 21446 | 1049 | true | cbaa27a6-261d-4cde-a2d2… | match 1 GCF_000001405.25 | NC_000001.10 | 52353 | 53496 | 1144 | true | f44de988-f66d-4059-a083… | match 2 GCF_000001405.25 | NC_000001.10 | 62916 | 63985 | 1070 | true | 97d4de9b-3480-4524-b512… | match 3 GCF_000001405.25 | NC_000001.10 | 126542 | 129325 | 2784 | true | 1dab45d8-19fa-4a25-9b29… | match 4 GCF_000001405.25 | NC_000001.10 | 130968 | 134936 | 3969 | true | ddd9180a-fe80-49c2-bd7d… | match
Description
Section titled “Description”RefSeq sequence-to-assembly alignment blocks, one row per block.
Rows sharing an alignment_id are blocks of the same alignment.
sequence_accession, start, and end locate the block on the assembly; the target_* fields locate its
mapped interval on the aligned sequence.
Partitions
Section titled “Partitions”assembly_accession'GCF_000001405.25''GCF_000001405.40''GCF_000001635.20''GCF_000001635.27''GCF_000001895.5''GCF_000002035.5''GCF_000002035.6''GCF_000002285.3''GCF_000002285.5''GCF_000003025.5''GCF_000003025.6''GCF_000003195.3''GCF_000003625.3''GCF_000004195.4''GCF_000004515.5''GCF_000004515.6''GCF_000151735.1''GCF_000188115.5''GCF_000215625.1''GCF_000226075.1''GCF_000349665.1''GCF_000364345.1''GCF_000409795.2''GCF_001433935.1''GCF_001704415.1''GCF_001704415.2''GCF_001858045.2''GCF_002263795.3''GCF_002863925.1''GCF_003339765.1''GCF_003668045.3''GCF_007990345.1''GCF_008728515.1''GCF_009914755.1''GCF_011100685.1''GCF_011764305.1''GCF_016699485.2''GCF_016772045.2''GCF_017654675.1''GCF_018294505.1''GCF_020379485.1''GCF_034190915.1''GCF_036323735.1''GCF_037993035.2''GCF_047675955.1''GCF_049350105.2''GCF_049354715.1''GCF_052040795.1''GCF_054392235.1''GCF_902167145.1''GCF_905237065.1''GCF_964237555.1'
Schema
Section titled “Schema”| Column | Type | Description |
|---|---|---|
sources |
STRUCT(url TEXT, filename TEXT, last_modified_at TIMESTAMPTZ, sha256 TEXT)[] |
Source provenance for the row. |
assembly_accession |
TEXT |
Partition column. Versioned RefSeq assembly accession (GCF accession). |
sequence_accession |
TEXT |
Versioned RefSeq nucleotide sequence accession on which the alignment block is annotated; joins refseq.assembly_sequences.sequence_accession. |
start |
INT |
1-based inclusive start coordinate of the alignment block on sequence_accession. |
end |
INT |
1-based inclusive end coordinate of the alignment block on sequence_accession. |
score |
DOUBLE |
GFF alignment score, if supplied; its definition varies by alignment type and source. |
is_forward_strand |
BOOLEAN |
Whether the alignment block is on the forward strand of sequence_accession; null when unspecified. |
alignment_id |
TEXT |
Local GFF3 ID of the alignment; shared by blocks of a multi-block alignment and not a stable identifier. |
alignment_type |
TEXT |
Source GFF3 alignment type. |
annotation_method |
TEXT |
NCBI GFF column-2 annotation method or source, if supplied. |
target_accession |
TEXT |
Versioned accession of the aligned target sequence from the GFF Target attribute. |
target_start |
INT |
1-based inclusive start coordinate of the block on target_accession. |
target_end |
INT |
1-based inclusive end coordinate of the block on target_accession. |
is_target_forward_strand |
BOOLEAN |
Whether the target interval is in forward orientation. |
gap |
TEXT |
Exonerate CIGAR-like GFF Gap edit script describing indels in the alignment block, if supplied. |
gap_count |
INT |
Number of gap openings in the whole alignment from GFF gap_count, if supplied. |
identity_count |
INT |
Number of matching bases in the whole alignment from GFF num_ident, if supplied. |
mismatch_count |
INT |
Number of mismatching bases in the whole alignment from GFF num_mismatch, if supplied. |
target_coverage_fraction |
FLOAT |
Gapped target sequence coverage from GFF pct_coverage, normalized from percent to a fraction from 0 through 1, if supplied. |
gapped_identity_fraction |
FLOAT |
Standard gapped alignment identity from GFF pct_identity_gap, normalized from percent to a fraction from 0 through 1, if supplied. |
gap_open_identity_fraction |
FLOAT |
Alignment identity from GFF pct_identity_gapopen_only, counting every gap as one mismatch, normalized from percent to a fraction from 0 through 1, if supplied. |
ungapped_identity_fraction |
FLOAT |
Alignment identity from GFF pct_identity_ungap, excluding gaps, normalized from percent to a fraction from 0 through 1, if supplied. |
rank |
INT |
Source rank of this alignment among alternatives, if supplied. |
bit_score |
DOUBLE |
BLAST bit score from GFF bit_score, if supplied. |
e_value |
DOUBLE |
BLAST expectation value from GFF e_value, if supplied. |
is_curated_alignment |
BOOLEAN |
Whether GFF curated_alignment=1 marks the alignment as curated; null when the source does not supply the attribute. |
not_for_annotation_code |
Int8 |
Numeric GFF not_for_annotation status code, if supplied; values 1 and 2 are observed and its detailed semantics are not documented by NCBI. |