Skip to content
Basecalling, alignment and deconvolution of Sanger Chromatogram trace files
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
docker updated readme Jul 11, 2018
src report missing basecalls Apr 15, 2019
.gitmodules idxgen Jun 14, 2018
LICENSE Initial commit Jun 14, 2018
Makefile json lib Jan 14, 2019 update readme Apr 2, 2019

install with bioconda Anaconda-Server Badge Build Status Docker Build GitHub license GitHub Releases GitHub Issues

Installing Tracy

The easiest way to get Tracy is to download a statically linked binary from the Tracy release page or to download Tracy from Bioconda. Building from source is also possible:

git clone --recursive

cd tracy/

make all

make install

Tracy requires some system libraries such as bzip2, zlib and boost. For Ubuntu Linux you install these using:

apt-get install -y build-essential g++ cmake zlib1g-dev libbz2-dev liblzma-dev libboost-all-dev

The Mac OSX versions of these packages are:

brew install cmake zlib readline xz bzip2 gsl libtool pkg-config boost

For Mac OSX you also often need to set the library path to HTSlib.

cd tracy/

export DYLD_LIBRARY_PATH=pwd/src/htslib/

Running Tracy

tracy -h

Basecalling a Trace File

To get the primary sequence (highest peak) of a trace file in FASTA or FASTQ format.

tracy basecall -f fasta -o out.fasta input.ab1

tracy basecall -f fastq -o out.fastq input.ab1

To get full trace information, including primary and secondary basecalls for heterozygous variants.

tracy basecall -f tsv -o out.tsv input.ab1

Alignment to a Fasta Slice

Alignment of a trace file to a FASTA reference slice.

tracy align -f align -o out.align -g ref_slice.fa input.ab1

Alignment to an indexed reference genome

Alignment to a large reference genome requires a pre-built index on a bgzip compressed genome.

tracy index -o hg38.fa.fm9 hg38.fa.gz

samtools faidx hg38.fa.gz

Once the index has been built you can align to the indexed genome.

tracy align -g hg38.fa.gz input.ab1

Separating heterozygous variants

Double-peaks in the Chromatogram can cause alignment issues. Tracy supports deconvolution of heterozygous variants into two separate alleles.

tracy decompose -g hg38.fa.gz -f align -o outprefix input.ab1

The two alleles are then separately aligned.

cat outprefix.align1 outprefix.align2

You can also use a wildtype chromatogram for decomposition.

tracy decompose -g wildtype.ab1 -f align -o outprefix mutated.ab1

SNV & InDel Variant Calling and Annotation

Tracy can call and annotate variants with respect to a reference genome.

tracy decompose -v -a homo_sapiens -g hg38.fa.gz -f align -o outprefix input.ab1

This command produces a variant call file in binary BCF format. It can be converted to VCF using bcftools.

bcftools view outprefix.bcf

Using forward & reverse ab1 files to improve variant calling

If you do have forward and reverse trace files for the same expected genomic variant you can merge variant files and check consistency of calls and genotypes.

Forward trace decomposition:

tracy decompose -f align -o forward -a homo_sapiens -g hg38.fa.gz forward.ab1

Reverse trace decomposition:

tracy decompose -f align -o reverse -a homo_sapiens -g hg38.fa.gz reverse.ab1

Left-alignment of InDels:

bcftools norm -O b -o forward.norm.bcf -f hg38.fa.gz forward.bcf

bcftools norm -O b -o reverse.norm.bcf -f hg38.fa.gz reverse.bcf

Merging of normalized variant files:

bcftools merge --force-samples forward.norm.bcf reverse.norm.bcf

Trace assembly

If you tiled a genomic region with multiple chromatogram files you can assemble all of these with tracy. The assemble method supports a reference-guided and a de novo assembly.

tracy assemble file1.ab1 file2.ab1 fileN.ab1

tracy assemble -r <reference.fa> file1.ab1 file2.ab1 fileN.ab1


In case of questions feel free to send us an email.

You can’t perform that action at this time.