Each simulated read is assigned a random per-base error probability, converted to a Phred quality score, exactly as sequencers report base-call confidence. Reads with quality below the QC threshold are discarded before alignment, mirroring real read-trimming steps (e.g. Trimmomatic, fastp).
Surviving reads are aligned to a 40-base reference track and given a random mismatch count. Reads within the mismatch tolerance align cleanly (green); reads exceeding it are mismatch candidates (orange). A genomic position is only called as a variant once enough independent reads disagree with the reference at that position — the same minimum-depth-support rule real variant callers such as GATK or bcftools apply.
Q = -10 * log10(P_error) // Phred quality
pass QC if Q >= Q_min
align OK if mismatches <= tolerance
call variant at position p
if supportingMismatchedReads(p) >= 3 // min depth support
- Spawn rate — throughput of new reads entering the pipeline (reads/s).
- QC threshold — minimum Phred quality Q_min a read must clear to pass filtering.
- Mismatch tolerance — max mismatches allowed before a read is flagged as a variant candidate.
- Pause / Reset — freeze the pipeline or clear all counters and in-flight reads.
This mirrors a real short-read pipeline: FASTQ reads → quality trimming → reference alignment → variant calling → VCF output.