[Biojava-l] Exception thrown when parsing GenBank file

Dietmar Birzer Dietmar.Birzer at biologie.uni-regensburg.de
Mon Nov 14 16:53:29 UTC 2011


Hi all, 

I am currently trying to debug a little software application which uses BioJava's core-1.8.1.jar library because it has started to throw exceptions a while ago.  

I guess the problem is, that the GenbankLocationParser is not able to handle "Het" entries in the features section of the GenBank/GenPept format, e.g.  

 Het             join(bond(9),bond(125))  
                     /heterogen="( NA,   5 )"  

for database id 14719485 (http://www.ncbi.nlm.nih.gov/protein/14719485) .  

Calling   

new GenpeptRichSequenceDB().getRichSequence("14719485");  

will result in an error message like:  

Error while querying 14719485!  
org.biojava.bio.BioException: Failed to read Genbank sequence  
at org.biojavax.bio.db.ncbi.GenpeptRichSequenceDB.getRichSequence(GenpeptRichSequenceDB.java:158)  
Caused by: org.biojava.bio.BioException: Could not read sequence  
at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:113)  
at org.biojavax.bio.db.ncbi.GenpeptRichSequenceDB.getRichSequence(GenpeptRichSequenceDB.java:154)  
... 2 more  
Caused by: org.biojava.bio.seq.io.ParseException: Could not understand position: bond(9  
at org.biojavax.bio.seq.io.GenbankLocationParser.parsePosition(GenbankLocationParser.java:286)  
at org.biojavax.bio.seq.io.GenbankLocationParser.parseLocString(GenbankLocationParser.java:272)  
at org.biojavax.bio.seq.io.GenbankLocationParser.parseLocString(GenbankLocationParser.java:237)  
at org.biojavax.bio.seq.io.GenbankLocationParser.parseLocation(GenbankLocationParser.java:132)  
at org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(GenbankFormat.java:508)  
at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:110)  
... 3 more  

I have checked several other database entires and none of the ones that worked had a "Het" entry. But I also failed at 56965892, 13786715, 209156668 and 12084365. Has anybody else come across this problem or knows how to fix it?  

Thanks,  
 Dietmar




More information about the Biojava-l mailing list