[Biojava-l] parsing tblastn results

Charles Imbusch charles at imbusch.net
Tue Oct 14 21:03:04 UTC 2008


Hello,

for a project I want to parse a tblastn result with BioJava. I used the code
on http://biojava.org/wiki/BioJava:CookBook:Blast:Parser as it is and I 
get an
error message as follows:

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: 
String index out of range: -3
    at java.lang.String.substring(String.java:1938)
    at java.lang.String.substring(String.java:1905)
    at 
org.biojava.bio.program.sax.BlastLikeAlignmentSAXParser.parseLine(BlastLikeAlignmentSAXParser.java:289)
    at 
org.biojava.bio.program.sax.BlastLikeAlignmentSAXParser.parse(BlastLikeAlignmentSAXParser.java:115)
    at 
org.biojava.bio.program.sax.HitSectionSAXParser.outputHSPInfo(HitSectionSAXParser.java:514)
    at 
org.biojava.bio.program.sax.HitSectionSAXParser.firstHSPEvent(HitSectionSAXParser.java:287)
    at 
org.biojava.bio.program.sax.HitSectionSAXParser.interpret(HitSectionSAXParser.java:251)
    at 
org.biojava.bio.program.sax.HitSectionSAXParser.parse(HitSectionSAXParser.java:118)
    at 
org.biojava.bio.program.sax.BlastSAXParser.hitsSectionReached(BlastSAXParser.java:635)
    at 
org.biojava.bio.program.sax.BlastSAXParser.interpret(BlastSAXParser.java:337)
    at 
org.biojava.bio.program.sax.BlastSAXParser.parse(BlastSAXParser.java:164)
    at 
org.biojava.bio.program.sax.BlastLikeSAXParser.onNewDataSet(BlastLikeSAXParser.java:313)
    at 
org.biojava.bio.program.sax.BlastLikeSAXParser.interpret(BlastLikeSAXParser.java:276)
    at 
org.biojava.bio.program.sax.BlastLikeSAXParser.parse(BlastLikeSAXParser.java:162)
    at BlastEcho.echo(BlastEcho.java:29)
    at BlastEcho.main(BlastEcho.java:75)

I uploaded the Blast output file I want to parse here:
http://charles.imbusch.net/tmp/blastresult.txt

Any answer is appreciated.

Cheers,
  Charles



More information about the Biojava-l mailing list