POPULATIONS Unable to Read Whitelists Produced in VCFtools

52 views
Skip to first unread message

Jack Dirck

unread,
Apr 16, 2025, 6:07:27 PMApr 16
to Stacks
Hi all!

I am using STACKS (v2.65 ) and VCFtools (v0.1.16) to filter my SNP dataset of 480 individuals (329 after filtering for missing data). I assembled the loci de novo in the STACKS pipeline. I filtered missing data iteratively in PLINK and used lists of removed loci and individuals as blacklists in populations. 

I switched to filtering in VCFtools for minor allele count and depth filtering. I would stick with VCFtools but I would like to use the --write-single-snp command in populations for LD pruning. However, I am running into problems when moving from VCFtools to populations. My strategy has been to filter in VCFtools, use the --kept-sites command to make make whitelists for populations to use. However, every time I do this populations fails to remove any loci not on the whitelist even though it reads it properly. I understand that VCFtools and populations number loci differently and I have modified my whitelists accordingly but that does not work either. I know the formatting is correct for my whitelists and populations does not have an issue parsing the files. 

Any ideas on what might be going on? Thank you!

Cheers,
Jack Dirck

Code and log files attached below: 
filt_miss_loci0.2_indy0.25_mind5_maxd19_keptsites.log
populations.snps.p.log
April_16_filt.txt
populations.snps.p.log_min_1.log

Catchen, Julian

unread,
Apr 17, 2025, 4:20:53 PMApr 17
to stacks...@googlegroups.com

Hi Jack,

 

You didn’t include a subset of your whitelist, so I could not evaluate its format. A couple points: once you export the data as a VCF file of SNPs, it is no longer associated with its RAD locus, so you cannot use --write-single-snp when you import, since Stacks sees all the VCF-imported SNPs as independent loci. You can, however, export the data with --write-single-snp prior to doing your filtering. Second, in Stacks v2.67 we exposed a minimum depth filter, which you can use directly in populations with --min-gt-depth.

 

Best,

 

Julian

Jack Dirck

unread,
Apr 22, 2025, 5:53:35 PMApr 22
to Stacks
Hi Julian,

Thank you so much for your feedback. I think that cleared it up

Thank you!

Cheers,
Jack

Reply all
Reply to author
Forward
0 new messages