Expand description
Fragment extraction and read base generation.
Handles extracting genomic fragments from haplotypes, reverse-complement operations, adapter sequence appending for short fragments, and R1/R2 base extraction from fragments.
§Lowercase-as-marker convention
crate::fasta::Fasta::load_contig stores bases resolved from IUPAC
ambiguity codes (including N) in lowercase, while real A/C/G/T
bases remain uppercase. Reads that carry those synthesized bases through
from the reference can be detected by counting lowercase bytes via
lowercase_fraction, and the buffers are upper-cased in place with
uppercase_in_place before being emitted.
Structs§
- Fragment
- A simulated fragment extracted from a haplotype.
Functions§
- extract_
fragment - Extract a fragment from a haplotype at a given position and strand.
- extract_
read_ bases - Extract read bases from a fragment, handling adapter sequences for short fragments.
- lowercase_
fraction - Fraction of lowercase ASCII bytes in
bases. - reverse_
complement - Reverse-complement a DNA sequence in place.
- uppercase_
in_ place - Upper-case every ASCII letter in
basesin place.