RealignerTargetCreator error

says_anovasays_anova californiaMember

Hello,

GATK newbie here. We have purchased a commercial license and are using GATKv3.5. In trying to run RealignerTargetCreator on an Illumina Platinum Genomes file or on the sampleBAM.bam that ships with GATK using this command:

java \
-Djava.io.tmpdir=$tmp_dir \
-Xmx24g \
-jar $mygatk \
-K $gatkkey \
-et NO_ET \
-T RealignerTargetCreator \
-R $ref_genome \
-nt $threads \
-I $bam_in \
-o ${tmp_dir}/${bam_in}.indel.intervals

we run into the following error

Mon Dec 21 11:08:20 PST 2015 Running GATK RealignerTargetCreator.
INFO 11:08:22,005 HelpFormatter - --------------------------------------------------------------------------------
INFO 11:08:22,007 HelpFormatter - The Genome Analysis Toolkit (GATK) v3.5-0-g36282e4, Compiled 2015/11/25 04:03:56
INFO 11:08:22,007 HelpFormatter - Copyright (c) 2010 The Broad Institute
INFO 11:08:22,007 HelpFormatter - For support and documentation go to http://www.broadinstitute.org/gatk
INFO 11:08:22,010 HelpFormatter - Program Args: -K /r/sequencing/software/GATK/GenomeAnalysisTK-3.5/vvacic_23andme.com.key -et NO_ET -T RealignerTargetCreator -R /m/rsgen0502/Vol5/sequencing/datasets/references/hg38/23andMeV1_hg38/23andMeV1_hg38.fa
INFO 11:08:22,015 HelpFormatter - Executing as [email protected] on Linux 2.6.32-358.el6.x86_64 amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_05-b13.
INFO 11:08:22,015 HelpFormatter - Date/Time: 2015/12/21 11:08:22
INFO 11:08:22,016 HelpFormatter - --------------------------------------------------------------------------------
INFO 11:08:22,016 HelpFormatter - --------------------------------------------------------------------------------
INFO 11:08:22,340 GenomeAnalysisEngine - Strictness is SILENT
INFO 11:08:22,443 GenomeAnalysisEngine - Downsampling Settings: Method: BY_SAMPLE, Target Coverage: 1000
INFO 11:08:22,514 GenomeAnalysisEngine - Preparing for traversal
INFO 11:08:22,519 GenomeAnalysisEngine - Done preparing for traversal
INFO 11:08:22,519 ProgressMeter - [INITIALIZATION COMPLETE; STARTING PROCESSING]
INFO 11:08:22,519 ProgressMeter - | processed | time | per 1M | | total | remaining
INFO 11:08:22,520 ProgressMeter - Location | sites | elapsed | sites | completed | runtime | runtime
INFO 11:08:52,523 ProgressMeter - chr1:196609801 1.96E8 30.0 s 0.0 s 6.3% 7.9 m 7.4 m
INFO 11:09:22,525 ProgressMeter - chr2:145048901 3.93956422E8 60.0 s 0.0 s 12.7% 7.9 m 6.9 m
INFO 11:09:52,526 ProgressMeter - chr3:99552301 5.90149951E8 90.0 s 0.0 s 19.1% 7.9 m 6.4 m
INFO 11:10:22,527 ProgressMeter - chr4:100315901 7.8944551E8 120.0 s 0.0 s 25.5% 7.8 m 5.8 m
INFO 11:10:52,528 ProgressMeter - chr5:108999901 9.87660065E8 2.5 m 0.0 s 31.9% 7.8 m 5.3 m
INFO 11:11:22,530 ProgressMeter - chr6:127014101 1.188198324E9 3.0 m 0.0 s 38.3% 7.8 m 4.8 m
INFO 11:11:52,531 ProgressMeter - chr7:153969801 1.385004303E9 3.5 m 0.0 s 44.7% 7.8 m 4.3 m
INFO 11:12:22,532 ProgressMeter - chr9:47549301 1.583488912E9 4.0 m 0.0 s 51.1% 7.8 m 3.8 m
INFO 11:12:52,534 ProgressMeter - chr10:104352401 1.778883629E9 4.5 m 0.0 s 57.4% 7.8 m 3.3 m
INFO 11:13:22,535 ProgressMeter - chr12:29916101 1.972767673E9 5.0 m 0.0 s 63.7% 7.9 m 2.9 m
INFO 11:13:52,536 ProgressMeter - chr13:92999901 2.169042982E9 5.5 m 0.0 s 70.0% 7.9 m 2.4 m
INFO 11:14:22,537 ProgressMeter - chr15:69999901 2.367451028E9 6.0 m 0.0 s 76.4% 7.9 m 111.0 s
INFO 11:14:52,542 ProgressMeter - chr17:75396101 2.565780562E9 6.5 m 0.0 s 82.8% 7.9 m 81.0 s
INFO 11:15:22,543 ProgressMeter - chr20:48601901 2.761028904E9 7.0 m 0.0 s 89.1% 7.9 m 51.0 s
INFO 11:15:52,544 ProgressMeter - chrX:84662701 2.959001522E9 7.5 m 0.0 s 95.5% 7.9 m 21.0 s

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

