Hi all! It's my first post in SeqAnswers forum. This site is awesome !
I'm struggling with a .vcf file that I'm trying to filter based on QUAL and DP fields. When I apply the filter and check if everything went well, I find that there are many variations that have not been filtered.
I've used this command for generating and filtering the file:
samtools mpileup -uf hg19.fa myfile.bam | bcftools view -bvcg - > var.raw.bcf
bcftools view var.raw.bcf | /usr/share/samtools/vcfutils.pl varFilter -D500 > myfile.vcf
cat myfile.vcf | vcf-annotate --filter Qual=30/MinDP=20 > myfile_filtered.vcf
Here is a fragment of my file after being filtered. I've narrowed it for brevity:
#CHROM POS ID REF ALT QUAL FILTER INFO
chr1 237993724 . C T 86 . DP=14;VDB=0.00(...)
chr1 237996076 . C G 158 . DP=166;VDB=0.0955(...)
chr1 237996661 . C G 3.54 . DP=31;VDB=0.0792(...)
chr1 237997087 . A G 225 . DP=220;VDB=0.0955(...)
chr1 237997254 . C T 108 . DP=255;VDB=0.0733(...)
chr3 8775457 . G A 44 PASS DP=50;VDB=0.0656(...)
As you can see the first entry shoudn't pass the filter because the DP field is under the filter value, and the third entry has a bad quality. The others although meet the filter specifications are not tagged with a “PASS” label.
I'm pretty sure that there isn't any problem with the vcf file before being filtered and I've been unable to find a threat with an issue like this... any help would be much appreciated.
Thanks in advance!
I'm struggling with a .vcf file that I'm trying to filter based on QUAL and DP fields. When I apply the filter and check if everything went well, I find that there are many variations that have not been filtered.
I've used this command for generating and filtering the file:
samtools mpileup -uf hg19.fa myfile.bam | bcftools view -bvcg - > var.raw.bcf
bcftools view var.raw.bcf | /usr/share/samtools/vcfutils.pl varFilter -D500 > myfile.vcf
cat myfile.vcf | vcf-annotate --filter Qual=30/MinDP=20 > myfile_filtered.vcf
Here is a fragment of my file after being filtered. I've narrowed it for brevity:
#CHROM POS ID REF ALT QUAL FILTER INFO
chr1 237993724 . C T 86 . DP=14;VDB=0.00(...)
chr1 237996076 . C G 158 . DP=166;VDB=0.0955(...)
chr1 237996661 . C G 3.54 . DP=31;VDB=0.0792(...)
chr1 237997087 . A G 225 . DP=220;VDB=0.0955(...)
chr1 237997254 . C T 108 . DP=255;VDB=0.0733(...)
chr3 8775457 . G A 44 PASS DP=50;VDB=0.0656(...)
As you can see the first entry shoudn't pass the filter because the DP field is under the filter value, and the third entry has a bad quality. The others although meet the filter specifications are not tagged with a “PASS” label.
I'm pretty sure that there isn't any problem with the vcf file before being filtered and I've been unable to find a threat with an issue like this... any help would be much appreciated.
Thanks in advance!
Comment