Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • MiniMicrobe
    Junior Member
    • Nov 2015
    • 6

    BBmap alignment error when using Pacbio reads

    Hello

    I am trying to perform mapping using pacbio sequences on a whole genome sequence. The back story is that i have produced a whole genome sequence with PacBio and Illumina miseq reads using Canu. My supervisor isn't convinced that the de novo assembly is accurate as there is a large inversion that hasn't been seen before in this bacterial species. I want to use the raw pacbio reads to map over the breakpoints in the genome to prove either way.

    I don't really know how the BBmap works so I have been looking online for examples. This is what I have been doing:

    Code:
    cd BBtools
    bbmap/bbmap.sh ref=bbmap/VPI10463_Original.fna
    bbmap/mapPacBio.sh k=7 in=bbmap/VPI_Reads.fastq maxlen=6000 minlen=200 minratio=0.400 out=bbmap/VPI_mapped2.sam
    This then outputs with an error message:

    Code:
    bbmap/mapPacBio.sh k=7 in=bbmap/VPI_Reads.fastq maxlen=6000 minlen=200 minratio=0.400 out=bbmap/VPI_mapped2.samjava -Djava.library.path=/home/james/BBtools/bbmap/jni/ -ea -Xmx50283m -cp /home/james/BBtools/bbmap/current/ align2.BBMapPacBio build=1 overwrite=true minratio=0.40 fastareadlen=6000 ambiguous=best minscaf=100 startpad=10000 stoppad=10000 midpad=6000 k=7 in=bbmap/VPI_Reads.fastq maxlen=6000 minlen=200 minratio=0.400 out=bbmap/VPI_mapped2.sam
    Executing align2.BBMapPacBio [build=1, overwrite=true, minratio=0.40, fastareadlen=6000, ambiguous=best, minscaf=100, startpad=10000, stoppad=10000, midpad=6000, k=7, in=bbmap/VPI_Reads.fastq, maxlen=6000, minlen=200, minratio=0.400, out=bbmap/VPI_mapped2.sam]
    
    BBMap version 37.56
    Set MINIMUM_ALIGNMENT_SCORE_RATIO to 0.400
    Set MINIMUM_ALIGNMENT_SCORE_RATIO to 0.400
    Retaining first best site only for ambiguous mappings.
    Set genome to 1
    
    Loaded Reference:	0.118 seconds.
    Loading index for chunk 1-1, build 1
    Generated Index:	0.067 seconds.
    Analyzed Index:   	0.101 seconds.
    Started output stream:	0.021 seconds.
    Cleared Memory:    	0.120 seconds.
    Processing reads in single-ended mode.
    Started read stream.
    Started 24 mapping threads.
    Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 2047
    	at align2.BBIndexPacBio.getHits(BBIndexPacBio.java:353)
    	at align2.BBIndexPacBio.prescanAllBlocks(BBIndexPacBio.java:654)
    	at align2.BBIndexPacBio.find(BBIndexPacBio.java:566)
    	at align2.BBIndexPacBio.findAdvanced(BBIndexPacBio.java:390)
    	at align2.AbstractMapThread.quickMap(AbstractMapThread.java:743)
    	at align2.BBMapThreadPacBio.processRead(BBMapThreadPacBio.java:400)
    	at align2.AbstractMapThread.run(AbstractMapThread.java:502)
    Detecting finished threads: 0Exception in thread "Thread-18" java.lang.ArrayIndexOutOfBoundsException: 2047
    	at align2.BBIndexPacBio.getHits(BBIndexPacBio.java:353)
    	at align2.BBIndexPacBio.prescanAllBlocks(BBIndexPacBio.java:654)
    	at align2.BBIndexPacBio.find(BBIndexPacBio.java:566)
    	at align2.BBIndexPacBio.findAdvanced(BBIndexPacBio.java:390)
    	at align2.AbstractMapThread.quickMap(AbstractMapThread.java:743)
    	at align2.BBMapThreadPacBio.processRead(BBMapThreadPacBio.java:400)
    	at align2.AbstractMapThread.run(AbstractMapThread.java:502)
    Exception in thread "Thread-26" java.lang.ArrayIndexOutOfBoundsException: 2047
    	at align2.BBIndexPacBio.getHits(BBIndexPacBio.java:353)
    	at align2.BBIndexPacBio.prescanAllBlocks(BBIndexPacBio.java:654)
    	at align2.BBIndexPacBio.find(BBIndexPacBio.java:566)
    	at align2.BBIndexPacBio.findAdvanced(BBIndexPacBio.java:390)
    	at align2.AbstractMapThread.quickMap(AbstractMapThread.java:743)
    	at align2.BBMapThreadPacBio.processRead(BBMapThreadPacBio.java:400)
    	at align2.AbstractMapThread.run(AbstractMapThread.java:502)
    Exception in thread "Thread-21" java.lang.ArrayIndexOutOfBoundsException: 2047
    	at align2.BBIndexPacBio.getHits(BBIndexPacBio.java:353)
    	at align2.BBIndexPacBio.prescanAllBlocks(BBIndexPacBio.java:654)
    	at align2.BBIndexPacBio.find(BBIndexPacBio.java:566)
    	at align2.BBIndexPacBio.findAdvanced(BBIndexPacBio.java:390)
    	at align2.AbstractMapThread.quickMap(AbstractMapThread.java:743)
    	at align2.BBMapThreadPacBio.processRead(BBMapThreadPacBio.java:400)
    	at align2.AbstractMapThread.run(AbstractMapThread.java:502)
    Exception in thread "Thread-13" java.lang.ArrayIndexOutOfBoundsException: 2047
    	at align2.BBIndexPacBio.getHits(BBIndexPacBio.java:353)
    	at align2.BBIndexPacBio.prescanAllBlocks(BBIndexPacBio.java:654)
    	at align2.BBIndexPacBio.find(BBIndexPacBio.java:566)
    	at align2.BBIndexPacBio.findAdvanced(BBIndexPacBio.java:390)
    	at align2.AbstractMapThread.quickMap(AbstractMapThread.java:743)
    	at align2.BBMapThreadPacBio.processRead(BBMapThreadPacBio.java:400)
    	at align2.AbstractMapThread.run(AbstractMapThread.java:502)
    Exception in thread "Thread-6" java.lang.ArrayIndexOutOfBoundsException: 2047
    	at align2.BBIndexPacBio.getHits(BBIndexPacBio.java:353)
    	at align2.BBIndexPacBio.prescanAllBlocks(BBIndexPacBio.java:654)
    	at align2.BBIndexPacBio.find(BBIndexPacBio.java:566)
    	at align2.BBIndexPacBio.findAdvanced(BBIndexPacBio.java:390)
    	at align2.AbstractMapThread.quickMap(AbstractMapThread.java:743)
    	at align2.BBMapThreadPacBio.processRead(BBMapThreadPacBio.java:400)
    	at align2.AbstractMapThread.run(AbstractMapThread.java:502)
    Exception in thread "Thread-14" java.lang.ArrayIndexOutOfBoundsException: 2047
    	at align2.BBIndexPacBio.getHits(BBIndexPacBio.java:353)
    	at align2.BBIndexPacBio.prescanAllBlocks(BBIndexPacBio.java:654)
    	at align2.BBIndexPacBio.find(BBIndexPacBio.java:566)
    	at align2.BBIndexPacBio.findAdvanced(BBIndexPacBio.java:390)
    	at align2.AbstractMapThread.quickMap(AbstractMapThread.java:743)
    	at align2.BBMapThreadPacBio.processRead(BBMapThreadPacBio.java:400)
    	at align2.AbstractMapThread.run(AbstractMapThread.java:502)
    Exception in thread "Thread-9" java.lang.ArrayIndexOutOfBoundsException: 2047
    	at align2.BBIndexPacBio.getHits(BBIndexPacBio.java:353)
    	at align2.BBIndexPacBio.prescanAllBlocks(BBIndexPacBio.java:654)
    	at align2.BBIndexPacBio.find(BBIndexPacBio.java:566)
    	at align2.BBIndexPacBio.findAdvanced(BBIndexPacBio.java:390)
    	at align2.AbstractMapThread.quickMap(AbstractMapThread.java:743)
    	at align2.BBMapThreadPacBio.processRead(BBMapThreadPacBio.java:400)
    	at align2.AbstractMapThread.run(AbstractMapThread.java:502)
    Exception in thread "Thread-11" java.lang.ArrayIndexOutOfBoundsException: 2047
    	at align2.BBIndexPacBio.getHits(BBIndexPacBio.java:353)
    	at align2.BBIndexPacBio.prescanAllBlocks(BBIndexPacBio.java:654)
    	at align2.BBIndexPacBio.find(BBIndexPacBio.java:566)
    	at align2.BBIndexPacBio.findAdvanced(BBIndexPacBio.java:390)
    	at align2.AbstractMapThread.quickMap(AbstractMapThread.java:743)
    	at align2.BBMapThreadPacBio.processRead(BBMapThreadPacBio.java:400)
    	at align2.AbstractMapThread.run(AbstractMapThread.java:502)
    Exception in thread "Thread-4" java.lang.ArrayIndexOutOfBoundsException
    , 1Exception in thread "Thread-8" java.lang.ArrayIndexOutOfBoundsException
    Exception in thread "Thread-15" java.lang.ArrayIndexOutOfBoundsException
    Exception in thread "Thread-16" java.lang.ArrayIndexOutOfBoundsException
    Exception in thread "Thread-12" java.lang.ArrayIndexOutOfBoundsException
    Exception in thread "Thread-20" java.lang.ArrayIndexOutOfBoundsException
    Exception in thread "Thread-24" java.lang.ArrayIndexOutOfBoundsException
    Exception in thread "Thread-5" java.lang.ArrayIndexOutOfBoundsException
    , 2, 3Exception in thread "Thread-7" java.lang.ArrayIndexOutOfBoundsException
    , 4, 5, 6Exception in thread "Thread-23" java.lang.ArrayIndexOutOfBoundsException
    Exception in thread "Thread-10" java.lang.ArrayIndexOutOfBoundsException
    , 7, 8, 9, 10, 11, 12, 13Exception in thread "Thread-17" java.lang.ArrayIndexOutOfBoundsException
    , 14, 15Exception in thread "Thread-22" java.lang.ArrayIndexOutOfBoundsException
    Exception in thread "Thread-19" java.lang.ArrayIndexOutOfBoundsException
    , 16, 17, 18, 19, 20, 21Exception in thread "Thread-25" java.lang.ArrayIndexOutOfBoundsException
    , 22, 23
    
    **************************************************************************
    Warning!  24 mapping threads did not terminate normally.
    Check the error log; the output may be corrupt or incomplete.
    Please submit the full stderr output as a bug report, not just this message.
    **************************************************************************
    
    
    
    
       ------------------   Results   ------------------   
    
    Genome:                	1
    Key Length:            	7
    Max Indel:             	100
    Minimum Score Ratio:  	0.4
    Mapping Mode:         	normal
    Reads Used:           	197	(623932 bases)
    
    Mapping:          	508.781 seconds.
    Reads/sec:       	0.39
    kBases/sec:      	1.23
    
    
    Read 1 data:      	pct reads	num reads 	pct bases	   num bases
    
    mapped:          	 59.3909% 	      117 	 46.5219% 	      290265
    unambiguous:     	 53.2995% 	      105 	 39.0331% 	      243540
    ambiguous:       	  6.0914% 	       12 	  7.4888% 	       46725
    low-Q discards:  	  0.0000% 	        0 	  0.0000% 	           0
    
    perfect best site:	  0.0000% 	        0 	  0.0000% 	           0
    semiperfect site:	  0.0000% 	        0 	  0.0000% 	           0
    
    Match Rate:      	      NA 	       NA 	 75.5887% 	      249581
    Error Rate:      	 80.6897% 	      117 	 24.4113% 	       80602
    Sub Rate:        	 80.6897% 	      117 	  5.2444% 	       17316
    Del Rate:        	 80.6897% 	      117 	 12.0897% 	       39918
    Ins Rate:        	 80.6897% 	      117 	  7.0773% 	       23368
    N Rate:          	  0.0000% 	        0 	  0.0000% 	           0
    Exception in thread "main" java.lang.AssertionError:
    The number of reads out does not add up to the number of reads in.
    This may indicate that a mapping thread crashed.
    If you submit a bug report, include the entire console output, not just this error message.
    53+64+0+56+0 = 173 != 197
    	at align2.AbstractMapper.printOutput(AbstractMapper.java:1878)
    	at align2.BBMapPacBio.testSpeed(BBMapPacBio.java:462)
    	at align2.BBMapPacBio.main(BBMapPacBio.java:37)
    I guess i have got something wrong in my commands but I'm not sure what. Any help would be great!

    Thanks
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    Have you used Mauve to take a look at how your genome looks compared to other known ones?

    Comment

    • MiniMicrobe
      Junior Member
      • Nov 2015
      • 6

      #3
      Hi Genomax
      Thanks for your reply. Using mauve is how I initially found the inversion. My supervisors want to know what the coverage was over the break points is to prove that there wasn't a miss alignment. I believe canu dosen't produce a .bam output so I thought that using bbmap would allow me to get this info at least using my raw pacbio reads. The situation is difficult because there are two 15kb identical reverse compliment sequences at each end of this inversion. I'm hoping that the long pacbio reads will span these regions with enough coverage to say conclusively that it is genuine.

      Comment

      • gconcepcion
        Member
        • Dec 2010
        • 68

        #4
        Originally posted by MiniMicrobe View Post
        Hello

        I am trying to perform mapping using pacbio sequences on a whole genome sequence. The back story is that i have produced a whole genome sequence with PacBio and Illumina miseq reads using Canu. My supervisor isn't convinced that the de novo assembly is accurate as there is a large inversion that hasn't been seen before in this bacterial species. I want to use the raw pacbio reads to map over the breakpoints in the genome to prove either way.

        I don't really know how the BBmap works so I have been looking online for examples. This is what I have been doing:

        ...

        I guess i have got something wrong in my commands but I'm not sure what. Any help would be great!

        Thanks

        Why not use `bwa` to map the raw reads back to the reference?
        Code:
        $ bwa index reference.fasta
        $ bwa mem -x pacbio -t 24 reference.fasta raw_subreads.fasta >output.sam
        then sort, index and open in IGV:

        Code:
        $ samtools view -bS output.sam | samtools sort -o output.sorted.bam
        $ samtools index output.sorted.bam
        Last edited by gconcepcion; 10-17-2017, 01:52 PM.

        Comment

        • MiniMicrobe
          Junior Member
          • Nov 2015
          • 6

          #5
          Thank you gconcepcion, I had some time booked to day for the bioinfomatics computer and tried your suggestions. It worked perfectly!
          I didn't know that BWA accepted pacbio reads for mapping. I thought it only used short reads.

          Thanks again!

          Comment

          Latest Articles

          Collapse

          • SEQadmin2
            Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
            by SEQadmin2


            Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

            The systematic characterization of the human proteome has
            ...
            Today, 11:48 AM
          • SEQadmin2
            Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
            by SEQadmin2



            Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
            ...
            07-09-2026, 11:10 AM
          • SEQadmin2
            Cancer Drug Resistance: The Lingering Barrier to Rising Survival
            by SEQadmin2



            Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

            There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
            07-08-2026, 05:17 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, Today, 11:10 AM
          0 responses
          8 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-13-2026, 10:26 AM
          0 responses
          30 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-09-2026, 10:04 AM
          0 responses
          38 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-08-2026, 10:08 AM
          0 responses
          25 views
          0 reactions
          Last Post SEQadmin2  
          Working...