Hello,

I have a question regarding the BioSQL-schema-scripts.
The tutorial on installing BioSQL (http://www.biojava.org/tutorials/biosql.html) says that three scripts are required:

biosqldb-pg.sql
biosql-accelerators-pg.sql
biosqldb-assembly-pg.sql

However, the 'assembly'-script can not be found on the CVS-server. Instead there is another script called 'biosqldb-views-pg.sql'.
So I would like to know which scripts should be used.


Furthermore I have a problem with adding an annotation (or also a feature) to a RichSequence. As it seems to be a problem with Hibernate and/or the BioSQL-schemas: I use BioJava-live (CVS) from 2 weeks ago and the latest CVS-BioSQL-scripts.

When I try the following code, the following Exceptions are thrown (while the execution of line 2).

1 RichSequence seq = (SimpleRichSequence) RichSequence.Tools.enrich(DNATools.createDNASequence("gattacagattaca","urn:local:seq")); 2 ComparableTerm ct = RichObjectFactory.getDefaultOntology().getOrCreateTerm("projectname");
3        seq.getAnnotation().setProperty(ct, "project_25");




Exception in thread "main" java.lang.RuntimeException: Error while trying to call new class org.biojavax.ontology.SimpleComparableOntology(class java.lang.String) at org.biojavax.bio.db.HibernateRichObjectBuilder.buildObject(HibernateRichObjectBuilder.java:154) at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java:97) at org.biojavax.RichObjectFactory.getDefaultOntology(RichObjectFactory.java:178)
       at hibernatetest.Main.main(Main.java:246)
Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
at org.biojavax.bio.db.HibernateRichObjectBuilder.buildObject(HibernateRichObjectBuilder.java:138)
       ... 3 more
Caused by: org.hibernate.exception.SQLGrammarException: could not insert: [Ontology] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.id.AbstractPostInsertGenerator.getGenerated(AbstractPostInsertGenerator.java:56) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1994) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2405) at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:37)
       at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:269) at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101) at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131) at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87) at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
       at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:642)
       at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:616)
       ... 8 more
Caused by: org.postgresql.util.PSQLException: ERROR: relation "ontology_ontology_id_seq" does not exist at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1512) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1297) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:430) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:346) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:250) at org.hibernate.id.AbstractPostInsertGenerator.getGenerated(AbstractPostInsertGenerator.java:42)
       ... 20 more



Thanks in advance!

Greetings,
Felix







--
Felix Dreher
Max-Planck-Institute for Infection Biology
Campus Charité Mitte
Department of Immunology
Mailing address: Schumannstraße 21/22
Visitors: Virchowweg 12
10117 Berlin
Germany
Tel.: +49 (0)30 28460-254 / -494
Mobile: +49 (0)163 7542426

_______________________________________________
Biojava-l mailing list  -  Biojava-l@biojava.org
http://biojava.org/mailman/listinfo/biojava-l

Reply via email to