Converter tool

Sanger AB1 Trace Analyzer

Open .ab1 sequencing traces, trim by quality, find mixed peaks, align to a reference to list variants, and join forward and reverse reads.

Input

Trace files

Sanger AB1 Trace Analyzer

Operator: Abdulla Al Fahad. How tools are built and checked

A Sanger sequencing reaction comes back as a chromatogram: four coloured traces, a string of base calls under them, and a quality value for each call. The sequence alone hides what an experienced eye catches at once, such as a messy first 30 bases, a dye blob, or a position where two peaks sit on top of each other because the template was a mix.

This page opens .ab1 files, shows the trace with the calls and their quality bars, trims the poor ends and marks the positions where a second peak of a stated size sits under the called base. It can align the trimmed read to a reference you paste and list every substitution and indel, and it can join a forward and a reverse read into one sequence.

A whole plate can be loaded at once for a summary table of read length, Q20 and Q30 bases, trimmed fraction and mixed sites per well. It is a research tool: a mixed site is a prompt to look at the trace, not a genotype.

Key features

  • ABIF .ab1 files, one or up to 96 at a time, with sample name, instrument, dye order and run date
  • A chromatogram view of 40 bases at a time with the called base, a quality bar for each, trimmed bases dimmed and mixed sites shown with their IUPAC letter
  • Quality trimming by the modified Mott algorithm with an adjustable error cutoff
  • Mixed-peak detection from the height of the second channel relative to the called one, with IUPAC codes R, Y, S, W, K and M
  • Reverse complement of a read, with the traces reversed and the channels exchanged, and single-base edits with undo
  • Alignment of the trimmed read to a pasted reference on either strand, with a list of substitutions, insertions and deletions
  • Joining a forward read to the reverse complement of a reverse read, with the higher-quality base chosen where they differ

What an ab1 file holds and how it is read

An ABIF file starts with the four bytes ABIF and a version number, followed by a directory of 28-byte entries. Each entry names a tag and a number, gives a type, an element size, a count and a data size, and points to where the data sits; data of four bytes or fewer is stored in the pointer field itself. The page reads the processed traces DATA 9 to 12, in the base order named by the FWO_ tag (for example GATC), the called bases PBAS, their positions PLOC and their qualities PCON, plus the sample name, instrument and run date.

Every offset and count is checked against the file length before it is used, a directory of more than 5,000 entries is refused, and each trace may hold at most 400,000 samples. Files up to 30 MB are read. Text taken from the file, such as the sample name, has control characters removed before it is shown or written to an export.

A damaged or truncated file gives a clear message instead of a crash. In tests, 400 files with bytes changed or cut off either parsed or were refused with an ordinary error each time.

SCF files are not read, and the page does not make a PDF report; use the CSV, FASTA and FASTQ exports.

How it works

Trimming follows the algorithm that Biopython's abi-trim uses. Each base scores the cutoff (0.05 by default) minus its error probability 10^(−Q/10). The scores accumulate with the running total held at zero or above, the kept region starts where the total first becomes positive and ends where it reaches its maximum. Reads of 20 bases or fewer are not trimmed.

A site is marked as mixed when the strongest other channel has a true local maximum within three samples of the called base's peak and at least the chosen fraction of its height (0.3 by default), and the called peak is at least 100 signal units high. The called base and the second one give the IUPAC letter. Only bases in the trimmed region are examined.

The alignment gives the read a score of +2 for a match, −3 for a mismatch and −5 for a gap, with the reference free at both ends, and is tried on both strands. Joining reads uses an overlap alignment of the forward read with the reverse complement of the reverse read; where they differ, the base with the clearly higher quality wins, and two confident disagreeing bases become an IUPAC code.

When this helps

  • A student checking a cloned plasmid trims a forward read from 480 to 463 bases, aligns it to the expected insert and sees no difference.
  • A researcher amplifies exon 4 from a cell line and finds a single mixed site at base 221, W in IUPAC, then opens the trace to see whether the second peak is a clean A under the T.
  • A core-facility technician loads a 96-well plate and sorts the summary table by Q20 bases to find the wells that failed.
  • A user with a forward and a reverse read of a 700-base amplicon joins them: the 156 bases covered by both give two independent calls for the middle of the sequence.

