Skip to main content

Module pack

Module pack 

Source
Expand description

Base/quality packing and trusted four-line FASTQ pack paths.

The high-level FASTQ readers expose borrowed records. This module provides the lower-level side-channel representation used when downstream code wants packed two-bit bases, ambiguity masks, and Phred+33 summaries without allocating an owned record per read. Base and quality packing utilities.

Bases are packed four per byte using A=0, C=1, G=2, and T=3. Ambiguous or non-canonical bases are represented by zero bits in the packed byte stream and a set bit in the separate ambiguity mask. Quality helpers interpret input as Phred+33 FASTQ qualities.

Structs§

BaseSummary
Summary of a packed DNA sequence.
PackedRecordSummary
Combined base and quality summary for one FASTQ record.
PackedSequence
Packed sequence bytes plus one bit per ambiguous/non-ACGT base.
QualitySummary
Phred+33 quality summary.
TrustedPackSlab
Progress notification for one trusted pack slab.
TrustedPackedPair
Borrowed view of one trusted packed R1/R2 pair.
TrustedPackedRecord
Borrowed view of one trusted packed FASTQ record.

Enums§

PackBuffer
Output buffer involved in a packing error.
PackError
Error returned by base or quality packing helpers.
PackKernel
Selected implementation family for base packing.
PackedBase
Decoded base value from a packed sequence.

Traits§

TrustedPackSink
Callback interface for trusted streaming pack paths.

Functions§

bin_qualities_into
Bin Phred+33 qualities into threshold indexes.
bin_qualities_into_slice
Bin Phred+33 qualities into a caller-provided output slice.
bit_mask_len
Return the number of bytes needed for a one-bit-per-item mask.
is_masked
Return whether index is marked ambiguous in an ambiguity mask.
pack_bases
Pack a sequence into newly allocated packed-base and ambiguity buffers.
pack_bases_and_summarize_qualities_into
Pack bases and summarize Phred+33 qualities into reusable buffers.
pack_bases_into
Pack a sequence into reusable Vec buffers and return base counts.
pack_bases_into_slices
Pack a sequence into caller-provided fixed-size slices.
pack_trusted_fastq
Pack all complete records from an in-memory trusted four-line FASTQ buffer.
pack_trusted_fastq_direct
Pack an in-memory trusted FASTQ buffer with the direct scanner.
pack_trusted_fastq_direct_sink
Pack an in-memory trusted FASTQ buffer with the direct scanner into a sink.
pack_trusted_fastq_read
Stream trusted four-line FASTQ from a reader and invoke a callback per record.
pack_trusted_fastq_read_direct
Stream trusted FASTQ from a reader using the direct scanner.
pack_trusted_fastq_read_direct_sink
Stream trusted FASTQ from a reader using the direct scanner into a sink.
pack_trusted_fastq_read_sink
Stream trusted four-line FASTQ from a reader into a sink.
pack_trusted_fastq_sink
Pack all complete records from an in-memory trusted FASTQ buffer into a sink.
pack_trusted_paired_fastq_read
Stream ordered R1/R2 FASTQ inputs and emit trusted packed pairs.
packed_base_at
Decode one base at index from packed-base and ambiguity buffers.
packed_base_len
Return the number of bytes needed to store base_count two-bit bases.
selected_pack_kernel
Return the base-packing kernel selected for this build and host.
summarize_qualities
Summarize a slice of Phred+33 quality bytes.