For de novo analyses, this program will pull in paired-end reads, if available, assemble the paired-end contig and merge it with the single-end locus, align reads to the locus, and call SNPs. For reference-aligned analyses, this program will build loci from the single and paired-end reads that have been aligned and sorted.

Program Options

De novo mode:

gstacks -P stacks_dir -M popmap

Reference-based mode:

gstacks -P stacks_dir -M popmapgstacks -I bam_dir -M popmap [-S suffix] -O out_dir
gstacks -P stacks_dir -M popmapgstacks -B bam_file [-B ...] -O out_dir

For both modes:

Model options:

Advanced options: (De novo mode)

Advanced options: (Reference-based mode)

Example Usage

  1. Processing single-end or paired-end data, de novo.

    Your Stacks directory should look similar to this, where the tags/snps/alleles/matches files were produced by the core pipeline (ustacks/cstacks/sstacks) and the matches.bam files were produced by tsv2bam:

    % ls stacks/ sample_1020.alleles.tsv.gz sample_1069.alleles.tsv.gz sample_1086.alleles.tsv.gz sample_1095.alleles.tsv.gz sample_1020.matches.tsv.gz sample_1069.matches.tsv.gz sample_1086.matches.tsv.gz sample_1095.matches.tsv.gz sample_1020.matches.bam sample_1069.matches.bam sample_1086.matches.bam sample_1095.matches.bam sample_1020.snps.tsv.gz sample_1069.snps.tsv.gz sample_1086.snps.tsv.gz sample_1095.snps.tsv.gz sample_1020.tags.tsv.gz sample_1069.tags.tsv.gz sample_1086.tags.tsv.gz sample_1095.tags.tsv.gz

    % gstacks -P ./stacks -M ./popmap -t 8

  2. Processing single or paired-end data, reference aligned.

    Your Stacks direcotry should look similar to this, where sample reads have been aligned and sorted by a standard aligner, such as bwa:

    % ls aligned/ sample_1020.bam sample_1069.bam sample_1086.bam sample_1095.bam

    % gstacks -I ./aligned -O ./stacks -M ./popmap -t 8

  3. Given paired-end, single-digest data that is reference aligned, perhaps you want to exclude PCR duplicates.

    % gstacks -I ./aligned -O ./stacks -M ./popmap --rm-pcr-duplicates -t 8

Other Pipeline Programs

Raw Reads


Execution control