SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
pacbio reads alignment Rui Guo Pacific Biosciences 1 05-19-2016 09:21 AM
Problems running nanocorr error correction w/ illumina reads and pacbio data jmartin Bioinformatics 1 01-28-2016 01:03 PM
BBMap Error Phage Hunter Bioinformatics 5 01-14-2015 05:34 AM
error correcting pacbio reads markcharder Bioinformatics 2 12-01-2014 07:37 AM

Reply
 
Thread Tools
Old 10-17-2017, 11:28 AM   #1
MiniMicrobe
Junior Member
 
Location: Nottingham

Join Date: Nov 2015
Posts: 6
Default 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
MiniMicrobe is offline   Reply With Quote
Old 10-17-2017, 12:16 PM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,814
Default

Have you used Mauve to take a look at how your genome looks compared to other known ones?
GenoMax is offline   Reply With Quote
Old 10-17-2017, 01:26 PM   #3
MiniMicrobe
Junior Member
 
Location: Nottingham

Join Date: Nov 2015
Posts: 6
Default

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.
MiniMicrobe is offline   Reply With Quote
Old 10-17-2017, 02:28 PM   #4
gconcepcion
Member
 
Location: Menlo Park

Join Date: Dec 2010
Posts: 68
Default

Quote:
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 at 02:52 PM.
gconcepcion is offline   Reply With Quote
Old 10-21-2017, 07:40 AM   #5
MiniMicrobe
Junior Member
 
Location: Nottingham

Join Date: Nov 2015
Posts: 6
Default

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!
MiniMicrobe is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 12:03 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO