SplitNCigarReads: ERROR MESSAGE: Code exception,

I am following the documentation of "Best Practices for Variant Discovery in RNAseq data" and I am at the SplitNCigarReads -step. All of the previous steps has worked out fine. (NOTE:I did the mapping of my reads with TopHat instead of STAR).

When I run the following:
java -jar GenomeAnalysisTK.jar -T SplitNCigarReads -R reference.fa -I reordered_acc_reference.bam -o split.bam -fixMisencodedQuals -U ALLOW_N_CIGAR_READS

I get the following error message:

ERROR stack trace

java.lang.IllegalArgumentException
at java.nio.ByteBuffer.allocate(ByteBuffer.java:330)
at htsjdk.samtools.reference.IndexedFastaSequenceFile.getSubsequenceAt(IndexedFastaSequenceFile.java:195)
at org.broadinstitute.gatk.utils.fasta.CachingIndexedFastaSequenceFile.getSubsequenceAt(CachingIndexedFastaSequenceFile.java:329)
at org.broadinstitute.gatk.tools.walkers.rnaseq.OverhangFixingManager$Splice.initialize(OverhangFixingManager.java:365)
at org.broadinstitute.gatk.tools.walkers.rnaseq.OverhangFixingManager.addSplicePosition(OverhangFixingManager.java:171)
at org.broadinstitute.gatk.tools.walkers.rnaseq.SplitNCigarReads.splitReadBasedOnCigar(SplitNCigarReads.java:280)
at org.broadinstitute.gatk.tools.walkers.rnaseq.SplitNCigarReads.splitNCigarRead(SplitNCigarReads.java:233)
at org.broadinstitute.gatk.tools.walkers.rnaseq.SplitNCigarReads.reduce(SplitNCigarReads.java:210)
at org.broadinstitute.gatk.tools.walkers.rnaseq.SplitNCigarReads.reduce(SplitNCigarReads.java:118)
at org.broadinstitute.gatk.engine.traversals.TraverseReadsNano$TraverseReadsReduce.apply(TraverseReadsNano.java:251)
at org.broadinstitute.gatk.engine.traversals.TraverseReadsNano$TraverseReadsReduce.apply(TraverseReadsNano.java:240)
at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.executeSingleThreaded(NanoScheduler.java:279)
at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.execute(NanoScheduler.java:245)
at org.broadinstitute.gatk.engine.traversals.TraverseReadsNano.traverse(TraverseReadsNano.java:102)
at org.broadinstitute.gatk.engine.traversals.TraverseReadsNano.traverse(TraverseReadsNano.java:56)
at org.broadinstitute.gatk.engine.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:108)
at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:315)
at org.broadinstitute.gatk.engine.CommandLineExecutable.execute(CommandLineExecutable.java:121)
at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:248)
at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:155)
at org.broadinstitute.gatk.engine.CommandLineGATK.main(CommandLineGATK.java:106)

ERROR ------------------------------------------------------------------------------------------
ERROR A GATK RUNTIME ERROR has occurred (version 3.4-46-gbc02625):
ERROR
ERROR This might be a bug. Please check the documentation guide to see if this is a known problem.
ERROR If not, please post the error message, with stack trace, to the GATK forum.
ERROR Visit our website and forum for extensive documentation and answers to
ERROR commonly asked questions http://www.broadinstitute.org/gatk
ERROR

##### ERROR MESSAGE: Code exception (see stack trace for error itself)

Can anyone help me understand what is wrong?

Best Answer

