I am running pilon and I am running into the following error:
Caused by: java.lang.IllegalStateException: Inappropriate call if not paired read
This is odd because I used Paired reads to create my SAM/BAM files. Could it be that in my Bowtie2 mapping I also use the unpaired reads flag --U?
Here is the whole error:
# Attempting to fill gaps Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.simontuffs.onejar.Boot.run(Boot.java:340) at com.simontuffs.onejar.Boot.main(Boot.java:166) Caused by: java.lang.IllegalStateException: Inappropriate call if not paired read at htsjdk.samtools.SAMRecord.requireReadPaired(SAMRecord.java:648) at htsjdk.samtools.SAMRecord.getFirstOfPairFlag(SAMRecord.java:706) at org.broadinstitute.pilon.BamFile$MateMap.addRead(BamFile.scala:224) at org.broadinstitute.pilon.BamFile$MateMap$$anonfun$addReads$1.apply(BamFile.scala:220) at org.broadinstitute.pilon.BamFile$MateMap$$anonfun$addReads$1.apply(BamFile.scala:220) at scala.collection.immutable.List.foreach(List.scala:381) at org.broadinstitute.pilon.BamFile$MateMap.addReads(BamFile.scala:220) at org.broadinstitute.pilon.BamFile$MateMap.<init>(BamFile.scala:218) at org.broadinstitute.pilon.BamFile.recruitFlankReads(BamFile.scala:339) at org.broadinstitute.pilon.GapFiller$$anonfun$recruitReadsOfType$1.apply(GapFiller.scala:367) at org.broadinstitute.pilon.GapFiller$$anonfun$recruitReadsOfType$1.apply(GapFiller.scala:366) at scala.collection.immutable.List.foreach(List.scala:381) at org.broadinstitute.pilon.GapFiller.recruitReadsOfType(GapFiller.scala:366) at org.broadinstitute.pilon.GapFiller.recruitFrags(GapFiller.scala:375) at org.broadinstitute.pilon.GapFiller.recruitLocalReads(GapFiller.scala:389) at org.broadinstitute.pilon.GapFiller.recruitReads(GapFiller.scala:391) at org.broadinstitute.pilon.GapFiller.assembleAcrossBreak(GapFiller.scala:51) at org.broadinstitute.pilon.GapFiller.fillGap(GapFiller.scala:40) at org.broadinstitute.pilon.GenomeRegion$$anonfun$identifyAndFixIssues$3.apply(GenomeRegion.scala:369) at org.broadinstitute.pilon.GenomeRegion$$anonfun$identifyAndFixIssues$3.apply(GenomeRegion.scala:367) at scala.collection.immutable.List.foreach(List.scala:381) at org.broadinstitute.pilon.GenomeRegion.identifyAndFixIssues(GenomeRegion.scala:367) at org.broadinstitute.pilon.GenomeFile$$anonfun$processRegions$4.apply(GenomeFile.scala:119) at org.broadinstitute.pilon.GenomeFile$$anonfun$processRegions$4.apply(GenomeFile.scala:108) at scala.collection.Iterator$class.foreach(Iterator.scala:893) at scala.collection.AbstractIterator.foreach(Iterator.scala:1336) at scala.collection.parallel.ParIterableLike$Foreach.leaf(ParIterableLike.scala:972) at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply$mcV$sp(Tasks.scala:49) at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:48) at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:48) at scala.collection.parallel.Task$class.tryLeaf(Tasks.scala:51) at scala.collection.parallel.ParIterableLike$Foreach.tryLeaf(ParIterableLike.scala:969) at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask$class.compute(Tasks.scala:152) at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.compute(Tasks.scala:443) at scala.concurrent.forkjoin.RecursiveAction.exec(RecursiveAction.java:160) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
nevermind, I figured out. pilon does not recognize the bam file using --bam when the bowtie map used -1, -2 and -U. It seems the paired and unparied maps need to be generated independently.
I am running pilon and I am running into the following error:
This is odd because I used Paired reads to create my SAM/BAM files. Could it be that in my Bowtie2 mapping I also use the unpaired reads flag --U?
Here is the whole error:
# Attempting to fill gaps Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.simontuffs.onejar.Boot.run(Boot.java:340) at com.simontuffs.onejar.Boot.main(Boot.java:166) Caused by: java.lang.IllegalStateException: Inappropriate call if not paired read at htsjdk.samtools.SAMRecord.requireReadPaired(SAMRecord.java:648) at htsjdk.samtools.SAMRecord.getFirstOfPairFlag(SAMRecord.java:706) at org.broadinstitute.pilon.BamFile$MateMap.addRead(BamFile.scala:224) at org.broadinstitute.pilon.BamFile$MateMap$$anonfun$addReads$1.apply(BamFile.scala:220) at org.broadinstitute.pilon.BamFile$MateMap$$anonfun$addReads$1.apply(BamFile.scala:220) at scala.collection.immutable.List.foreach(List.scala:381) at org.broadinstitute.pilon.BamFile$MateMap.addReads(BamFile.scala:220) at org.broadinstitute.pilon.BamFile$MateMap.<init>(BamFile.scala:218) at org.broadinstitute.pilon.BamFile.recruitFlankReads(BamFile.scala:339) at org.broadinstitute.pilon.GapFiller$$anonfun$recruitReadsOfType$1.apply(GapFiller.scala:367) at org.broadinstitute.pilon.GapFiller$$anonfun$recruitReadsOfType$1.apply(GapFiller.scala:366) at scala.collection.immutable.List.foreach(List.scala:381) at org.broadinstitute.pilon.GapFiller.recruitReadsOfType(GapFiller.scala:366) at org.broadinstitute.pilon.GapFiller.recruitFrags(GapFiller.scala:375) at org.broadinstitute.pilon.GapFiller.recruitLocalReads(GapFiller.scala:389) at org.broadinstitute.pilon.GapFiller.recruitReads(GapFiller.scala:391) at org.broadinstitute.pilon.GapFiller.assembleAcrossBreak(GapFiller.scala:51) at org.broadinstitute.pilon.GapFiller.fillGap(GapFiller.scala:40) at org.broadinstitute.pilon.GenomeRegion$$anonfun$identifyAndFixIssues$3.apply(GenomeRegion.scala:369) at org.broadinstitute.pilon.GenomeRegion$$anonfun$identifyAndFixIssues$3.apply(GenomeRegion.scala:367) at scala.collection.immutable.List.foreach(List.scala:381) at org.broadinstitute.pilon.GenomeRegion.identifyAndFixIssues(GenomeRegion.scala:367) at org.broadinstitute.pilon.GenomeFile$$anonfun$processRegions$4.apply(GenomeFile.scala:119) at org.broadinstitute.pilon.GenomeFile$$anonfun$processRegions$4.apply(GenomeFile.scala:108) at scala.collection.Iterator$class.foreach(Iterator.scala:893) at scala.collection.AbstractIterator.foreach(Iterator.scala:1336) at scala.collection.parallel.ParIterableLike$Foreach.leaf(ParIterableLike.scala:972) at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply$mcV$sp(Tasks.scala:49) at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:48) at scala.collection.parallel.Task$$anonfun$tryLeaf$1.apply(Tasks.scala:48) at scala.collection.parallel.Task$class.tryLeaf(Tasks.scala:51) at scala.collection.parallel.ParIterableLike$Foreach.tryLeaf(ParIterableLike.scala:969) at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask$class.compute(Tasks.scala:152) at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.compute(Tasks.scala:443) at scala.concurrent.forkjoin.RecursiveAction.exec(RecursiveAction.java:160) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Any suggestion would be really helpful! Thanks