Heads up:
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
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.
We will be out of the office for a Broad Institute event from Dec 10th to Dec 11th 2019. We will be back to monitor the GATK forum on Dec 12th 2019. In the meantime we encourage you to help out other community members with their queries.
Thank you for your patience!

Using Picard FilterSamReads with Java filters

I'm planning to use Picard FilterSamReads with FILTER=includeJavascript for some of my bamouts with --emitDroppedReads, and, to be frank, I still have no idea as for how that Javascript works. For example, if I use a script like this to identify reads that are not dropped by the caller:

function filterEmittedDroppedReads (record) { var ft = record.getAttribute("FT"); if (ft==null) { return true; }else { return false; } }

Yet FilterSamReads reports 0 reads passed the filter. I'm quite sure there's something wrong in my Javascript, but what can it be?


Issue · Github
by Sheila

Issue Number
Last Updated
Closed By

Best Answer


  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hi @johnma, I haven't used the JS expressions myself yet, so I'm not super familiar with the syntax. I think @lindenb is the one who added this functionality, perhaps he can help you. To aid in the process, could you show a test example of reads that you expect to pass the filter?

Sign In or Register to comment.