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!

RealignerTargetCreator throws java.lang.IllegalStateException

visivasvisivas Cambridge, MAMember

Hi

I am trying to run RealignerTargetCreator on a highly soft clipped bam file (soft clipped primer sequences). As soon as I start the command for RealignerTargetCreator it fails with the following error. Is this a known bug/error? Are there specific conditions when this error is thrown? Sorry I could not find any material relevant to this error and hence posted here and sent this email to Appistry as well. Hope someone can help. I can share data snippet if that helps.

Thanks

Siva

INFO 16:46:21,849 HelpFormatter - The Genome Analysis Toolkit (GATK) v2014.3-3.2.2-7-gf9cba99, Compiled 2014/08/06 10:49:54
INFO 16:46:21,849 HelpFormatter - Copyright (c) 2010 The Broad Institute
INFO 16:46:21,849 HelpFormatter - For support and documentation go to http://gatkdocs.appistry.com/
INFO 16:46:21,853 HelpFormatter - Program Args: -T RealignerTargetCreator -K /usr/prog/gatk/3.2.2-7/gatk.license --input_file /mnt/tmplabdata/as-ngs/CCPV/analysis/Variant_Call_NIBR/bwamem_trimWithinAlign/Sample_1906_HX/Sample_1906_HX.cleaned.bam --reference_sequence /mnt/tmplabdata/as-ngs/referenceGenomes/hg19/bwamem/Homo_sapiens_assembly19.fasta --out /mnt/tmplabdata/as-ngs/CCPV/analysis/Variant_Call_NIBR/bwamem_trimWithinAlign/Sample_1906_HX/Sample_1906_HX.realigned.intervals --validation_strictness SILENT
INFO 16:46:21,860 HelpFormatter - Executing as [email protected] on Linux 2.6.18-371.11.1.el5 amd64; Java HotSpot(TM) 64-Bit Server VM 1.7.0_51-b13.
INFO 16:46:21,861 HelpFormatter - Date/Time: 2015/04/02 16:46:21
INFO 16:46:21,861 HelpFormatter - -----------------------------------------------------------------------------------------
INFO 16:46:21,861 HelpFormatter - -----------------------------------------------------------------------------------------
INFO 16:46:22,369 GenomeAnalysisEngine - Strictness is SILENT
INFO 16:46:22,477 GenomeAnalysisEngine - Downsampling Settings: Method: BY_SAMPLE, Target Coverage: 1000
INFO 16:46:22,486 SAMDataSource$SAMReaders - Initializing SAMRecords in serial
INFO 16:46:22,505 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.02
INFO 16:46:22,589 GenomeAnalysisEngine - Preparing for traversal over 1 BAM files
INFO 16:46:22,725 GenomeAnalysisEngine - Done preparing for traversal
INFO 16:46:22,725 ProgressMeter - [INITIALIZATION COMPLETE; STARTING PROCESSING]
INFO 16:46:22,726 ProgressMeter - | processed | time | per 1M | | total | remaining
INFO 16:46:22,726 ProgressMeter - Location | sites | elapsed | sites | completed | runtime | runtime

ERROR ------------------------------------------------------------------------------------------
ERROR stack trace

java.lang.IllegalStateException: Cannot make a pileup element from an edge alignment state
at org.broadinstitute.gatk.utils.locusiterator.AlignmentStateMachine.makePileupElement(AlignmentStateMachine.java:362)
at org.broadinstitute.gatk.utils.locusiterator.LocusIteratorByState.lazyLoadNextAlignmentContext(LocusIteratorByState.java:317)
at org.broadinstitute.gatk.utils.locusiterator.LocusIteratorByState.hasNext(LocusIteratorByState.java:233)
at htsjdk.samtools.util.PeekableIterator.advance(PeekableIterator.java:67)
at htsjdk.samtools.util.PeekableIterator.next(PeekableIterator.java:54)
at org.broadinstitute.gatk.engine.executive.WindowMaker$WindowMakerIterator.advance(WindowMaker.java:200)
at org.broadinstitute.gatk.engine.executive.WindowMaker$WindowMakerIterator.hasNext(WindowMaker.java:169)
at org.broadinstitute.gatk.engine.datasources.providers.LocusView.advance(LocusView.java:180)
at org.broadinstitute.gatk.engine.datasources.providers.LocusView.hasNextLocus(LocusView.java:148)
at org.broadinstitute.gatk.engine.datasources.providers.AllLocusView.advance(AllLocusView.java:127)
at org.broadinstitute.gatk.engine.datasources.providers.AllLocusView.hasNext(AllLocusView.java:85)
at org.broadinstitute.gatk.engine.traversals.TraverseLociNano$MapDataIterator.hasNext(TraverseLociNano.java:167)
at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.executeSingleThreaded(NanoScheduler.java:268)
at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.execute(NanoScheduler.java:245)
at org.broadinstitute.gatk.engine.traversals.TraverseLociNano.traverse(TraverseLociNano.java:144)
at org.broadinstitute.gatk.engine.traversals.TraverseLociNano.traverse(TraverseLociNano.java:92)
at org.broadinstitute.gatk.engine.traversals.TraverseLociNano.traverse(TraverseLociNano.java:48)
at org.broadinstitute.gatk.engine.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:99)
at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:314)
at org.broadinstitute.gatk.engine.CommandLineExecutable.execute(CommandLineExecutable.java:126)
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:108)

