[Biojava-l] Parsing Genbank-sequences from NCBI

Seth Johnson johnson.biotech at gmail.com
Fri Aug 4 15:59:56 UTC 2006


Hi Richard,


I'm back for more help.  I've just completed getting and parsing the entire
human genome RefSeq list from NCBI.  I'm not going to post my source code
since the invoking code has been described by the gentlemen who started the
original thread last month.  The result of the parsing is such that out of
~28K sequences, 13 produced the exceptions below.  I've used the latest
biojava code from CVS, not quite sure what the problem is on these 13.



Trying to get: NM_006145

org.biojava.bio.BioException: Failed to read Genbank sequence

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:157)

        at exonhit.parsers.RefSeqParser.updateRefSeq(RefSeqParser.java:162)

        at exonhit.parsers.RefSeqParser.update(RefSeqParser.java:146)

        at exonhit.parsers.RefSeqParser.main(RefSeqParser.java:195)

Caused by: org.biojava.bio.BioException: Could not read sequence

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:112)

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:153)

        ... 3 more

Caused by: java.lang.IllegalArgumentException: Could not find constructor
for class org.biojavax.SimpleDocRef(class java.util.ArrayList,class
java.lang.String,null)

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:78)

        at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java
:104)

        at org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(
GenbankFormat.java:387)

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:109)

        ... 4 more

Caused by: java.lang.NullPointerException

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:59)

        ... 7 more

org.biojava.bio.BioException: Failed to read Genbank sequence

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:157)

--------------------------------------------------------------------------------

Trying to get: NM_000602

        at exonhit.parsers.RefSeqParser.updateRefSeq(RefSeqParser.java:162)

        at exonhit.parsers.RefSeqParser.update(RefSeqParser.java:146)

        at exonhit.parsers.RefSeqParser.main(RefSeqParser.java:195)

Caused by: org.biojava.bio.BioException: Could not read sequence

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:112)

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:153)

        ... 3 more

Caused by: java.lang.IllegalArgumentException: Could not find constructor
for class org.biojavax.SimpleDocRef(class java.util.ArrayList,class
java.lang.String,null)

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:78)

        at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java
:104)

        at org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(
GenbankFormat.java:387)

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:109)

        ... 4 more

Caused by: java.lang.NullPointerException

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:59)

        ... 7 more

-------------------------------------------------------------------------------

Trying to get: NM_006226

org.biojava.bio.BioException: Failed to read Genbank sequence

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:157)

        at exonhit.parsers.RefSeqParser.updateRefSeq(RefSeqParser.java:162)

        at exonhit.parsers.RefSeqParser.update(RefSeqParser.java:146)

        at exonhit.parsers.RefSeqParser.main(RefSeqParser.java:195)

Caused by: org.biojava.bio.BioException: Could not read sequence

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:112)

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:153)

        ... 3 more

Caused by: java.lang.IllegalArgumentException: Could not find constructor
for class org.biojavax.SimpleDocRef(class java.util.ArrayList,class
java.lang.String,null)

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:78)

        at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java
:104)

        at org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(
GenbankFormat.java:387)

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:109)

        ... 4 more

Caused by: java.lang.NullPointerException

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:59)

        ... 7 more

----------------------------------------------------------------------------------

Trying to get: NM_000371

org.biojava.bio.BioException: Failed to read Genbank sequence

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:157)

        at exonhit.parsers.RefSeqParser.updateRefSeq(RefSeqParser.java:162)

        at exonhit.parsers.RefSeqParser.update(RefSeqParser.java:146)

        at exonhit.parsers.RefSeqParser.main(RefSeqParser.java:195)

Caused by: org.biojava.bio.BioException: Could not read sequence

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:112)

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:153)

        ... 3 more

Caused by: java.lang.IllegalArgumentException: Could not find constructor
for class org.biojavax.SimpleDocRef(class java.util.ArrayList,class
java.lang.String,null)

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:78)

        at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java
:104)

        at org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(
GenbankFormat.java:387)

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:109)

        ... 4 more

Caused by: java.lang.NullPointerException

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:59)

        ... 7 more

--------------------------------------------------------------------------------

Trying to get: NM_019072

