Notice:
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.
Attention:
We will be out of the office on October 14, 2019, due to the U.S. holiday. We will return to monitoring the forum on October 15.

help with scala script and SplitNCigarReads

estif74estif74 Saint Paul, MN, USAMember

Hi there,

I'm having some trouble getting the arguments to work properly for SplitNCigarReads in a scala script that are specified in article #3891. Specifically:

-rf ReassignOneMappingQuality -RMQF 255 -RMQT 60 and
-U ALLOW_N_CIGAR_READS

What I'm trying is something like:

        val SNCR = new SplitNCigarReads with CommonArguments
        SNCR.input_file :+= qscript.bamFile
        SNCR.out = swapExt(qscript.bamFile, "bam", "split.bam")
        SNCR.read_filter :+= "ReassignOneMappingQuality -RMQF 255 -RMQT -60"
        SNCR.unsafe = "ALLOW_N_CIGAR_READS"

The SNCR.unsafe yields a result that indicates:

found : String("ALLOW_N_CIGAR_READS")
required: org.broadinstitute.sting.gatk.arguments.ValidationExclusion.TYPE

and the SNCR.read_filter will work in the dry run, but when I add the -run flag to my scala script it tells me that this argument isn't valid either.

Any thoughts from some scala pros?

Thanks!
Steve

Best Answer

Answers

  • Geraldine_VdAuweraGeraldine_VdAuwera admin Cambridge, MAMember, Administrator, Broadie admin

    Hi Steve,

    For the ALLOW_N_CIGAR_READS question, it's the same variable type issue as your other recent scala question: because the argument takes an enumerated type rather than a string, you need to specify it as

    SNCR.unsafe = ValidationExclusion.TYPE.ALLOW_N_CIGAR_READS
    

    The read filter question is a little different; the problem there is that you can't include the filter parameters in the string where you specify the filter name. You should do

    SNCR.read_filter :+= "ReassignOneMappingQuality"
    

    and pass the parameters separately. I'm not actually sure how to do that; I expect SNCR.RMQF = 255 and SNCR.RMQT = 60 should work, but haven't tested it. As it happens, those are the default values, so in our pipeline scripts we just don't specify them.

  • estif74estif74 Saint Paul, MN, USAMember

    Thanks @Geraldine_VdAuwera‌ . I couldn't get the SNCR.RMQF or SNCR.RMQT to work, but I opted not to include them b/c they're the defaults as you said.

    Also, I found that I needed to add

    import org.broadinstitute.sting.gatk.arguments.ValidationExclusion

    To the top of my script, and this made it work.

    I owe you big time for your help - I can't thank you enough! If you ever need free veterinary advice for your pets, feel free to PM me :-)

Sign In or Register to comment.