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 aRecordStore, then drivePileupEngineto iteratePileupColumns. - cram
- CRAM v3.0/v3.1 reading. Use
reader::IndexedCramReaderto fetch records into acrate::bam::RecordStore; the sub-modules handle the compression codec stack underneath. - fasta
- Reference sequence access. Open a FASTA file with
IndexedFastaReaderto 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::opento open an alignment file (BAM/SAM/CRAM) together with a FASTA reference, then callReaders::pileupto iterate columns orReaders::fetch_base_seqfor reference sequence.IndexedReaderis the bare alignment handle when no FASTA is needed. Both types are forkable for multi-threaded use. - sam
- bgzf-compressed SAM reading. Use
reader::IndexedSamReaderto fetch records into acrate::bam::RecordStorevia a tabix index. - vcf
- VCF/BCF writing with type-safe alleles and zero-allocation encoding.