Compare Traces to Reference
Grade a plate of Sanger reads against the sequences they were meant to be. Every read is aligned to a reference, the differences are voted on column by column, and each difference is reported with its coverage, its confidence, and what it does to the protein.
| Reached by | Tools → Compare Traces to Reference |
| Formats | .ab1 .abi .scf .ztr reads · FASTA GenBank .csv .xlsx references · FASTA out TSV out |
| Sample project | Batch Sanger screen · Compare to reference · Reverse-strand read check |
What it does
Sequencing a construct gives you a handful of reads, each covering part of it, each unreliable at both ends, and each possibly from a different clone or a different construct on the same plate. This tool turns that pile into one answer: which positions genuinely differ from the sequence you expected, and how much you should believe each one.
Three things happen in order. Each read is matched to the reference it belongs to and to the strand it was read on. Every read is then aligned to that reference and the alignments are merged into a single column frame, so column 412 means the same position in every read. Finally each column is voted on, and the vote is deliberately conservative: a difference is accepted into the consensus only when every read that covers it agrees. Two reads out of three carrying a substitution is not enough — the reference is kept and the disagreement is reported as reduced confidence.
That last rule is the point of the whole tool. A majority vote over noisy Sanger data calls heterozygous positions and dye blobs as mutations. Requiring unanimity means a reported variant is one you can act on.
When you'd use this
Used in: Clone an insert into a vector, and prove it worked · Design a CRISPR guide, check where else it binds, and measure the edit you got · Align a set of homologues and build a tree from it
You have picked colonies, sent them for sequencing, and got a folder of traces back. You want to know which clones are correct and, for the ones that are not, what went wrong.
The route is: open the traces → compare to your reference → read the variant table → open any suspicious position in the chromatogram. If a position looks wrong, the trace beneath it tells you whether it is a real base change or a bad call, which is a judgement no algorithm should make for you.
Use Sequencing Verification instead when you only want a pass/fail per read against one construct. Use Multiple Sequence Alignment when your sequences are a family and no one of them is the reference. Use the Chromatogram editor when you are working on a single trace rather than grading a set.
What this computes
Per column of the alignment
- A consensus call by unanimity: reads that cover the column and are not masked vote, a difference from the reference is accepted only if every voter agrees, and otherwise the reference is kept and the confidence falls
- Confidence as the fraction of covering reads backing the call, and coverage as how many reads have a base there at all — reported separately, because a read covering 40 % of a reference can be 100 % identical over what it covers
- A mixed-peak flag, raised when at least two reads call a double peak at that column, or when the single read covering it does
- Uncovered positions reported as uncovered, never as agreement
Per variant
- The Sequence Ontology consequence — synonymous, missense, stop gained, in-frame insertion or
deletion, frameshift — ranked by severity, and
non-codingwhere the position is outside a coding feature rather than given an invented codon call - In-frame versus frameshift decided over the whole indel RUN, not at a single column, so a clean three-base deletion is an in-frame deletion instead of a false frameshift on correct data
- Codons read in the gene's own frame and strand. A GenBank
complement(...)annotation is honoured, so a change that is silent on one strand is not reported as the consequence it would have on the other - Ambiguity codes resolved rather than discarded:
CTNis unambiguously leucine and is reported as synonymous;TTNis genuinely unknown and is reported as unknown - Insertions in their own columns with their own labels (
412a,412b), so an insertion is never merged into the base beside it
Across the whole run
- Read-to-reference assignment, by the identifier in the file name first and by best alignment in both orientations otherwise — and the panel says which of the two it used for each read
- The overview strip's three lanes: per-column identity, per-column coverage, and the count of accepted variant calls per bucket. The third is not a re-reading of the first: identity asks whether the reads agreed, the variant lane asks how many differences the vote accepted. When there are more columns than pixels each bucket reports its worst identity and coverage rather than an average, because a single bad column inside a conserved block is the thing you are looking for
- Differing positions, coverage and identity as three numbers that move together when the low-quality mask is turned on — which is what a quality gate is supposed to look like
Where it lives
Tools → Compare Traces to Reference, or the command palette. It opens as its own tab: the variant table on the left, the aligned base view beneath it, and the inspector on the right.
The three surfaces are synchronised both ways. Selecting a row in the variant table scrolls the aligned view to that column and selects it on every track; clicking a residue on the canvas highlights the matching table row. Reads that came from trace files carry their chromatogram under their bases, lined up column for column, so you can see the peaks behind a call without leaving the tab.
Inputs and outputs
Reads are trace files (.ab1, .abi, .scf, .ztr) and any other sequences in the project. Trace reads bring their per-base Phred scores and their mixed-peak calls with them; plain sequences are compared on their bases alone.
References come from either a sequence file or a spreadsheet:
- A FASTA or GenBank reference is the richer choice. GenBank carries real coding-sequence annotations, including which strand a gene is on, so the consequences you get are the ones for the gene as it is actually translated.
- A
.csvor.xlsxreference table — two columns, an identifier and a sequence — is the convention batch Sanger tools use, and it is how you supply many references at once. Columns are read by position, so a sheet whose header saysName, Seqstill works; an unexpected header is a warning, not a refusal. A table row carries no annotations, so the whole row is treated as one coding sequence starting at base 1, and the panel says so, because that assumption decides every codon consequence.
Outputs: a variant report (TSV) carrying the call, confidence, coverage and mixed-peak flags; the consensus as FASTA; and the consensus as a new project, with gaps and uncovered positions removed.
The tool refuses rather than guessing. A project with no usable reference says which formats it accepts. A reference with no reads matched to it says so and tells you which control to turn off. Positions no read covers are reported as uncovered, not as agreement.
Worked example
Open the Batch Sanger screen sample: eight real mongoose COI reads and the seven-reference spreadsheet they belong to.
Opened cold, the tab compares all eight reads to the first reference and reports 79 differing positions at 99.65% identity. That number is misleading, and usefully so: six of those reads are of a different gene. Press Match reads to references and each read finds its own — seven by the identifier in its file name, one (urva_javanica, which names no reference) by alignment score, and four of them flagged as matching on the reverse strand. Tick Only matched reads and the same reference now reports 2 differing positions over the two reads that actually belong to it, with the Effect column showing real codon calls instead of cross-gene noise.

