Fastx
Constants
Base normalization runs once per input byte. Lookup tables avoid repeated branch checks and keep this hot path small.
Class methods
Converts a UInt8 array (ASCII codes) to a DNA string.
Converts a UInt8 array (ASCII codes) to a DNA string.
Converts a slice of Phred scores to a quality string.
Converts an array of Phred scores to a quality string.
Converts an array of Phred scores to a quality string.
Converts a DNA sequence (Bytes or String) to a UInt8 slice,
where each base is encoded as a single byte.
When iupac is true, supports IUPAC nucleotide codes (R, Y, S, W, K, M, B, D, H, V).
When iupac is false, only standard bases (A, C, G, T, N) are preserved.
Non-recognized characters are converted to N (78u8).
This representation is suitable for byte-wise or array processing.
Converts a DNA sequence (Bytes or String) to a UInt8 slice,
where each base is encoded as a single byte.
When iupac is true, supports IUPAC nucleotide codes (R, Y, S, W, K, M, B, D, H, V).
When iupac is false, only standard bases (A, C, G, T, N) are preserved.
Non-recognized characters are converted to N (78u8).
This representation is suitable for byte-wise or array processing.
Converts a quality sequence (Bytes) to an array of Phred scores.
Converts a quality string to an array of Phred scores.
Normalizes a single base character to uppercase. When iupac is true, supports IUPAC nucleotide codes (R, Y, S, W, K, M, B, D, H, V). When iupac is false, only standard bases (A, C, G, T, N) are preserved. Non-recognized characters are converted to N (78u8).
Opens a FASTA/FASTQ file with automatic format detection or explicit format. Yields the appropriate Reader/Writer to the block and automatically closes it.
Opens a FASTA/FASTQ file with automatic format detection or explicit format. Returns the appropriate Reader/Writer instance (manual close required).