[Biojava-dev] Lazy BioSQL ontology loading?

Simon Foote simon.foote at nrc-cnrc.gc.ca
Tue Feb 17 14:48:03 EST 2004


Hi Len,

I agree with you here.  I just ran into the same problem with the 
ontologies and BioSQL.
I think the core ontology could be lazily loaded if necessary, because 
as you noted, it isn't currently used.

We should still load the __biojava_guano on instantiation as it is used.

Simon

Len Trigg wrote:

>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
>_______________________________________________
>biojava-dev mailing list
>biojava-dev at biojava.org
>http://biojava.org/mailman/listinfo/biojava-dev
>  
>

-- 
Bioinformatics Programmer
Pathogen Genomics
Institute for Biological Sciences
National Research Council of Canada
[T] 613-990-0561  [F] 613-952-9092
simon.foote at nrc-cnrc.gc.ca



More information about the biojava-dev mailing list