Skip to main content

Module normalise

Module normalise 

Source
Expand description

Parallel normalisation of raw records into fixed-width rows of canonical residues.

Every sequence byte is classified through the alphabet’s ByteClassTable: residues become their upper-case canonical letter (T/U folded), every other column becomes 0 (it excludes the k-mers that contain it), whitespace is skipped (D37), a NUL byte is a structural error (D38) and unknown characters follow the validation mode (D3). Each record must have exactly as many alignment columns as the first (D36). Records are processed in parallel chunks and the results merged in input order, so statistics, examples and the first error are deterministic.

Structs§

NormalisedBatch
The result of normalising one batch.
Normaliser
Normalises batches for one alphabet, alignment width and header format.
SequenceStats
Character and whitespace statistics of sequence lines, mergeable in input order.

Functions§

count_columns
Number of alignment columns in a sequence: every byte except line feeds and whitespace.
describe_byte
Printable description of a byte for messages: 'J' (0x4A) or 0xC3.