Skip to main content

Crate seqair

Crate seqair 

Source
Expand description

Pure-Rust BAM/SAM/CRAM/FASTA reader, pileup engine, and VCF/BCF writer.

seqair provides indexed random access to alignment files (BAM, SAM, CRAM), reference sequences (FASTA), and a column-based pileup engine. See Readers for examples.

It also includes VCF/BCF writers with type-safe allele representation and single-pass index co-production. See vcf for examples.

Re-exports§

pub use reader::Readers;

Modules§

bam
BAM reading and pileup. Open a BAM file with IndexedBamReader, fetch records into a RecordStore, then drive PileupEngine to iterate PileupColumns.
cram
CRAM v3.0/v3.1 reading. Use reader::IndexedCramReader to fetch records into a crate::bam::RecordStore; the sub-modules handle the compression codec stack underneath.
fasta
Reference sequence access. Open a FASTA file with IndexedFastaReader to fetch subsequences by name and coordinate range. Supports plain and bgzf-compressed FASTA.
io
Shared I/O primitives used by both BAM and VCF writers.
reader
Format-agnostic entry point. Use Readers::open to open an alignment file (BAM/SAM/CRAM) together with a FASTA reference, then call Readers::pileup to iterate columns or Readers::fetch_base_seq for reference sequence. IndexedReader is the bare alignment handle when no FASTA is needed. Both types are forkable for multi-threaded use.
sam
bgzf-compressed SAM reading. Use reader::IndexedSamReader to fetch records into a crate::bam::RecordStore via a tabix index.
vcf
VCF/BCF writing with type-safe alleles and zero-allocation encoding.