java.lang.NullPointerException
at org.broadinstitute.gatk.tools.walkers.indels.RealignerTargetCreator.onTraversalDone(RealignerTargetCreator.java:287)
at org.broadinstitute.gatk.tools.walkers.indels.RealignerTargetCreator.onTraversalDone(RealignerTargetCreator.java:142)
at org.broadinstitute.gatk.engine.executive.Accumulator$StandardAccumulator.finishTraversal(Accumulator.java:129)
at org.broadinstitute.gatk.engine.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:116)
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.5-0-g36282e4):
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)
ERROR ------------------------------------------------------------------------------------------

Issue · Github
by Sheila

Issue Number
436
State
closed
Last Updated
Assignee
Array
Milestone
Array
Closed By
vdauwera

Best Answer

Answers

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @says_anova
    Hi,

    Can you confirm that the command you ran included the -I "your bam file" and -o "your output file"? I do not see those two arguments in the console output. However, you may have left those out for privacy reasons. Also, can you confirm your input bam file passed validation? You can use Picard's ValidateSamFile.

    -Sheila

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @says_anova
    Ah, That is wonderful news! I am happy you figured out the issue. Happy Holidays!

  • udpudp virginiaMember

    HI,
    I think I have a similar issue. This is what I run

    for sample in $SAMPLES;
    do
    cd $MYHOME && $JAVA/java -Xmx2g -Djava.io.tmpdir=$TMP -jar $JAR \
    -T RealignerTargetCreator \
    -L 11 \
    -R $REF \
    -I $sample.sorted.markdup.bam \
    -o $sample.sorted.markdup.bam.intervals
    done
    INFO 14:18:49,188 HelpFormatter - --------------------------------------------------------------------------------
    INFO 14:18:49,191 HelpFormatter - The Genome Analysis Toolkit (GATK) v3.4-0-g7e26428, Compiled 2015/05/15 03:25:41
    INFO 14:18:49,192 HelpFormatter - Copyright (c) 2010 The Broad Institute
    INFO 14:18:49,192 HelpFormatter - For support and documentation go to http://www.broadinstitute.org/gatk
    INFO 14:18:49,197 HelpFormatter - Program Args: -T RealignerTargetCreator -L 11 -R /home/udp3f/my_scratch/udp3f/human_g1k_v37_decoy.fasta -I 2013023.sorted.markdup.bam -o 2013023.sorted.markdup.bam.intervals
    INFO 14:18:49,202 HelpFormatter - Executing as [email protected] on Linux 2.6.32-573.1.1.el6.x86_64 amd64; Java HotSpot(TM) 64-Bit Server VM 1.7.0_67-b01.
    INFO 14:18:49,203 HelpFormatter - Date/Time: 2016/01/06 14:18:49
    INFO 14:18:49,204 HelpFormatter - --------------------------------------------------------------------------------
    INFO 14:18:49,204 HelpFormatter - --------------------------------------------------------------------------------
    INFO 14:18:49,844 GenomeAnalysisEngine - Strictness is SILENT
    INFO 14:18:50,021 GenomeAnalysisEngine - Downsampling Settings: Method: BY_SAMPLE, Target Coverage: 1000
    INFO 14:18:50,032 SAMDataSource$SAMReaders - Initializing SAMRecords in serial
    INFO 14:18:50,125 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.09
    INFO 14:18:50,144 IntervalUtils - Processing 135006516 bp from intervals
    INFO 14:18:51,049 GATKRunReport - Uploaded run statistics report to AWS S3

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

    java.lang.NullPointerException
    at java.util.TreeMap.compare(Unknown Source)
    at java.util.TreeMap.put(Unknown Source)
    at java.util.TreeSet.add(Unknown Source)
    at org.broadinstitute.gatk.utils.sam.ReadUtils.getSAMFileSamples(ReadUtils.java:70)
    at org.broadinstitute.gatk.engine.samples.SampleDBBuilder.addSamplesFromSAMHeader(SampleDBBuilder.java:66)
    at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.initializeSampleDB(GenomeAnalysisEngine.java:846)
    at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:296)
    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-0-g7e26428):
    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)
    ERROR ------------------------------------------------------------------------------------------

    Any help is deeply appreciated.

    -Uma

  • udpudp virginiaMember

    The above issue is solved. It was an error due to bad parsing of the read groups in the bam file. Incase this is helpful to someone.
    -Uma

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Thanks for reporting your outcome, Uma

Sign In or Register to comment.