[Biojava-l] Extracting information from Genbank

Orest Kozyar orest.kozyar at gmail.com
Wed Jun 6 19:14:51 UTC 2007


I've been trying to figure out how to use Biojava to extract
information from Genbank.  It seems that the following code would work
according to the API docs:

GenbankRichSequenceDB db = new GenbankRichSequenceDB();
RichSequence rs = db.getRichSequence("'NM_177408");

I've also tried variations on the ID (such as gi:NNNNNN) with and
without the gi: annotation where the number corresponds to the record
of interest, but no luck so far.  I keep getting the following error:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/biojava/utils/bytecode/CodeException
        at org.biojava.bio.seq.FeatureFilter$OnlyChildren.<clinit>(FeatureFilter.java:1270)
        at org.biojava.bio.seq.FeatureFilter.<clinit>(FeatureFilter.java:1813)
        at org.biojava.bio.seq.SimpleFeatureHolder.<init>(SimpleFeatureHolder.java:54)
        at org.biojavax.bio.seq.RichFeature$Tools.makeEmptyFeature(RichFeature.java:167)
        at org.biojavax.bio.seq.io.RichSeqIOAdapter.<init>(RichSeqIOAdapter.java:61)
        at org.biojavax.bio.seq.io.SimpleRichSequenceBuilder.<init>(SimpleRichSequenceBuilder.java:100)
        at org.biojavax.bio.seq.io.SimpleRichSequenceBuilderFactory.makeSequenceBuilder(SimpleRichSequenceBuilderFactory.java:70)
        at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:109)
        at org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(GenbankRichSequenceDB.java:154)
        at Test.main(Test.java:58)
Java Result: 1

Perhaps I am just not formatting the string properly?  Any guidance
you can provide will greatly be appreciated!
Thanks,
Orest



More information about the Biojava-l mailing list