Filtering Variant Calls Based On Genotype Quality
1
2
Entering edit mode
12.1 years ago
Kssr ▴ 110

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.

variant calling filtering • 8.2k views
ADD COMMENT
0
Entering edit mode

I think you'll need to specify the GQ filter accurate to the floating point, like 20.0 for GATK variant filters

ADD REPLY
0
Entering edit mode

Tried using floating point values as well but it doesn't work.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

java -Xmx4g -jar ~/GenomeAnalysisTKLite-2.1-8-gbb7f038/GenomeAnalysisTKLite.jar -T SelectVariants -R xxx --variant xxx_filtered_qual1.vcf -select 'vc.hasAttribute("FT")' -o xxx_qual20.vcf

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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 --recode to 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 --minQ works as expected.

ADD REPLY
0
Entering edit mode

Hi Kssr, could you maybe give us an update on if this problem was solved? Thank you!

ADD REPLY
2
Entering edit mode
12.1 years ago

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?

ADD COMMENT
0
Entering edit mode

You are right.I was supposed to write using bcftools to call variants.

ADD REPLY

Login before adding your answer.

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