Stacks

cstacks

A catalog can be built from any set of samples processed by the ustacks or pstacks programs. 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.

Program Options

cstacks -P in_dir -M popmap [-n num_mismatches] [--gapped] [-p num_threads] [-b batch_id]
cstacks --aligned -P in_dir -M popmap [-p num_threads] [-b batch_id]
cstacks -s sample1_path [-s sample2_path ...] -o path [-n num_mismatches] [--gapped] [-p num_threads] [-b batch_id]
cstacks --aligned -s sample1_path [-s sample2_path ...] -o path [-p num_threads] [-b batch_id]

Gapped assembly options:

Advanced options:

Example Usage

Here we specify the output directory to write the catalog, and then each sample we want to add to the catalog (one -s option for each sample). Here we are allowing up to four, fixed nucleotide differences between loci that we are trying to incorporate into the catalog and we are using 15 threads to speed up the sequence-matching process between loci:

% cstacks -b 1 -o ./stacks -s ./stacks/f0_male -s ./stacks/f0_female -n 4 -p 15

Here we specify the directory containing all our Stacks output files from ustacks, and then provide a population map, which contains all of the individual samples we want to add to the catalog within it (see here for information on population maps):

% cstacks -P ./stacks -M ./popmap -n 4 -p 15

This example is similar to the previous one, except in this case the data is aligned to the reference genome and the Stacks files were generated by pstacks (-n does not apply to aligned data):

% cstacks -P ./stacks -M ./popmap --aligned

In this example, we start with a pre-existing catalog to which we want to add additional samples, and we want to allow/incorporate gaps between the sample and catalog loci:

% cstacks -b 1 -o ./stacks --catalog ./stacks/batch_1 -s ./stacks/sample_37 -s ./stacks/sample_38 -s ./stacks/sample_39 -n 4 --gapped -p 12

Other Pipeline Programs

Raw Reads

Core

Execution control

Utilities