org.biojava.bio.BioException: Failed to read Genbank sequence

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:157)

        at exonhit.parsers.RefSeqParser.updateRefSeq(RefSeqParser.java:162)

        at exonhit.parsers.RefSeqParser.update(RefSeqParser.java:146)

        at exonhit.parsers.RefSeqParser.main(RefSeqParser.java:195)

Caused by: org.biojava.bio.BioException: Could not read sequence

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:112)

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:153)

        ... 3 more

Caused by: java.lang.IllegalArgumentException: Could not find constructor
for class org.biojavax.SimpleDocRef(class java.util.ArrayList,class
java.lang.String,null)

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:78)

        at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java
:104)

        at org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(
GenbankFormat.java:387)

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:109)

        ... 4 more

Caused by: java.lang.NullPointerException

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:59)

        ... 7 more

--------------------------------------------------------------------------------

Trying to get: NM_017884

org.biojava.bio.BioException: Failed to read Genbank sequence

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:157)

        at exonhit.parsers.RefSeqParser.updateRefSeq(RefSeqParser.java:162)

        at exonhit.parsers.RefSeqParser.update(RefSeqParser.java:146)

        at exonhit.parsers.RefSeqParser.main(RefSeqParser.java:195)

Caused by: org.biojava.bio.BioException: Could not read sequence

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:112)

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:153)

        ... 3 more

Caused by: java.lang.IllegalArgumentException: Could not find constructor
for class org.biojavax.SimpleDocRef(class java.util.ArrayList,class
java.lang.String,null)

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:78)

        at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java
:104)

        at org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(
GenbankFormat.java:387)

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:109)

        ... 4 more

Caused by: java.lang.NullPointerException

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:59)

        ... 7 more

--------------------------------------------------------------------------------

Trying to get: NM_022107

org.biojava.bio.BioException: Failed to read Genbank sequence

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:157)

        at exonhit.parsers.RefSeqParser.updateRefSeq(RefSeqParser.java:162)

        at exonhit.parsers.RefSeqParser.update(RefSeqParser.java:146)

        at exonhit.parsers.RefSeqParser.main(RefSeqParser.java:195)

Caused by: org.biojava.bio.BioException: Could not read sequence

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:112)

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:153)

        ... 3 more

Caused by: java.lang.IllegalArgumentException: Could not find constructor
for class org.biojavax.SimpleDocRef(class java.util.ArrayList,class
java.lang.String,null)

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:78)

        at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java
:104)

        at org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(
GenbankFormat.java:387)

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:109)

        ... 4 more

Caused by: java.lang.NullPointerException

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:59)

        ... 7 more

---------------------------------------------------------------------------------

Trying to get: NM_031418

org.biojava.bio.BioException: Failed to read Genbank sequence

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:157)

        at exonhit.parsers.RefSeqParser.updateRefSeq(RefSeqParser.java:162)

        at exonhit.parsers.RefSeqParser.update(RefSeqParser.java:146)

        at exonhit.parsers.RefSeqParser.main(RefSeqParser.java:195)

Caused by: org.biojava.bio.BioException: Could not read sequence

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:112)

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:153)

        ... 3 more

Caused by: java.lang.IllegalArgumentException: Could not find constructor
for class org.biojavax.SimpleDocRef(class java.util.ArrayList,class
java.lang.String,null)

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:78)

        at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java
:104)

        at org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(
GenbankFormat.java:387)

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:109)

        ... 4 more

Caused by: java.lang.NullPointerException

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:59)

        ... 7 more

---------------------------------------------------------------------------------------

Trying to get: NM_030809

org.biojava.bio.BioException: Failed to read Genbank sequence

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:157)

        at exonhit.parsers.RefSeqParser.updateRefSeq(RefSeqParser.java:162)

        at exonhit.parsers.RefSeqParser.update(RefSeqParser.java:146)

        at exonhit.parsers.RefSeqParser.main(RefSeqParser.java:195)

Caused by: org.biojava.bio.BioException: Could not read sequence

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:112)

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:153)

        ... 3 more