The same table of references is supplied here in both containers the tool reads — example_sheet.xlsx and example_sheet.csv. Switch between them in the inspector: every number is identical, which is the quickest way to satisfy yourself that the reader is not the thing deciding your result.
Switch the reference to 6_codon_deletion and you get the case worth understanding: a clean three-base deletion, reported as an in-frame deletion, not a frameshift.
Controls
Reference table — which sheet to read, and which of its records to compare against. Switching records recomputes everything.
Match reads to references — assigns each read a reference and a strand, and shows the assignment per read with the reason: name when the reference identifier appears in the read's file name, score when it was decided by alignment. A ⟲ marks a read matched on the reverse strand. Only matched reads then restricts the comparison to the reads that belong to the selected reference. It is off by default, because dropping rows from your data is not something a tool should do without being asked.
Genetic code — which translation table the codon consequences use.
Read quality — two thresholds, answering different questions. Minimum Phred masks any individual base below a score. End trim finds where a read becomes readable, scanning in from each end until three consecutive bases clear the threshold, and masks everything outside. Sanger reads are unreliable at both ends by construction, so trimming by run rather than per base is what stops a noisy tail voting. A masked base becomes an N, and an N never votes and never counts as coverage. Off by default: you should see what the files say before you see what a filter says.
The overview strip
Above the aligned reads is a strip spanning the whole alignment, whatever the canvas is scrolled to, carrying three lanes:
- Identity — the fraction of covering rows that agree at each column. A solid block is a conserved stretch; a notch is a column where the reads disagree with each other.
- Coverage — how many rows actually have a base there, so a gappy region is visible as a dip rather than as an unexplained drop in identity.
- Variants — how many accepted calls fall in each bucket, with the total in the legend.
The third lane is not a re-reading of the first. Identity asks did the reads agree; the variant lane asks how many differences the vote accepted, which is a decision about your construct rather than a property of the alignment. A column where one read of six differs is 83% identical and possibly one variant — and only the count says whether such columns cluster. Clustered calls are usually one event (a mis-primed stretch, a real indel throwing the frame); scattered singletons across a low-identity region are usually noise.
The strip is decimated when there are more columns than pixels, and each bucket reports its worst identity and coverage rather than an average — a single bad column inside a conserved block is exactly what you are looking for, and averaging hides it. Click anywhere on the strip to select that column and scroll the canvas to it.
The science
Matching reads to references. The identifier in a file name is used first — it is an assertion by whoever named the plate, and it is usually right. Only when no reference name appears in the read's name is the assignment made by aligning the read to every reference, forwards and reverse-complemented, and taking the best score. Both are shown, because the two carry different confidence and you should be able to tell them apart.
The consensus vote. At each column, reads that cover it and are not masked cast a vote. A difference from the reference is accepted only on unanimity; otherwise the reference is kept and the confidence falls. A position is flagged as mixed when at least two reads call a double peak there, or when the single read covering it does. Insertions get their own columns and their own labels (412a, 412b), so an insertion is never silently merged into the base beside it.
Consequences. Each coding change is reported with its Sequence Ontology term — synonymous, missense, stop gained, in-frame insertion or deletion, frameshift — ranked by severity. The distinction between an in-frame indel and a frameshift is made over the whole insertion or deletion run, not at a single column, because a clean three-base deletion is an in-frame deletion and calling it a frameshift is a false alarm on correct data.
Ambiguity codes are resolved, not discarded. A codon like CTN is unambiguously leucine, since all four CTx codons are; TTN is genuinely unknown. Treating both as unknown would report a silent change as missense wherever a reference carries an ambiguity code — and real references do.
Correctness here is checked against the published tools rather than asserted: the consensus, mutation typing and coverage arithmetic are verified column for column against the reference implementation this method comes from, the codon translations against Biopython over every possible ambiguous codon in each genetic code, and the read-to-reference assignment against the same tool over its own published example set.
Shared with other tools: Read quality compares how every tool that does this chooses its method.
Strands
A coding region annotated on the minus strand is read in its own frame, not in the reference's. That matters because the same substitution means different things on the two strands: a change that is silent read one way can create a stop codon read the other. Where your reference records the strand — a GenBank complement(...) annotation does — the consequence you see is the one for the gene as it is actually translated.
A reference supplied as a spreadsheet carries no strand information: the whole row is read as one coding sequence from base 1, forwards. Supply a GenBank reference if your gene runs the other way.
Read orientation is handled separately and automatically: every read is aligned in both directions and the better alignment is used, so a reverse-strand read needs no preparation from you.
See it on both strands at once
Open the Reverse-strand read check sample: the complete mitochondrial genome of a Eurasian goshawk, with four of the real Sanger reads that assembled it. A vertebrate mitogenome is the tidiest possible demonstration, because twelve of its thirteen protein-coding genes run one way and exactly one — ND6 — runs the other.
- Set the genetic code to
2 — Vertebrate Mitochondrial. The record declares it itself, and it is not the default. Every consequence in the table depends on this: mitochondria readTGAas tryptophan where the standard code reads it as a stop, so leaving it on1 — Standardinvents stop codons that are not there. - Find the rows around position 17,279. They sit inside ND6, which the record annotates
complement(16968..17486). The Effect column reads synonymous — a codon call made in ND6's own frame, reading the minus strand. Before the reference's strand was honoured these positions could only be reported as an untypedsequence variant. - Scroll up to the rows near 14,400. These are inside CYTB, a plus-strand gene, in the same run: frameshifts, a missense, synonymous changes. Both frames are being read correctly at the same time, each in its own direction.
- Look at the rows in between, from about 14,900 to 16,900. That is the control region — non-coding — and every row there reads non-coding. A tool that gave those a codon call would be making one up.