Opening a file

  1. Drop the .ab1 files, or load the example pair, and pick the trace to look at.
  2. Check the mean quality and the number of mixed sites in the cards under the chromatogram, and scroll through the read with the slider.
  3. Adjust the trim cutoff or the mixed-peak ratio if the defaults trim too little or flag too much.
  4. Paste a reference to align the read, or choose a second file to join with the first.
  5. Download the trimmed FASTA or FASTQ, the alignment text, the contig or the plate summary.

Example

The page's example pair: a simulated forward read of 480 bases with a second peak at 45% height under base 221, a simulated reverse read of 420 bases, and a 720-base reference

Trim cutoff 0.05, mixed-peak ratio 0.3, minimum height 100. Join example_F with example_R.

Results

Forward read: bases 5 to 467 kept (463 of 480), Q20 bases 455, mean quality 43.0
Mixed site: base 221, called T with A beneath at 0.46 of its height, IUPAC W
Reverse read: 403 of 420 bases kept
Contig: 710 bases, 156 aligned in both reads, 0 disagreements
Alignment of the forward read to the reference: no differences

Tips for best results

  • Lower the trim cutoff to 0.01 for a stricter trim when a read has a long ragged tail; raise it to keep more bases from a good read.
  • Reverse-complement a read before aligning it if you want its trace in the orientation of the reference. The page also tries the other strand by itself, and tells you which one matched.
  • A mixed-peak ratio of 0.2 finds weaker second peaks and more false ones; check each in the chromatogram before trusting it.
  • Read the quality bars rather than the average: a read with mean Q 43 can still have a short bad stretch in the middle where a variant call would be unreliable.
  • Edit a base only after checking the trace. An edit changes the called base in the exports but keeps the original quality, which is a reminder that it was made by hand.

Limits

Dye blobs around base 70 to 80 and poor starts in the first 30 bases give mixed or wrong calls. Trimming usually removes the start, but a blob inside the kept region can look like a mixed site.

A mixed site can be a heterozygote, a mixed template, a primer with a second binding site or a pull-up from a very strong neighbouring peak. The page cannot tell them apart.

The alignment is global for the read and free for the reference, so a read that only partly overlaps the reference gets a poor score and may be refused.

This page is not a clinical tool. Variant reports for patients need validated software, review and often confirmation by a second method.

Common errors and how to fix them

This is not an ABIF (.ab1) file: the first four bytes are not "ABIF".
Check the file type; SCF, FASTA and PDF files have different headers, and a renamed text file is refused.
The analysed trace DATA9 for base G is missing or unreadable.
The file lacks processed traces. Export the trace again from the sequencer software with the analysed data included.
The directory points outside the file; the file is truncated or damaged.
The upload or copy was cut short. Fetch the file again from the instrument or the core facility.
The read does not align to the reference on either strand.
Check that the reference is the right gene or insert and that it covers the region sequenced; a score under 30% of a perfect match is refused.

Best practices

  • Look at every mixed site and every variant in the chromatogram before reporting it.
  • Sequence both strands where a variant matters, so each position has two independent reads.
  • Keep the original .ab1 files; trimmed FASTA and FASTQ files do not contain the traces.

Frequently asked questions

Were the file reader and the trimming checked?

An ABIF file built with known contents is read back with the same bases, peak positions, qualities and trace values. The trim was checked by hand on a read of 6 poor bases, 40 of Q30 and 10 of Q8, which keeps bases 7 to 45 as the algorithm's definition requires. The alignment finds an inserted triplet, a deleted triplet and a substitution at the right positions, and the join recovers 400 bases from reads of 260 and 200 that overlap by 60. No comparison with Biopython's own test files was run.

Why does the page trim fewer bases than my sequencer software?

Sequencer software differs in its algorithm and cutoff. This page applies the modified Mott method with an error cutoff of 0.05 by default, and a lower cutoff trims harder.

Does it read the secondary peaks from the file's own base calls?

No. It looks at the processed traces directly and does not use any mixed-base calls the sequencer wrote into PBAS.