You are right.I was supposed to write using bcftools to call variants.
I am trying to filter variant calls from bcftools based on genotype quality.I have tried using vcftools and GATK.I don't get any output except for the header or none of the records are filtered.Here the commands and the outputs I get.
VCFtools,gives no error but retains all records
~/vcftools_0.1.9/cpp/vcftools --vcf xxx.var.flt.vcf --out xxx_filtered --minGQ 20.0
GATK SelectVariants, gives no error but gives only the header in the output file
java -Xmx2g -jar ~/GenomeAnalysisTKLite-2.1-8-gbb7f038/GenomeAnalysisTKLite.jar -R xxx -T SelectVariants --variant xxx.var.flt.vcf -o xxx.vcf -select "GQ >= 20"
GATK VariantFiltration, gives no error but retains all records
java -Xmx2g -jar ~/GenomeAnalysisTKLite-2.1-8-gbb7f038/GenomeAnalysisTKLite.jar -R xxx -T VariantFiltration --variant xxx.var.flt.vcf -o xxx.vcf --genotypeFilterExpression "GQ >= 20" --genotypeFilterName "qual_1_filters"
Any help would be appreciated.
1 answer
This might be a silly question, but are you supplying these tools with a VCF? You mention using Samtools for variant calling, and I assume you mean that you are using bcftools to call variants, and are using its VCF output as input for these three tools?
Log in to answer this question.
I think you'll need to specify the GQ filter accurate to the floating point, like 20.0 for GATK variant filters
Tried using floating point values as well but it doesn't work.
Are you checking if the filter field in the VCF is getting modified post Variant filtration? You will likely need to use SelectVariants to get the variants that pass the filtering.
I guess the problem with vcftools is with the version.My vcf files are version 4.1 but vcftools supports v4.0.Variant filtration seems to work fine adding FT tag in the format field.Select variants still doesn't seem to work
I might just extract the records having FT tag using awk from the filtered vcf file I get from Variant filtration.I guess all this can be done with a simple script that parses the initial vcf file.Thanks for all the help.
How did you fix the vcftools command?
I'm facing the same problem with minGQ, even though I'm using v0.1.11 of vcftools.
I seem to have the same problem when I try to use vcftools - or I have completely missunderstood how the filter is supposed to work.
I'm using vcftools 0.1.12a (latest available 20140701) and the options
--minGQ --recodeto try and filter out genotypes from a VCF file. My impression was that this would leave those site-individual combinations blank - only.:.:.:.:.:.:.:.and so on. But the file is unchanged.Do I use this function the wrong way or is there something else amiss?
The option
--minQworks as expected.Hi Kssr, could you maybe give us an update on if this problem was solved? Thank you!