Run STACKS
sstacks
module inside R!
Inside the P
folder (where the ustacks and the cstacks files are),
you should have:
3 Catalog files: the files created in
cstacks
and usually looking like this:
batch_1.catalog.alleles.tsv.gz,
batch_1.catalog.snps.tsv.gz,
batch_1.catalog.tags.tsv.gz
3 files for each samples: The sample name is the prefix of
the files ending with:
.alleles.tsv.gz, .snps.tsv.gz, .tags.tsv.gz
.
Those files are created in the
ustacks
module.
run_sstacks( P = "06_ustacks_2_gstacks", M = NULL, sample.list = NULL, c = "06_ustacks_2_gstacks", parallel.core = parallel::detectCores() - 1, o = "06_ustacks_2_gstacks", x = FALSE, disable.gapped = FALSE, v = FALSE, h = FALSE )
P | (character) Path to the directory containing STACKS files.
Contrary to sstacks,
this argument can be use with |
---|---|
M | (character) Path to a population map file from which to take sample
names (this argument won't work if |
sample.list | This is for the |
c | (character, path) Path to the catalog.
Default: |
parallel.core | (Integer) Enable parallel execution with num_threads threads.
Default: |
o | output path to write results.
Default: |
x | Don't verify haplotype of matching locus.
Default: |
disable.gapped | Disable gapped alignments between stacks.
Default: |
v | Print program version.
Default: |
h | Display this help messsage.
Default: |
sstacks
returns a .matches.tsv.gz file for each sample
.
If lnl_dist = TRUE
, the function will also return a
summary of catalog loci log-likelihood.
Computer or server problem during the sstacks ? Just launch again the same command, the function will start again, but only with the unmatched samples!
Some argument can't be use together:
Don't use these arguments together: M
and sample.list/c
.
You can't add samples to an existing catalog using a population map.
If you want to match new samples to an existing catalog, very easy,
just add the samples in the folder and let run_sstacks
function find
the samples that were not matched to the catalog.
Catchen JM, Amores A, Hohenlohe PA et al. (2011) Stacks: Building and Genotyping Loci De Novo From Short-Read Sequences. G3, 1, 171-182.
Catchen JM, Hohenlohe PA, Bassham S, Amores A, Cresko WA (2013) Stacks: an analysis tool set for population genomics. Molecular Ecology, 22, 3124-3140.