FastqParser
Mojo struct 🡭
FastqParser
Section titled “FastqParser”@memory_onlystruct FastqParser[R: Reader, config: ParserConfig = ParserConfig(262144, 1073741824, False, False, False, Optional(None))]Unified FASTQ parser over a Reader.
Parameters
Section titled “Parameters”- R (
Reader) - config (
ParserConfig)
Fields
Section titled “Fields”- buffer (
BufferedReader[R]) - quality_schema (
QualitySchema) - validator (
Validator)
Implemented traits
Section titled “Implemented traits”AnyType, ImplicitlyDestructible, Movable
Methods
Section titled “Methods”__init__
Section titled “__init__”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:
has_more
Section titled “has_more”def has_more(self) -> BoolArgs:
- self (
Self)
Returns:
Bool
next_view
Section titled “next_view”def next_view(mut self) -> FastqView[MutExternalOrigin]Args:
- self (
Self)
Returns:
FastqView
Raises:
next_view_memchr_seq
Section titled “next_view_memchr_seq”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:
next_record
Section titled “next_record”def next_record(mut self) -> FastqRecordArgs:
- self (
Self)
Returns:
FastqRecord
Raises:
next_record_memchr_seq
Section titled “next_record_memchr_seq”def next_record_memchr_seq(mut self) -> FastqRecordBenchmark-only variant that scans record boundaries via sequential memchr.
Args:
- self (
Self)
Returns:
FastqRecord
Raises:
next_batch
Section titled “next_batch”def next_batch(mut self, max_records: Int = 4096) -> FastqBatchArgs:
- self (
Self) - max_records (
Int)
Returns:
FastqBatch
Raises:
def views(ref self) -> _FastqParserViewIter[R, config, origin_of(self)]Args:
- self (
Self)
Returns:
_FastqParserViewIter
records
Section titled “records”def records(ref self) -> _FastqParserRecordIter[R, config, origin_of(self)]Args:
- self (
Self)
Returns:
_FastqParserRecordIter
batches
Section titled “batches”def batches(ref self, max_records: Optional[Int] = None) -> _FastqParserBatchIter[R, config, origin_of(self)]Args:
- self (
Self) - max_records (
Optional)
Returns:
_FastqParserBatchIter