Caused by: java.lang.IllegalArgumentException: Could not find constructor
for class org.biojavax.SimpleDocRef(class java.util.ArrayList,class
java.lang.String,null)

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:78)

        at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java
:104)

        at org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(
GenbankFormat.java:387)

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:109)

        ... 4 more

Caused by: java.lang.NullPointerException

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:59)

        ... 7 more

-------------------------------------------------------------------------------------

Trying to get: NM_032731

org.biojava.bio.BioException: Failed to read Genbank sequence

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:157)

        at exonhit.parsers.RefSeqParser.updateRefSeq(RefSeqParser.java:162)

        at exonhit.parsers.RefSeqParser.update(RefSeqParser.java:146)

        at exonhit.parsers.RefSeqParser.main(RefSeqParser.java:195)

Caused by: org.biojava.bio.BioException: Could not read sequence

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:112)

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:153)

        ... 3 more

Caused by: java.lang.IllegalArgumentException: Could not find constructor
for class org.biojavax.SimpleDocRef(class java.util.ArrayList,class
java.lang.String,null)

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:78)

        at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java
:104)

        at org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(
GenbankFormat.java:387)

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:109)

        ... 4 more

Caused by: java.lang.NullPointerException

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:59)

        ... 7 more

------------------------------------------------------------------------------------

Trying to get: NM_001029888

org.biojava.bio.BioException: Failed to read Genbank sequence

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:157)

        at exonhit.parsers.RefSeqParser.updateRefSeq(RefSeqParser.java:162)

        at exonhit.parsers.RefSeqParser.update(RefSeqParser.java:146)

        at exonhit.parsers.RefSeqParser.main(RefSeqParser.java:195)

Caused by: org.biojava.bio.BioException: Could not read sequence

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:112)

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:153)

        ... 3 more

Caused by: java.lang.IllegalArgumentException: Could not find constructor
for class org.biojavax.SimpleDocRef(class java.util.ArrayList,class
java.lang.String,null)

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:78)

        at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java
:104)

        at org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(
GenbankFormat.java:387)

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:109)

        ... 4 more

Caused by: java.lang.NullPointerException

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:59)

        ... 7 more

------------------------------------------------------------------------------------

Trying to get: NM_001029869

org.biojava.bio.BioException: Failed to read Genbank sequence

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:157)

        at exonhit.parsers.RefSeqParser.updateRefSeq(RefSeqParser.java:162)

        at exonhit.parsers.RefSeqParser.update(RefSeqParser.java:146)

        at exonhit.parsers.RefSeqParser.main(RefSeqParser.java:195)

Caused by: org.biojava.bio.BioException: Could not read sequence

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:112)

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:153)

        ... 3 more

Caused by: java.lang.IllegalArgumentException: Could not find constructor
for class org.biojavax.SimpleDocRef(class java.util.ArrayList,class
java.lang.String,null)

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:78)

        at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java
:104)

        at org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(
GenbankFormat.java:387)

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:109)

        ... 4 more

Caused by: java.lang.NullPointerException

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:59)

        ... 7 more

------------------------------------------------------------------------------------

Trying to get: NM_182572

org.biojava.bio.BioException: Failed to read Genbank sequence

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:157)

        at exonhit.parsers.RefSeqParser.updateRefSeq(RefSeqParser.java:162)

        at exonhit.parsers.RefSeqParser.update(RefSeqParser.java:146)

        at exonhit.parsers.RefSeqParser.main(RefSeqParser.java:195)

Caused by: org.biojava.bio.BioException: Could not read sequence

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:112)

        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(
GenbankRichSequenceDB.java:153)

        ... 3 more

Caused by: java.lang.IllegalArgumentException: Could not find constructor
for class org.biojavax.SimpleDocRef(class java.util.ArrayList,class
java.lang.String,null)

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:78)

        at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java
:104)

        at org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(
GenbankFormat.java:387)

        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(
RichStreamReader.java:109)

        ... 4 more

Caused by: java.lang.NullPointerException

        at org.biojavax.SimpleRichObjectBuilder.buildObject(
SimpleRichObjectBuilder.java:59)

        ... 7 more




-- 
Best Regards,


Seth Johnson
Senior Bioinformatics Associate



More information about the Biojava-l mailing list