[BioSQL-l] Question regarding updating records in a BioSQL database (under Python)

Dan Tomso dtomso at agbiome.com
Wed Mar 13 13:47:27 UTC 2013


Thanks, Peter.
I arrived at the same solution (new/old DB namespace).  I will soldier on with some combination of new entry creation/old entry destruction and using files for 'holding' sequences at various stages of annotation.

I'll take further discussion to the Dev list as suggested.

Best regards,
Dan T.


On Mar 12, 2013, at 4:58 PM, Peter Cock <p.j.a.cock at googlemail.com> wrote:

> 
> 
> On Tuesday, March 12, 2013, Dan Tomso wrote:
> Hello all--
> This seems trivial, but I'm struggling with how to add SeqFeatures to a BioSQL DBSeqRecord object.
> 
> I can update the object, but then I can't update the DB.  If I delete the original from the db, it kills the updated copy.  If I try to deep copy the original, I get lots of errors.  If I try to load the modified record without removing the original, I get a collision.
> 
> I've tried also just updating the entry via the dictionary-like approach.
> 
> Where am I going wrong?
> 
> Thanks,
> Dan Tomso
> 
> 
> Hi Dan,
> 
> It sounds like you are using Biopython, right? Clearly our
> docs need a little more clarification - the dictionary like
> interface (and the whole DBSeqRecord) uses a read only
> lazy loading approach (for example neither the sequence
> nor the features are loaded from the database into objects
> in memory until accessed).
> 
> You could try creating a separate namespace (e.g. Old
> and New) within the same database to allow you to
> save the modified record into a new namespace and
> so avoid the clashes... but basically the problem is you
> are trying to do something the API was never designed
> to cater to.
> 
> If you want to discuss possible enhancements, then
> the Biopython-dev mailing list might be more relevant.
> 
> Regards,
> 
> Peter 





More information about the BioSQL-l mailing list