Re: Parsing exception reading sequence from GenbankRichSequenceDB

George Waldon <[email protected]>
Newsgroups gmane.comp.java.bio.general
Message-ID <[email protected]>
Hello Scott,

This appears to be an exception thrown by the parser. Is-there a way  
you can fetch the sequence(s) as a text file before the exception  
occurs? It would be interesting to see if you can reproduce the  
exception; you can send me the file if you want.

Regards,
George

Quoting Scott Frees <[email protected]>:

> Hello -
>
> I have developed an application that searches and compares
> g-quadruplexes within mRNA.  The web application has been running
> without any problems on several different web servers for over a year.
>  Suddenly, just this week, it is unable to download sequence data
> using GenbankRichSequenceDB - has anyone else has had this problem?
>
> We are using BioJava 1.8.1
>
> Below is the exception trace, and the code that follows is a small
> test app that generates the exception.  This code worked without any
> problems prior to Tuesday this week, and we haven't made any
> modification to our application.
> ------------------------------------------------------
> org.biojava.bio.BioException: Failed to read Genbank sequence
> 	at  
> org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(GenbankRichSequenceDB.java:163)
> 	at Tester.main(Tester.java:11)
> 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.GenbankRichSequenceDB.getRichSequence(GenbankRichSequenceDB.java:159)
> 	... 1 more
> Caused by: org.biojava.bio.seq.io.ParseException:
>
> A Exception Has Occurred During Parsing.
> Please submit the details that follow to [email protected] or post
> a bug report to http://bugzilla.open-bio.org/
>
> Format_object=org.biojavax.bio.seq.io.GenbankFormat
> Accession=null
> Id=null
> Comments=Bad section
> Parse_block=<?xml   version="1.0"?>
> Stack trace follows ....
>
> 	at org.biojavax.bio.seq.io.GenbankFormat.readSection(GenbankFormat.java:620)
> 	at  
> org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(GenbankFormat.java:279)
> 	at  
> org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:110)
> 	... 2 more
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out
> of range: -4
> 	at java.lang.String.substring(Unknown Source)
> 	at java.lang.String.substring(Unknown Source)
> 	at org.biojavax.bio.seq.io.GenbankFormat.readSection(GenbankFormat.java:610)
> 	... 4 more
> -----------------------------
>
>
> import org.biojava.bio.BioException;
> import org.biojava.bio.seq.db.IllegalIDException;
> import org.biojavax.bio.db.ncbi.GenbankRichSequenceDB;
> import org.biojavax.bio.seq.RichSequence;
>
> public class Tester {
> 	public static void main(String args[]) {
> 		String id = "NM_001110.2";  // Issue occurs with any ID
> 		GenbankRichSequenceDB  ncbi = new GenbankRichSequenceDB();
> 		try {
> 			RichSequence rs = ncbi.getRichSequence(id);
> 			System.out.println(rs.seqString());
> 		} catch (IllegalIDException e) {
> 			e.printStackTrace();
> 		} catch (BioException e) {
> 			e.printStackTrace();
> 		}
> 	}
> }
>
> _______________________________________________
> Biojava-l mailing list  -  [email protected]
> http://lists.open-bio.org/mailman/listinfo/biojava-l
>



--------------------------------
George Waldon


_______________________________________________
Biojava-l mailing list  -  [email protected]
http://lists.open-bio.org/mailman/listinfo/biojava-l
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.