[Biojava-dev] [Bug 2603] StringIndexOutOfBoundsException while parsing blastresult

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Fri Oct 3 10:30:16 UTC 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2603





------- Comment #1 from dtoomey at rcsi.ie  2008-10-03 06:30 EST -------
I have narrowed down the offending line to

oParsedSeq = poLine.substring( iOffset).concat( new String( oPadding ) );

from 'BlastLikeAlignmentSAXParser.java'

I have put in a hack which at least allows me to run the code

                try {
                        oParsedSeq = poLine.substring( iOffset).concat( new
String( oPadding ) );
                } catch (StringIndexOutOfBoundsException ex) {
                        System.out.println("Caught sub string error for poLine:
" + poLine + " Offset is " + String.valueOf(iOffset));
                        oParsedSeq = poLine.concat( new String( oPadding ) );
                }

(In reply to comment #0)
> While parsing a blast result I get a StringIndexOutOfBoundsException. I have
> narrowed down the cuase of the error to this section
> Query= sp|P62368|ISPF_PLAF7 2-C-methyl-D-erythritol
> 2,4-cyclodiphosphate synthase OS=Plasmodium falciparum (isolate 3D7)
> GN=ISPF
> What I have found is that if the 3rd line is less than 11 characters long the
> error is thrown. If I add text or even extra spaces to this line then the error
> does not occur. Also I have noticed that it does not happen to the first entry
> in a file containing multiple blast searches.
> I have tried this on both Windows and Linux and get the same error. I have been
> using blast version 2.2.18 but have also tried 2.2.17


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the biojava-dev mailing list