If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra

Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.

Refering to genotype-level variables in VariantEval

yfarjounyfarjoun Broad InstituteDev ✭✭✭
edited December 2012 in Ask the GATK team

While running VariantEval, I'm trying to stratify by a JexlExpression by setting using

-ST Sample -ST JexlExpression -select "GQ>20"

This fails with a "variable does not exist" error despite the GQ existing in all genotypes in the vcf. Looking at the code it seems that the pathway that loads the JexlExpression in the VariantEval class specifically does not provide the genotype as context (only the VariantContext) and thus, the context for the Jexl does not include GT and the error is produced.

My question is: Is this a feature or a bug? It seems possible to add the genotype (when the VC only has one, or loop over the genotypes and either OR or AND the results (perhaps another input similar to -isr?), but perhaps I'm missing something subtle?

Would you like this behavior or are you happy with the current operation of jexlExpression?



  • mmterpstrammterpstra NetherlandsMember ✭✭
    edited December 2013

    maybe you can specify for each "sample":
    -ST Sample -ST JexlExpression -select "vc.getGenotype('sample').hasAttribute('GQ') && vc.getGenotype('sample').getAttribute('GQ')"
    Although I did not test this myselfs and the vc.getGenotype('sample').hasAttribute('GQ') && " part is optional. this is a test for undefined values.

    Good luck!

Sign In or Register to comment.