[Biojava-dev] [Bug 2587] New: Problems with adding miRNA to sequence

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Mon Sep 15 11:36:52 UTC 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2587

           Summary: Problems with adding miRNA to sequence
           Product: BioJava
           Version: live (CVS source)
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DB / BioSQL
        AssignedTo: biojava-dev at biojava.org
        ReportedBy: gabrielle_doan at gmx.net


There is a problem if you want to insert new features (miRNA from
http://microrna.sanger.ac.uk/cgi-bin/targets/v5/download.pl ) into an existing
ing BioSQL
database which contains chromosomes 1-22, X, Y and MT downloaded from
ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/.
with following code: 

   private void makeAFeature(String id, String chr, int startpos,            
int endpos, Strand strand, float score, String gene)
            throws ChangeVetoExceptionIllegalSymbolException     {
        RichSequence rs = chromosomes.get(chr);
        if (rs == null) {
            rs = db.SearchForSequence(chr);
            chromosomes.put(chr, rs);
        }
        RichFeature feat = RichFeature.Tools.makeEmptyFeature();
        feat.setName(id);               
        RichLocation rl = new SimpleRichLocation(new                
        SimplePosition(startpos),new SimplePosition(endpos),                
1,strand);
        feat.setLocation(rl);
        try {                               
        feat.setTypeTerm(RichObjectFactory.getDefaultOntology()
                .getOrCreateTerm("miRNA"));
            feat.setType(feat.getTypeTerm().getName());
        } catch (InvalidTermException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        feat.getAnnotation().setProperty("score",                    
Float.valueOf(score));
        feat.getAnnotation().setProperty("gene", gene);
        feat.setParent(rs);
        rs.getFeatureSet().add(feat);
    }


The information for chromosome 3-22, X, Y and MT are inserted successfully.
But when you try to deal with chromosome 1 and 2 in the same way you get
following message:

org.hibernate.exception.DataException: could not insert: [Feature]
    at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
    at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
    at
org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:40)
    at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2163)
    at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2643)
    at
org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:51)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
    at
org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
    at
org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
    at
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
    at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
    at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
    at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94)
    at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
    at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
    at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
    at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:218)
    at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
    at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:216)
    at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
    at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:296)
    at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)
    at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
    at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
    at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
    at
org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:131)
    at
org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:122)
    at
org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:65)
    at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
    at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
    at
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
    at org.viewer.db.HBioSQLDB.updateSequence(HBioSQLDB.java:254)
    at org.viewer.io.MakeMiRNA.splitLine(MakeMiRNA.java:220)
    at org.viewer.io.MakeMiRNA.main(MakeMiRNA.java:57)
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of
range value adjusted for column 'rank' at row 1
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2973)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1600)
    at
com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1129)
    at
com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:681)
    at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1368)
    at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1283)
    at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1268)
    at
org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:73)
    at
org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:33)
    ... 32 more


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the biojava-dev mailing list