Skip to content

Why snipe

The usual way to judge a sequencing run’s quality is to align its reads to a reference and run an alignment-based QC tool such as qualimap — coverage, depth, a per-chromosome breakdown, GC bias, error rate. It works, but it means running an aligner, producing and storing a BAM, and paying for all of it in time and disk.

snipe reports the same class of quality metrics — and more — without aligning a single read. It sketches the reads into compact edgemer signatures and compares them against a reference sketch. The result is alignment-free QC: coverage and depth (including per chromosome), error and mutation rates, contamination and ploidy signals — the numbers you’d normally read off an alignment, produced from a sketch.

What makes alignment-free QC possible: the edgemer

Section titled “What makes alignment-free QC possible: the edgemer”

The thing that lets a sketch answer QC questions — not just “which sequences resemble which” — is the edgemer, a k-mer pair. It couples a base k-mer (K1) with a slightly longer extended k-mer (K2) that wraps K1 on both sides: K1 sits in the centre of K2, flanked by (k2 − k1) / 2 bases on the left and the same on the right. By default k1 = 51 and k2 = 53, an extension length of 2 (one base each side).

ACGTGACCTGAGTCAG◀ extext ▶K1 · base k-mer (centre)K2 · extends K1 by (k2−k1)/2 on each sideedgemer = (K1, K2) pair
K1 is the base k-mer; K2 wraps it, extending by (k2−k1)/2 bases on each side. The pair is the edgemer.

When a K1 matches the reference but its K2 extension differs from the reference’s expected one, that mismatch marks a base change. Abundance separates the two kinds: a mismatch seen once (a singleton) is usually a sequencing error — a random miscall; one seen repeatedly (a polyton) is usually a true mutation.

ACGTGACCTTAGTCAG◀ extext ▶K1 · base k-mer (centre)K2 · extension could not be formedFAILED_K2 → K1 too close to a read end
A distinct edge case: a K1 near a read's end whose K2 cannot be formed — tagged FAILED_K2_HASH, counted separately from a K2 that forms but mismatches the reference.

These two mismatch counts drive snipe’s sequencing_error_rate (singletons) and mutation_rate (polytons); together with the match totals they give basepair_change_rate. A plain k-mer set cannot make this distinction — a k-mer seen once and a k-mer seen a thousand times are the same element, and an error looks identical to a mutation. The edgemer adds the field that separates them, and that is what lets snipe do QC from a sketch.

Equivalent metrics, plus what an alignment doesn’t give you

Section titled “Equivalent metrics, plus what an alignment doesn’t give you”

Against a reference sketch, snipe reports the coverage and depth you’d read off an alignment — overall and per chromosome — plus edgemer-only signals: the error-vs-mutation split above, contamination estimates, and ploidy / sex-chromosome checks. Same questions an alignment-based QC pass answers — how deep, how clean, how good is this run, and where — extended with information the pair exposes that an alignment does not.