[Biojava-l] Problems with adding miRNA to sequence

Gabrielle Doan gabrielle_doan at gmx.net
Thu Aug 28 14:16:52 UTC 2008


Hi all,
I would like to insert new features (miRNA) into my exitsting BioSQL
database. At the moment the database contains the chromosomes 1-22, X, Y
and MT downloaded from ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/. And
now I have tried to add the information about miRNA from
http://microrna.sanger.ac.uk/cgi-bin/targets/v5/download.pl into my
database 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);
	}

I successfully inserted the information for chromosome 3-22, X, Y and MT.
But when I try to deal with chromosome 1, 2 in the same way I 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

It would be very nice if someone could help me. I am grateful for any
hints. Thanks a lot.

Cheers,
Gabrielle




More information about the Biojava-l mailing list