[BioSQL-l] Oracle BIoSQL Schema + BioJava

Hilmar Lapp hlapp at gnf.org
Sat Aug 7 20:17:40 EDT 2004


Sorry for the late reply Michael. I was trapped at Glasgow airport for  
quite a while ...

It looks like what it's complaining about is a violation of the  
constraint on Biosequence.Alphabet. The constraint limits the allowed  
values to one of 'dna', 'protein', or 'rna'. You could check the code  
or with the biojava folks on what they are inserting there, or if you  
trust that what they do still makes sense, simply remove the constraint:

	SQL> ALTER TABLE SG_Biosequence DROP CONSTRAINT Alphabet4;

If that gets you going, you could check later which values caused the  
complaint:

	SQL> SELECT DISTINCT Alphabet FROM Biosequence WHERE alphabet NOT IN  
('dna','protein','rna');

Hth,

	-hilmar

On Wednesday, August 4, 2004, at 07:34  AM, Michael Griffith wrote:

> Hi,
>
> I am able to get the latest BioJava 1.4 release to work with the BioSQL
> schema on MySQL, but I am having problems with setting up the oracle
> version.
>
> I have downloaded and installed the BS-create-Biosql-API2.sql file  
> posted a
> week ago by Hilmar Lapp.  Hilmar also informed me that there was a  
> table
> missing -- which I believe is the term_relationship_term table.  This  
> table
> was also missing from the mySQL schema.
>
> I've recreated the DB with this table, and the new improved API/views.
> However when I am trying to load a Genebank record into the database,  
> I get
> the following exception stack:
>
> [java] org.biojava.bio.BioRuntimeException: Error adding sequence:  
> AA000001
> (rolled back successfully)
> [java]     at
> org.biojava.bio.seq.db.biosql.BioSQLSequenceDB._addSequence(BioSQLSeque 
> nceDB
> .java:498)
> {java]     at
> org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.addSequence(BioSQLSequen 
> ceDB.
> java:365)
> [java]     at  
> com.gts.genebank.GeneralReader.main(GeneralReader.java:74)
> [java] Caused by: java.sql.SQLException: ORA-02290: check constraint
> (BIOSQL_APP.ALPHABET4) violated
> [java]     at
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>      [java]     at  
> oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
>
> My code is simply doing the following:
>
> SequenceDB db = new BioSQLSequenceDB(dbDriver, dbURL, dbUser, dbPass,
> biodatabase, create);
>
>     SequenceIterator iter =
>         (SequenceIterator)SeqIOTools.fileToBiojava(format, alpha, br);
>
>     while (iter.hasNext()) {
>         Sequence seq = iter.nextSequence();
>         try {
>             db.addSequence(seq);
>          } catch (Exception e) {
>                     e.printStackTrace();
>          }
>     }
>
>
> This code works successfully against the mySQL version of the current  
> biosql
> schema.  Although there was a problem with the term.name field and case
> sensitivity in that version as well. In order to get that to work, the  
> field
> had to be marked as binary.  I am wondering if I am running into a  
> similar
> problem here?
>
> Any help would be greatly appreciated!
>
> Cheers!
>
> Michael Griffith
>
> _______________________________________________
> BioSQL-l mailing list
> BioSQL-l at open-bio.org
> http://open-bio.org/mailman/listinfo/biosql-l
>
-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------




More information about the BioSQL-l mailing list