We've moved!
This site is now read-only. You can find our new documentation site and support forum for posting questions here.
Be sure to read our welcome blog!

Filtering Variants using the Format Column + JEXL Oddities

ericco92ericco92 Cambridge, UKMember ✭✭

Hi Team,
I have a VCF which I'd like to filter by variant frequency. The problem is, my frequencies are percentages rather than decimals. Is there a workaround in JEXL which allows it to parse the '%' operator as a percentage (or ignore it entirely) rather than considering the field a string upon seeing the modulo operator?
The VCF also has two columns in the format column (a normal and a tumor). Is it possible to drill down into these using just the genotypeFilterExpression/genotypeFilterName flags or must do something else?

Eric T Dawson

Best Answer


  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi Eric,

    I'm not aware of any such workaround. At the risk of sounding naive, why not just convert your percentages to decimals? As workarounds go that's pretty trivial.

    Regarding the genotypeFilterExpression/genotypeFilterName, it depends what you want to do, but sure, you can filter on those too. We don't currently provide much guidance to doing so, however, so you'll need to experiment on your own, or appeal to others in the community for help...

  • ericco92ericco92 Cambridge, UKMember ✭✭

    Hey Geraldine,

    I considered converting to decimals but figured I'd ask if there was a workaround first. I've got about 9000 files to work with and didn't want to risk breaking things. Guess I'll have to trust my sed skills after all.

    I'll play around with it and hope for the best. Thanks for the help!!

Sign In or Register to comment.