The current GATK version is 3.7-0
Examples: Monday, today, last week, Mar 26, 3/26/04

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

You can opt in to receive email notifications, for example when your questions get answered or when there are new announcements, by following the instructions given here.

#### ☞ Got a problem?

1. Search using the upper-right search box, e.g. using the error message.
3. Include tool and Java versions.
4. Tell us whether you are following GATK Best Practices.
5. Include relevant details, e.g. platform, DNA- or RNA-Seq, WES (+capture kit) or WGS (PCR-free or PCR+), paired- or single-end, read length, expected average coverage, somatic data, etc.
6. For tool errors, include the error stacktrace as well as the exact command.
7. For format issues, include the result of running ValidateSamFile for BAMs or ValidateVariants for VCFs.
8. For weird results, include an illustrative example, e.g. attach IGV screenshots according to Article#5484.
9. For a seeming variant that is uncalled, include results of following Article#1235.

#### ☞ Formatting tip!

Wrap blocks of code, error messages and BAM/VCF snippets--especially content with hashes (#)--with lines with three backticks (  ) each to make a code block as demonstrated here.

Picard 2.10.4 has MAJOR CHANGES that impact throughput of pipelines. Default compression is now 1 instead of 5, and Picard now handles compressed data with the Intel Deflator/Inflator instead of JDK.
GATK version 4.beta.2 (i.e. the second beta release) is out. See the GATK4 BETA page for download and details.

# Filtering on allele balance by sample using jexl

Member

Hello,

I would like to filter my variants using the SelectVariants walker but it throws an error when I try to filter on allele balance by sample. The jexl expression I use is:

vc.getGenotype("sample").getAB()>=0.25

error is:
unknown, ambiguous or inaccessible method getAB

Is there any way of filtering on this parameter?

Best wishes,

Kath

Tagged:

• Member

Hmm, but I can select variants based on other annotations in the genotype field eg. PL, and DP.

• Member, Dev

The issue here is that you're directly accessing the Genotype object that the data are stored in, and calling Java methods on that object. Several are predefined, like getPL(), getDP(), getAD(), etc. But there is no getAB(). It's possible the getExtendedAttribute() method will do what you want - I think your JEXL will look like: vc.getGenotype("sample").getExtendedAttribute("AB") > 0.25

There may be some issues with type conversion here, and I don't know how to force a type in JEXL. If that doesn't work for you, try vc.getGenotype("sample").getAttributeAsDouble("AB", 0.0) > 0.25` - this method is marked Deprecated, but I think it will force the conversion for you. The extra 0.0 is a default value in case the annotation doesn't exist