ERROR ------------------------------------------------------------------------------------------
ERROR A GATK RUNTIME ERROR has occurred (version 2014.3-3.2.2-7-gf9cba99):
ERROR
ERROR This might be a bug. Please check the documentation guide to see if this is a known problem.
ERROR Visit our website for extensive documentation and answers to
ERROR commonly asked questions http://gatkdocs.appistry.com/
ERROR
ERROR MESSAGE: Cannot make a pileup element from an edge alignment state
ERROR ------------------------------------------------------------------------------------------

Comments

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hmm, that's a pretty obscure error. Can you please run Picard ValidateSAMFile on the file to check whether it might be a problem with the data?

  • visivasvisivas Cambridge, MAMember

    Actually ValidateSamFile passed with flying colors (I was surprised too). "No errors found".

    [email protected]: /mnt/.../bwamem_trimWithinAlign/Sample_1906_HX$ /usr/prog/picard-tools/1.89/ValidateSamFile.jar I=Sample_1906_HX.cleaned.bam
    [Fri Apr 03 15:04:34 EDT 2015] net.sf.picard.sam.ValidateSamFile INPUT=Sample_1906_HX.cleaned.bam MODE=VERBOSE MAX_OUTPUT=100 IGNORE_WARNINGS=false VALIDATE_INDEX=true IS_BISULFITE_SEQUENCED=false MAX_OPEN_TEMP_FILES=8000 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false
    [Fri Apr 03 15:04:34 EDT 2015] Executing as [email protected] on Linux 2.6.18-371.11.1.el5 amd64; Java HotSpot(TM) 64-Bit Server VM 1.7.0_03-b04; Picard version: 1.89(1408)
    INFO 2015-04-03 15:05:22 SamFileValidator Validated Read 10,000,000 records. Elapsed time: 00:00:47s. Time for last 10,000,000: 47s. Last read position: 12:49,426,106
    No errors found
    [Fri Apr 03 15:05:42 EDT 2015] net.sf.picard.sam.ValidateSamFile done. Elapsed time: 1.14 minutes.

    Runtime.totalMemory()=782041088

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Hah ok. Can you please try running with the latest nightly build of GATK (see Download page) and let us know if the issue persists?

  • visivasvisivas Cambridge, MAMember

    Tried the vnightly-2015-04-07-gbea18ed, Compiled 2015/04/07 00:01:19 build. Still getting the same error.

  • SheilaSheila Broad InstituteMember, Broadie ✭✭✭✭✭

    @visivas
    Hi,

    This does look like a bug. Can you upload your files so we can debug locally? Instructions are here: http://gatkforums.broadinstitute.org/discussion/1894/how-do-i-submit-a-detailed-bug-report

    Thanks,
    Sheila

  • visivasvisivas Cambridge, MAMember

    Hi Sheila

    I have uploaded the files (RealignerTroubleShootFiles_visivas.tar.gz). The reference genome is hg19.

    Thank you
    Siva

    Issue · Github
    by Geraldine_VdAuwera

    Issue Number
    929
    State
    closed
    Last Updated
    Assignee
    Array
    Closed By
    vdauwera
  • visivasvisivas Cambridge, MAMember

    Thanks Geraldine and Sheila. Just so that I am aware and set my expectations, how long do you think it will take for someone to take a look at this?

    Thank you once again
    Siva

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    @visivas It depends what the underlying issue turns out to be. @Sheila will hopefully process your bug report in the next few days (we have a bit of backlog); if she finds that it's a data issue we can get back to you with a recommendation for a processing fix fairly quickly. If it's a bug in the code then it will take longer because we're a little short-handed right now. My money is on the first possibility because the realignment tools have been stable for a long time, so barring a weird corner case it's unlikely to be an actual bug in the code. I expect we might have an answer for you on which it is by middle of next week -- but @Sheila may adjust that expectation as she knows the current load better than I do.

  • visivasvisivas Cambridge, MAMember

    ok thank you Geraldine!

  • SheilaSheila Broad InstituteMember, Broadie ✭✭✭✭✭

    @visivas
    Hi Siva,

    One of the developers may have a fix for this. I will let you know of any updates.

    Thanks,
    Sheila

  • visivasvisivas Cambridge, MAMember

    ok great! Please let me know.

  • visivasvisivas Cambridge, MAMember

    Just pinging to find out if there are updates? Thank you.

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    @visivas Yes, we have a fix that just passed code review and will be patched into the codebase shortly. If you try again with tomorrow's nightly build it should now work without a hitch. FYI the error came down to a problem in your data; one of the reads had a cigar string whose length did not match the length of the read. The fix consisted of adding a conditional check to filter out such reads.

  • visivasvisivas Cambridge, MAMember

    Very nice. Thank you. Will check the fix and see if it works. I will also look into fixing my code that makes the CIGAR string. Does the patch tell you which read is filtered out? Thanks again.

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    The one read name that is mentioned in the debug report is NRUSCA-WDL30535:54:H78MEADXX:1:1215:1771:67335 with cigar 31S70M.

  • visivasvisivas Cambridge, MAMember

    Thanks GATK team! I am now able to run the BAM through the problematic step using the nightly build. I was also able to fix the issue with my code that gave the erroneous cigar string. Thank you.

Sign In or Register to comment.