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!

SplitNCigarReads fails on IllegalArgumentException: contig must be non-null and not equal to *, and

WimSWimS Member ✭✭

Hi,

For 1 out of the 240 RNAseq Lactuca Sativa samples in PRJNA394784 GATK4 4.0.6.0 SplitNCigarReads fails on IllegalArgumentException: contig must be non-null and not equal to *, and start must be >= 1

See also the full error at the bottom of this post.

This is sample L25 from PRJNA394784:
https://www.ncbi.nlm.nih.gov/bioproject/PRJNA394784

The public reference genome is Lactuca sativa cv Salinas V6, which can be downloaded here
https://genomevolution.org/coge/GenomeInfo.pl?gid=24549

I am guessing some kind of unexpected and currently unsupported edge case is encountered by GATK SplitNCigarReads when processing the reads aligned by STAR for this sample on this reference. The input BAM file was made by STAR using bcbio 1.0.8.

The SplitNCigarReads tool does produce an output bam file. The input and output BAM file have similar samtools BAM stats.

Can you please advice me on to fix or troubleshoot this issue. The error did not reproduce when split the BAM file per chromosome and then ran SplitNCigarReads on per chromosome BAM files.

I have prepared a zip that is self contained and that can be used to reproduce this issue.
This zip file contains:

  • GATK4 4.0.6.0 directory with jar
  • reference genome fasta, fai and dict
  • input bam file
  • shell script to run GATK4 4.0.6.0 SplitNCigarReads on the input BAM file using the reference genome. Running this script should reproduce the error after c.a. 1 hour.

I could upload this zipfile to your FTP so that you can reproduce and maybe further diagnose the issue. . The zipfile is 3.7G, and after unzipping the dir is 5.7G.

Thank you.

Stats of the inputBAM file

SN      raw total sequences:    43353950
SN      filtered sequences:     0
SN      sequences:      43353950
SN      is sorted:      1
SN      1st fragments:  21676975
SN      last fragments: 21676975
SN      reads mapped:   41364286
SN      reads mapped and paired:        41364286        # paired-end technology bit set + both mates mapped
SN      reads unmapped: 1989664
SN      reads properly paired:  41364286        # proper-pair bit set
SN      reads paired:   43353950        # paired-end technology bit set
SN      reads duplicated:       10093036        # PCR or optical duplicate bit set
SN      reads MQ0:      411998  # mapped and MQ=0
SN      reads QC failed:        0
SN      non-primary alignments: 3485878
SN      total length:   5419243750      # ignores clipping
SN      bases mapped:   5170535750      # ignores clipping
SN      bases mapped (cigar):   5128867702      # more accurate
SN      bases trimmed:  0
SN      bases duplicated:       1261629500
SN      mismatches:     15214897        # from NM fields
SN      error rate:     2.966522e-03    # mismatches / bases mapped (cigar)
SN      average length: 125
SN      maximum length: 125
SN      average quality:        35.9
SN      insert size average:    323.5
SN      insert size standard deviation: 245.7
SN      inward oriented pairs:  20397455
SN      outward oriented pairs: 6123
SN      pairs with other orientation:   0
SN      pairs on different chromosomes: 0

Stats of the output BAM file

SN      raw total sequences:    43256631
SN      filtered sequences:     0
SN      sequences:      43256631
SN      is sorted:      1
SN      1st fragments:  21628316
SN      last fragments: 21628315
SN      reads mapped:   41364286
SN      reads mapped and paired:        41364286        # paired-end technology bit set + both mates mapped
SN      reads unmapped: 1892345
SN      reads properly paired:  41364286        # proper-pair bit set
SN      reads paired:   43256631        # paired-end technology bit set
SN      reads duplicated:       13796789        # PCR or optical duplicate bit set
SN      reads MQ0:      411998  # mapped and MQ=0
SN      reads QC failed:        0
SN      non-primary alignments: 3485878
SN      total length:   5407078875      # ignores clipping
SN      bases mapped:   5170535750      # ignores clipping
SN      bases mapped (cigar):   5124033251      # more accurate
SN      bases trimmed:  0
SN      bases duplicated:       1724598625
SN      mismatches:     0       # from NM fields
SN      error rate:     0.000000e+00    # mismatches / bases mapped (cigar)
SN      average length: 125
SN      maximum length: 125
SN      average quality:        35.9
SN      insert size average:    382.7
SN      insert size standard deviation: 286.5
SN      inward oriented pairs:  26691643
SN      outward oriented pairs: 1953810
SN      pairs with other orientation:   0
SN      pairs on different chromosomes: 0

Full error statcktrace
14:52:29.724 INFO ProgressMeter - Chr_09:201075470 76.5 91120000 1191543.6 14:52:40.081 INFO ProgressMeter - Chr_09:217057472 76.6 91287000 1191038.9 14:52:50.652 INFO ProgressMeter - Chr_09:226006079 76.8 91436000 1190246.9 14:53:00.827 INFO ProgressMeter - Chr_09:233190514 77.0 91594000 1189677.4 14:53:11.716 INFO ProgressMeter - unmapped 77.2 91848000 1190171.3 14:53:23.575 INFO ProgressMeter - unmapped 77.4 92298000 1192946.9 14:53:33.769 INFO ProgressMeter - unmapped 77.5 92743000 1196071.9 14:53:44.245 INFO ProgressMeter - unmapped 77.7 93185000 1199072.2 14:53:54.247 INFO ProgressMeter - unmapped 77.9 93536000 1201012.6 INFO 2018-07-30 14:53:57 SortingCollection Creating merging iterator from 127 files 14:56:32.633 INFO SplitNCigarReads - Shutting down engine [July 30, 2018 2:56:32 PM CEST] org.broadinstitute.hellbender.tools.walkers.rnaseq.SplitNCigarReads done. Elapsed time: 80.55 minutes. Runtime.totalMemory()=1498107904 java.lang.IllegalArgumentException: contig must be non-null and not equal to *, and start must be >= 1 at org.broadinstitute.hellbender.utils.read.SAMRecordToGATKReadAdapter.setMatePosition(SAMRecordToGATKReadAdapter.java:197) at org.broadinstitute.hellbender.tools.walkers.rnaseq.OverhangFixingManager.setPredictedMateInformation(OverhangFixingManager.java:435) at org.broadinstitute.hellbender.tools.walkers.rnaseq.SplitNCigarReads.splitNCigarRead(SplitNCigarReads.java:222) at org.broadinstitute.hellbender.tools.walkers.rnaseq.SplitNCigarReads.secondPassApply(SplitNCigarReads.java:185) at org.broadinstitute.hellbender.engine.TwoPassReadWalker.lambda$traverseReads$0(TwoPassReadWalker.java:62) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.Iterator.forEachRemaining(Iterator.java:116) at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at org.broadinstitute.hellbender.engine.TwoPassReadWalker.traverseReads(TwoPassReadWalker.java:60) at org.broadinstitute.hellbender.engine.TwoPassReadWalker.traverse(TwoPassReadWalker.java:49) at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:984) at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:135) at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:180) at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:199) at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:160) at org.broadinstitute.hellbender.Main.mainEntry(Main.java:203) at org.broadinstitute.hellbender.Main.main(Main.java:289)

Answers

Sign In or Register to comment.