Entering edit mode
7.7 years ago
Ana
▴
200
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?
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
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