I am new to stacks for analyzing RAD-Seq data, I have run all the modules. I will like to know to get the total SNP from my sample after running the population module. Is there a command line to use and inside which file?


populations -P -M (denovo output) (popmap) -t 5 --vcf --fasta-samples --fasta-loci -O (pop-output) -r 0.8 -p 5




Based on the newly provided command (which has --vcf), there should be a VCF file with suffix .vcf in the output directory.

Original answer

It's pretty hard to answer without more information. For example, it's helpful to link to the software and the module that you are working from (I had never heard of Stacks). What do you mean by "total SNP"? Also, what is the actual command that you ran? There are a lot of possible options!

But (based only on reading the docs for the command), it looks like there are a variety of formats in which the SNP data can be output:

File output options:
--ordered-export — if data is reference aligned, exports will be ordered; only a single representative of each overlapping site.
--fasta-loci — output locus consensus sequences in FASTA format..
--fasta-samples — output the sequences of the two haplotypes of each (diploid) sample, for each locus, in FASTA format.
--vcf — output SNPs and haplotypes in Variant Call Format (VCF).
--genepop — output results in GenePop format.
--structure — output results in Structure format.
--radpainter — output results in fineRADstructure/RADpainter format.
--plink — output genotypes in PLINK format.
--hzar — output genotypes in Hybrid Zone Analysis using R (HZAR) format.
--phylip — output nucleotides that are fixed-within, and variant among populations in Phylip format for phylogenetic tree construction.
--phylip-var — include variable sites in the phylip output encoded using IUPAC notation.
--phylip-var-all — include all sequence as well as variable sites in the phylip output encoded using IUPAC notation.
--treemix — output SNPs in a format useable for the TreeMix program (Pickrell and Pritchard).

I would suggest examining the command that you used, specifically what you passed as the output format. Here are the example commands from the docs:

populations -P dir -b batch_id [-O dir] [-M popmap] (filters) [--fstats] [-k [--window_size=150000] [--bootstrap [-N 100]]] (output formats) 
populations -V vcf -O dir [-M popmap] (filters) [--fstats] [-k [--window_size=150000] [--bootstrap [-N 100]]] (output formats)

Can you track down what you specified as output? That will contain the SNP data / genotypes.

Possibly you will need to rerun the command while specifying a different, preferred format.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.