Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

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

    Comment


    • #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


      • #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


        • #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

          • seqadmin
            Exploring the Dynamics of the Tumor Microenvironment
            by seqadmin




            The complexity of cancer is clearly demonstrated in the diverse ecosystem of the tumor microenvironment (TME). The TME is made up of numerous cell types and its development begins with the changes that happen during oncogenesis. “Genomic mutations, copy number changes, epigenetic alterations, and alternative gene expression occur to varying degrees within the affected tumor cells,” explained Andrea O’Hara, Ph.D., Strategic Technical Specialist at Azenta. “As...
            07-08-2024, 03:19 PM
          • seqadmin
            Exploring Human Diversity Through Large-Scale Omics
            by seqadmin


            In 2003, researchers from the Human Genome Project (HGP) announced the most comprehensive genome to date1. Although the genome wasn’t fully completed until nearly 20 years later2, numerous large-scale projects, such as the International HapMap Project and 1000 Genomes Project, continued the HGP's work, capturing extensive variation and genomic diversity within humans. Recently, newer initiatives have significantly increased in scale and expanded beyond genomics, offering a more detailed...
            06-25-2024, 06:43 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, Yesterday, 06:53 AM
          0 responses
          12 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 07-10-2024, 07:30 AM
          0 responses
          34 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 07-03-2024, 09:45 AM
          0 responses
          204 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 07-03-2024, 08:54 AM
          0 responses
          213 views
          0 likes
          Last Post seqadmin  
          Working...
          X