Answers

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @bmp11
    Hi,

    Can you try deleting your fasta index file and making a new one?

    Thanks,
    Sheila

  • bmp11bmp11 LundMember

    Hi Sheila,
    Thank you for your reply. I deleted my index file and made a new one and runned the same command again but the same error appeared.

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @bmp11
    Hi,

    I am not sure what is going on here. Can you submit a bug report? Instructions are here: http://gatkforums.broadinstitute.org/discussion/1894/how-do-i-submit-a-detailed-bug-report

    -Sheila

  • bmp11bmp11 LundMember

    Hi again!

    I uploaded a bug report to the ftp server. The file is named "BugReport_SGS1.zip"

    Snippet.bam contains reads from chromosome 13 and was created according to the instructions from your supplied link. However when creating Snippet.bam from the original bam file (using PrintReads) I had to include the -fixMisencodedQuals options and therefore this option had to be removed for the test run with snippet.bam, otherwise I did get a new error saying that Snippet.bam includes correctly encoded qualities. This is the only modification that I had to do in order to reproduce the same error, but with a smaller file size.

    In summary:

    Original command giving me the error mentioned in this discussion:

    java -jar GenomeAnalysisTK.jar -T SplitNCigarReads -R reference.fa -I reordered_acc_reference.bam -o split.bam -fixMisencodedQuals -U ALLOW_N_CIGAR_READS

    Command used to reproduce the same error but with only a sample from the original bam file

    java -jar ~/bin/GenomeAnalysisTK.jar -T SplitNCigarReads -R reference.fa -I snippet.bam -o split.bam -U ALLOW_N_CIGAR_READS

    Thank you in advance! I really appreciate your time and will to help.

  • bmp11bmp11 LundMember

    I downloaded an older version of GATK (version 3.3 instead of 3.4) and ran the original command -- this time the error message did not appear and everything seems fine so far.

    However it would still be interesting to get an answer to this post.

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @bmp11
    Hi,

    Thanks for the update. It does seem like this is a bug that has been introduced in the latest version. I will submit a bug report and get back to you.

    -Sheila

  • bmp11bmp11 LundMember

    Okay. Thank you in advance!

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @bmp11
    Hi,

    It turns out this was a bug in the HTSJDK library. We are waiting for the next release of HTSJDK to have the fix in GATK. Have a look at this thread for more information: http://gatkforums.broadinstitute.org/discussion/5875/gatk-indelrealigner-error

    -Sheila

  • sandra.sebysandra.seby AtlantaMember
    edited September 2015

    I am following documentaion on Calling Variants in RNAseq http://gatkforums.broadinstitute.org/discussion/3891/calling-variants-in-rnaseq. My reads are aligned using STAR and all the steps ran correctly till "Split'N'Trim and reassign mapping qualities". Below is the command I used "

    java -Xmx2g -jar /home/Tools/GenomeAnalysisTK-2.3-9-ge5ebf34/GenomeAnalysisTK.jar -T SplitNCigarReads -R /home/Tools/GenomeAnalysisTK-2.3-9-ge5ebf34/resources/hg19/ucsc.hg19.fasta -I EIGC-1_star_aligned.readgrp_added_sorted.de_dupped.bam -o EIGC-1_star_aligned.readgrp_added_sorted.de_dupped.split.bam -rf ReassignOneMappingQuality -RMQF 255 -RMQT 60 -U ALLOW_N_CIGAR_READS

    At this step, I am getting the below error :

    ERROR ------------------------------------------------------------------------------------------
    ERROR A USER ERROR has occurred (version 2.3-9-ge5ebf34):
    ERROR The invalid arguments or inputs must be corrected before the GATK can proceed
    ERROR Please do not post this error to the GATK forum
    ERROR
    ERROR See the documentation (rerun with -h) for this tool to view allowable command-line arguments.
    ERROR Visit our website and forum for extensive documentation and answers to
    ERROR commonly asked questions http://www.broadinstitute.org/gatk
    ERROR
    ERROR MESSAGE: Invalid value ALLOW_N_CIGAR_READS specified for argument unsafe; valid options are (ALLOW_UNINDEXED_BAM,ALLOW_UNSET_BAM_SORT_ORDER,NO_READ_ORDER_VERIFICATION,ALLOW_SEQ_DICT_INCOMPATIBILITY,LENIENT_VCF_PROCESSING,ALL).
    ERROR ------------------------------------------------------------------------------------------

    I'm using GATK2.3 version. Is this related to the GATK version I am using ?

    Can you please tell me where I am going wrong. Thanks In advance !

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie

    @sandra.seby You can't use the 2.3 version for RNAseq analysis. You will need to upgrade to version 3.

Sign In or Register to comment.