This module provides quality-based sequence trimming functionality.
Used by abi2fq and abimerge to trim low-quality regions from DNA sequences using a sliding window approach.
Procs
proc trimSequence(sequence: string; qualities: seq[int]; windowSize: int; threshold: int): tuple[seq: string, qual: seq[int]] {. ...raises: [], tags: [], forbids: [].}
-
Trims low-quality regions from the beginning and end of a sequence.
Uses a sliding window approach to identify regions where the average quality score is below the threshold.
Parameters: sequence: The DNA sequence to trim qualities: Quality scores for each base in the sequence windowSize: Size of the sliding window for quality assessment threshold: Quality threshold (bases with qualities below this are trimmed)
Returns: A tuple containing the trimmed sequence and its quality values
Source Edit