- Click position 17,279. The inspector shows the call in full: reference
A, consensusA, reference kept — reads disagree, 50% confidence over one read, consequencesynonymous_variant, and the two reads that cover it — one callingAat Q41, one callingTat Q5. That last number is the answer to whether this is a real variant. - Now turn on
Mask low-quality bases. The disagreement at 17,279 disappears, because it was a Q5 call: the differing positions fall from 78 to 1, coverage drops from 18.6% to 16.9%, and identity rises to 99.97%. Watch all three numbers move together — that is what a quality gate is supposed to look like.
This sample is also the honest limit of what one clean dataset can show. These four reads assembled the reference, so they agree with it almost everywhere, and all three of the ND6 differences happen to be synonymous whichever frame you read them in. The demonstration that the frame itself is right is not this sample — it is that the strand path is checked against the reference implementation over every coding case in its published test set.
Pitfalls
- A plate is not one construct. If your references are a spreadsheet of several sequences, match the reads before reading any number off the table. Comparing everything to whichever record happens to be selected produces a confident, precise, meaningless answer — 79 differences where there are 2.
- Identity without coverage is not a result. A read covering 40% of the reference can be 100% identical over what it covers. Read the coverage figure and the coverage gaps beside the identity.
- Confidence below 100% is information, not noise. It means the reads disagreed. That is usually a mixed population or a bad call, and the chromatogram beneath the column is where you settle it.
- Turn the quality gate on deliberately. Raising the threshold makes disagreement disappear, which looks like a cleaner result and is really less evidence. Coverage drops at the same time — watch both numbers move together, and treat a difference that vanishes at Q20 as a bad call rather than a solved question.
- A spreadsheet reference gives you frame-from-base-1. If your row is not a coding sequence starting at its first base, the Effect column is answering a question you did not ask.
Export
The variant report as TSV, with the accepted call, confidence, coverage and mixed-peak columns. The consensus as FASTA, or as a new project you can keep working on — gaps and uncovered positions are removed, since a project sequence has to be a real sequence.
Related
Feeds from the Chromatogram editor (trim and correct a read first, if you want to). Hands off to the consensus as a new project, which any cloning tool will then accept.
In this group: Chromatogram · Map reads to a reference · Fragment analysis · Alignment · Variant Calls · Population genetics: allele frequencies, Hardy–Weinberg, Fst, linkage disequilibrium · RNA-seq: differential expression with DESeq2, over-represented gene sets, gene set enrichment · Multiple Sequence Alignment · Sequencing Verification · Screen for vector contamination
Multiple Sequence Alignment
Align a set of sequences and read the result as an alignment you can navigate: per-sequence identity, column conservation, and the scores that quantify the alignment.
Sequencing Verification
Answer the question a sequencing result is meant to answer: does this clone match the intended construct.