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.

#### ☞ Did you remember to?

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.

GATK 3.7 is here! Be sure to read the Version Highlights and optionally the full Release Notes.

# variantFiltration using PL numbers on multisample VCF file

Member

Dear all,

I want to use GATK to filter a multisample VCF based on the PL numbers but I cannot figure out how to do this.
I want to flag genotypes that are likely to be homozygous reference (with the aim of removing these eventually). I would like to look at the PL field and if the first PL number (which refers to the probability of a homozygous reference call) is 10 or less, flag these genotypes.

The variant Filtration page is quite helpful and suggests accessing arrays using things like:

but this is not quite what I want, as I want the filtering to be genotype based (not variant based) and I don't want to base the filtering on a single sample but on each sample separately. Basically I am looking for something like this:

--genotypeFilterExpression "PL.0 > 10"

where PL/0 is the first number of the PL array. I cannot figure out anywhere a way to do this. Can someone suggest a recipe to achieve this?

Tagged:

Hi Vincent,

I don't think we've run into this use case before, so I'm not sure this is actually possible. We're planning to put together a "cookbook" of filtering expressions, so I'll put this on the list of requested use cases. But in the meantime I'm afraid you'll need to experiment on your own, unless someone in the community can jump in with an idea.

• Member, Dev

This is not something I've tested myself, but the Genotype class does include a getPL() method that's analogous to getAD(). So a very minor modification of the example you found should work: vc.getGenotype("NA12878").getPL().0 > 10`.

Note that this is at the genotype, not variant, level. You have direct access to the variant (via 'vc'), and can then look up each individual genotype separately through the getGenotype() method

• Member

Thank you both.

pdxheimer's solution looks close to what I want but I am probably missing something obvious, I apologize in advance.
How do I apply the same line of command not on a specific sample (like "NA12878") but instead for each sample to every relevant entry my VCF (something like vc.getGenotype(currentSample) or something like this).

Geraldine: I suspect my query has been addressed before but I don't know where to look. I am looking for the Proba( genotype != homozygous reference), because I don't want to filter out PL fields like 100,3,0 (for which, if I am not mistaken, GQ is 3). In other words, as long as it is not reference homozygous I am interested. Seems generic enough, but I could not find it.