[Biojava-l] RE: [BioSQL-l] update seqfeature

Richard HOLLAND hollandr at gis.a-star.edu.sg
Sun Jun 26 11:06:40 EDT 2005


Actually, BioJava is not that clever. Yet. Martina's original observation is right, in that the correct way to do this would be to check the database to see if the altered seqfeature already existed, and if it did, to refer to that one instead. But this is not the way BioJava does things at present. A fix for this will probably end up being built in to the replacement BioJava/BioSQL classes currently in progress, but for now, to delete/create the feature is probably the best workaround.

cheers,
Richard


-----Original Message-----
From:	biosql-l-bounces at portal.open-bio.org on behalf of Martina
Sent:	Wed 6/22/2005 5:24 PM
To:	simon.foote at nrc-cnrc.gc.ca
Cc:	biosql-l-bounces at portal.open-bio.org; BioJava; biosql-l at open-bio.org
Subject:	[BioSQL-l] update seqfeature 

Hi Simon,

I'm changing the FeatureSource and in setFeatureSource an update on 
the source_term_id happens. In the case the combination is already 
there, I get an Exception. The proper way to deal with that would be 
to get the seqfeature_id of the entry already there and use that, or 
try to update the rank unless its a unique combination? Or should I 
rather not mess with the BioJava and delete that entry and insert it 
as new to let BioJava handle the rank increase?

Thanks for any advise

Martina

Simon Foote wrote:

> Hi Martina,
> 
> In fact you can, as rank is the field that allows this to happen.  In 
> Biojava, currently it's just a linearily incremented number such that 
> you can have the same type and source IDs for a given bioentry.
> 
> For example, adding a Genbank entry with 10 CDS features for 1 bioentry 
> will give you identical keys for bioentry_id, type_term_id and 
> source_term_id, but will have a rank of 1 - 10 for each.
> 
> Simon
> 

_______________________________________________
BioSQL-l mailing list
BioSQL-l at open-bio.org
http://open-bio.org/mailman/listinfo/biosql-l







More information about the Biojava-l mailing list