Gatk: How To Filter Variant Based On Genotype Quality (Gq)
1
1
Entering edit mode
11.8 years ago

Hi, I would like to extract variants for on sample only if its genotype quality (GQ) is above cutoff.

I have tried this:

$pathToGATK \ 
  -T SelectVariants \ 
  -R ref \ 
  --variant inVCF \ 
  -sn mylib \ 
  -select "vc.getGenotype('mylib').GQ > 10.0" \ 
  --selectTypeToInclude SNP \ 
  --out outVCF

Unfortunately, this command outputs absolutely no variant (the VCF header is ok). No error message occured. Is some one could help me?

Fred

gatk • 7.4k views
ADD COMMENT
4
Entering edit mode
11.8 years ago

As far as I understand, the GATK function getGenotype returns a java object 'Genotype':

https://github.com/broadgsa/gatk/blob/139c6b84a15d4318fd59f4c4c7922c628e4cc336/public/java/src/org/broadinstitute/sting/utils/variantcontext/Genotype.java

The class contains a function: getPhredScaledQual()

can you try

-select "vc.getGenotype('mylib').getPhredScaledQual() > 10.0" \
ADD COMMENT
0
Entering edit mode

Thanks a lot Pierre,

It works fine now !

Reading the source code can help obvously...

FB

ADD REPLY
0
Entering edit mode

please , flag my answer as "answered".

ADD REPLY
0
Entering edit mode

Pierre, I don't find the way to flag your answer.

ADD REPLY
0
Entering edit mode

on the left side of my answer, under the number of votes. You must be logged. :-)

ADD REPLY
0
Entering edit mode

merci ! :-)

ADD REPLY

Login before adding your answer.

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