[Biojava-dev] Lazy BioSQL ontology loading?

Len Trigg len at reeltwo.com
Tue Feb 17 14:29:03 EST 2004


Hi guys,

A while ago when the ontology stuff had those major updates I remember 
having to go through a procedure to migrate my existing biosql databases 
to comply with the new ontology handling.

A few days ago when I tried out the current biojava code on my 
databases, it died with the following complaint about a particular 
ontology term not being present in the database. I presume this may be 
because something changed in the grammar and that I need to repeat the 
ontology import procedure?

Exception in thread "main" java.util.NoSuchElementException: No term 
named 'and(_r:89(_x:89, _y:89), _r:89(_y:89, _z:89))'
         at org.biojava.ontology.Ontology$Impl.getTerm(Ontology.java:275)
         at 
org.biojava.bio.seq.db.biosql.OntologySQL.blessExternal(OntologySQL.java:321)
         at 
org.biojava.bio.seq.db.biosql.OntologySQL.loadTerms(OntologySQL.java:314)
         at 
org.biojava.bio.seq.db.biosql.OntologySQL.<init>(OntologySQL.java:360)
         at 
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.initDb(BioSQLSequenceDB.java:235)
         at 
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.<init>(BioSQLSequenceDB.java:164)


Loading this ontology is actually relatively time consuming, and since 
my current applications don't even use ontologies (well, other than 
__biojava_guano), I was thinking about making the ontology loading lazy. 
This would reduce the startup time of my apps as well as providing some 
protection against grammar changes. Does anyone have any thoughts about 
potential pitfalls?



Cheers,
Len


More information about the biojava-dev mailing list