Question: how to filter vcf file based on sample DP? vcf tools does not work
1
gravatar for Ana
2.0 years ago by
Ana140
Ana140 wrote:

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?

sample dp vcf-filtering • 2.6k views
ADD COMMENTlink written 2.0 years ago by Ana140
2

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 REPLYlink modified 2.0 years ago • written 2.0 years ago by iraun3.5k

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 REPLYlink written 2.0 years ago by Petr Ponomarenko2.6k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2401 users visited in the last hour