remove listed singletons from vcftools output
1
2
Entering edit mode
4.0 years ago
QPaps04 ▴ 140

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 • 2.7k views
ADD COMMENT
6
Entering edit mode
4.0 years ago
QPaps04 ▴ 140

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
0
Entering edit mode

Just wanted to say thank you for following up like this! It helped me just now :)

ADD REPLY

Login before adding your answer.

Traffic: 2971 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