Stacks is a software pipeline for building loci from short-read sequences, such as those generated on
the Illumina platform. Stacks was developed to work with restriction enzyme-based data, such as RAD-seq, for the
purpose of building genetic maps and conducting population genomics and phylogeography.
Stacks Pipeline
Genetic Maps
Stacks can be used to generate mappable markers from RAD-seq data. Thousands of markers
can be generated from a single generation, F1 map as well as markers for traditional F2 and
backcross designs. Stacks can export data to JoinMap, OneMap, or R/qtl. These data can be used for
examining genomic structure as well as assembling genomic assemblies.
Population Genomics
Stacks can be used to identify SNPs within or among populations. Stacks provides tools to generate
summary statistics and to compute population genetic measures such as FIS and π within populations
and FST between populations, allowing for genome scans. Data can be exported in
VCF format and for use in programs such as
STRUCTURE or GenePop.
Phylogenetics
Stacks can be used to identify SNPs fixed within and variable among populations.
These SNPs can be exported to Phylip format which
can be fed into any standard phylogenetics package.
|
Getting started with Stacks
Frequently Asked Questions
|
The Stacks pipeline is designed modularly to perform several different types of analyses. Programs listed
under Raw Reads are used to clean and filter raw sequence data. Programs under Core represent the main Stacks
pipeline -- building loci (ustacks or pstacks), creating a catalog of loci (cstacks, and matching samples back against
the catalog (sstacks), followed by assignment of genotypes (genetic mapping) or population genomics analysis. Programs
under Execution Control will run the whole pipeline, followed by a number of Utility programs for things such as
building paired-end contigs.
Raw Reads
|
Core
|
Execution control
|
Utilities
|
The process_radtags program examines raw reads from an Illumina sequencing run and
first, checks that the barcode and the restriction enzyme cutsite are intact (correcting minor errors).
Second, it slides a window down the length of the read and checks the average quality score within the window.
If the score drops below 90% probability of being correct, the read is discarded. Reads that pass quality
thresholds are demultiplexed if barcodes are supplied.
The process_shortreads program performs the same task as process_radtags
for fast cleaning of randomly sheared genomic or transcriptomic data. This program will trim reads that are below the
quality threshold instead of discarding them, making it useful for genomic assembly or other analyses.
The clone_filter program will take a set of paired-end reads and reduce them according to PCR
clones (a PCR clone is a pair of reads that match exactly, while paried-end reads from two different DNA molecules will
nearly always be slightly different lengths).
The kmer_filter program allows paired or single-end reads to be filtered according to the
number or rare or abundant kmers they contain. Useful for both RAD datasets as well as randomly sheared genomic or
transcriptomic data.
The ustacks program will take as input a set of short-read sequences and align them into
exactly-matching stacks. Comparing the stacks it will form a set of loci and detect SNPs at each locus using a
maximum likelihood framework.
The pstacks program will extract stacks that have been aligned to a reference genome by a
program such as Bowtie or GSnap and identify SNPs at each locus using a maximum likelihood framework.
A catalog can be built from any set of samples processed
by the ustacks program. It will create a set of consensus loci, merging alleles together. In the case
of a genetic cross, a catalog would be constructed from the parents of the cross to create a set of
all possible alleles expected in the progeny of the cross.
Sets of stacks constructed by the ustacks
or pstacks programs can be searched against a catalog produced by the cstacks program. In the case of a
genetic map, stacks from the progeny would be matched against the catalog to determine which progeny
contain which parental alleles.
This populations program will compute population-level summary statistics such
as π, FIS, and FST. It can output site level SNP calls in VCF format and
can also output SNPs for analysis in STRUCTURE or in Phylip format for phylogenetics analysis.
The genotypes program exports Stacks data as a set of observed haplotypes, or with
the haplotypes encoded into genotypes, in either a generic format or for a particular linkage mapper such as
JoinMap, OneMap, or R/QTL. It also provides methods for making automated corrections to certain types of loci.
The denovo_map.pl program executes each of the Stacks components to create a genetic
linkage map, or to identify the alleles in a set of populations. It also handles uploading data to the database.
The ref_map.pl program takes reference-aligned input data and executes each of the Stacks
components, using the reference alignment to form stacks, and identifies alleles. It can be used in a genetic map
of a set of populations. It also handles uploading data to the database.
The load_radtags.pl program takes a set of data produced by either the denovo_map.pl or
ref_map.pl progams (or produced by hand) and loads it into the database. This allows the data to be generated on
one computer, but loaded from another. Or, for a database to be regenerated without re-executing the pipeline.
The index_radtags.pl program indexes the database to speed execution in the web interface
and enable web-based filtering after all of the data has been loaded. It will be run by
denovo_map.pl or ref_map.pl at the end of execution.
The export_sql.pl program provides for the export of all of the Stacks data in a compact form.
For each locus, the script reports the consensus sequence, the number of parents and progeny that Stacks could find the
locus in, the number of SNPs found at that locus and a listing of the individual SNPs and the observed alleles, followed
by the particular allele observed in each individual. The script allows you to specify a number of filters for the data,
the same filters as available through the web interface.
The sort_read_pairs.pl program collates paired-end sequences for each catalog locus, creating
a FASTA file of paired-reads for each catalog locus. These FASTA files can then be assembled to make paired-end contigs.
The exec_velvet.pl program will execute Velvet on the collated set of reads generated by
sort_read_pairs.pl.