Skip to main content

Module seqio

Module seqio 

Source
Expand description

Sequence I/O Module

Provides unified reading capabilities for biological sequence files. Supports both FASTA and FASTQ formats, including gzip-compressed files.

§Supported Formats

  • FASTA: Standard sequence format with header and sequence lines
  • FASTQ: Sequence format with quality scores (plain or gzipped)

§Examples

use argenus::seqio::{FastaReader, FastqFile};

// Read FASTA file
let mut reader = FastaReader::open("sequences.fas").unwrap();
while let Some(record) = reader.read_next().unwrap() {
    println!("{}: {} bp", record.name, record.seq.len());
}

// Read FASTQ file (auto-detects gzip)
let mut reader = FastqFile::open("reads.fq.gz").unwrap();
while let Some(record) = reader.read_next().unwrap() {
    println!("{}: {} bp", record.name, record.seq.len());
}

Structs§

FastaReader
Sequential reader for FASTA format files.
FastaRecord
A FASTA record containing sequence name and nucleotide sequence.
FastqReader
Generic FASTQ reader supporting any Read source.
FastqRecord
A FASTQ record containing sequence name, nucleotide sequence, and quality scores.

Enums§

FastqFile
Auto-detecting FASTQ file reader.