how to filter vcf file based on sample DP? vcf tools does not work
0
1
Entering edit mode
4.0 years ago
Ana ▴ 180

I have faced with a problem in filtering my vcf file, I am quite stuck. I have tried several options but none of them worked out. I want to do filtering at the "sample level" and keep only those with DP >=10. I have tried in VCFtools --minDP flag and --maxDP are not working!

I have tried all of these codes, non of them working

vcftools --vcf myfile.vcf  --minDP 10 --recode --out out_1.vcf

bcftools filter --soft-filter 'FMT/%DP>10' my.file.vcf`

does anyone has any solution for this problem?

vcf-filtering sample DP • 6.0k views
ADD COMMENT
2
Entering edit mode

You can take a look to this thread: VCF filtering by depth

For other hand, SnpSift is a great tool for filtering VCF files. In your case the command would be: cat variants.vcf | java -jar SnpSift.jar filter "( DP > 10)" > filtered.vcf

ADD REPLY
0
Entering edit mode

Could you please explain what do you mean by saying " I want to do filtering at the "sample level" and keep only those with DP >=10." ?

Preferably with several lines of input and desired output as examples. So far I am not sure what do you want. Thank you

ADD REPLY

Login before adding your answer.

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