remove listed singletons from vcftools output
1
1
Entering edit mode
21 months ago
QPaps04 ▴ 100

Hello all,

I would like to remove any singletons/doubletons from my vcf file.

I can find all the singletons/doubletons using: vcftools --vcf file.vcf --singletons --out file

This output file.singletons which has this information: CHROM POS SINGLETON/DOUBLETON ALLELE INDV

I thought I could extract the POS column from the file.singletons, remove the header and use as follow:

vcftools --vcf file.vcf --exclude file.singletons --recode --recode-INFO-all --out final_vcf

However this does not seem to remove any SNPs from the .vcf file. Is there anyway I can remove the SNPs listed in the .singletons file?

Thank you all for your help in advance

vcftools sequencing genome next-gen • 996 views
ADD COMMENT
4
Entering edit mode
20 months ago
QPaps04 ▴ 100

If anyone is having a similar problem - I found the solution! Instead of using --exclude flag use the --exclude-positions flag for vcftools. Make sure you take the 1st and second column of the --singletons output.

ADD COMMENT

Login before adding your answer.

Traffic: 2005 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6