Skip to content

FastqParser

Mojo struct 🡭

@memory_only
struct FastqParser[R: Reader, config: ParserConfig = ParserConfig(262144, 1073741824, False, False, False, Optional(None))]

Unified FASTQ parser over a Reader.

  • R (Reader)
  • config (ParserConfig)
  • buffer (BufferedReader[R])
  • quality_schema (QualitySchema)
  • validator (Validator)

AnyType, ImplicitlyDestructible, Movable

def __init__(out self, var reader: R)

Args:

  • reader (R)
  • self (Self)

Returns:

Self

Raises:

def __init__(out self, var reader: R, quality_schema: String)

Args:

  • reader (R)
  • quality_schema (String)
  • self (Self)

Returns:

Self

Raises:

def __init__(out self, var reader: R, batch_size: Int, schema: String = "generic")

Args:

  • reader (R)
  • batch_size (Int)
  • schema (String)
  • self (Self)

Returns:

Self

Raises:

def has_more(self) -> Bool

Args:

  • self (Self)

Returns:

Bool

def next_view(mut self) -> FastqView[MutExternalOrigin]

Args:

  • self (Self)

Returns:

FastqView

Raises:

def next_view_memchr_seq(mut self) -> FastqView[MutExternalOrigin]

Benchmark-only variant that scans record boundaries via sequential memchr.

Args:

  • self (Self)

Returns:

FastqView

Raises:

def next_record(mut self) -> FastqRecord

Args:

  • self (Self)

Returns:

FastqRecord

Raises:

def next_record_memchr_seq(mut self) -> FastqRecord

Benchmark-only variant that scans record boundaries via sequential memchr.

Args:

  • self (Self)

Returns:

FastqRecord

Raises:

def next_batch(mut self, max_records: Int = 4096) -> FastqBatch

Args:

  • self (Self)
  • max_records (Int)

Returns:

FastqBatch

Raises:

def views(ref self) -> _FastqParserViewIter[R, config, origin_of(self)]

Args:

  • self (Self)

Returns:

_FastqParserViewIter

def records(ref self) -> _FastqParserRecordIter[R, config, origin_of(self)]

Args:

  • self (Self)

Returns:

_FastqParserRecordIter

def batches(ref self, max_records: Optional[Int] = None) -> _FastqParserBatchIter[R, config, origin_of(self)]

Args:

  • self (Self)
  • max_records (Optional)

Returns:

_FastqParserBatchIter