pub fn apply_errors(
model: &impl ErrorModel,
bases: &mut [u8],
read_end: ReadEnd,
rng: &mut impl Rng,
) -> (usize, Vec<u8>)Expand description
Apply sequencing errors to a read’s bases in place using the given error model, returning the number of errors and quality scores (Phred+33).
For each base position:
- Look up error probability and base quality from the model
- If a random draw < error probability, substitute a random different base
- Assign a quality score by adding noise to the base quality
Returns (n_errors, quality_scores).