[Bioperl-l] Bio::DB::SeqFeature::Store delete() not working

Lincoln Stein lstein at cshl.edu
Wed Jan 31 17:18:56 UTC 2007


Thank you very much for finding and fixing the problem! I was about to start
working on the issue when I saw that you'd taken care of it.

Lincoln

On 1/31/07, Sendu Bala <bix at sendu.me.uk> wrote:
>
> Sendu Bala wrote:
> > Hi,
> >
> > I'm trying to use Bio::DB::SeqFeature::Store delete() on a list of
> > Bio::SeqFeature::Annotated retrieved from the database. It doesn't work.
> > I presume I'm falling foul of the issue pointed out in the docs:
> >
> > "WARNING: The current DBI::mysql implementation has some issues that
> > need to be resolved, namely (1) normalized subfeatures are NOT
> > recursively deleted; and (2) the deletions are not performed in a
> > transaction."
> >
> > Is there a trick to avoid the problem? Or, how might someone go about
> > improving the implementation so that it worked?
>
> Actually, it was just a simple bug in
> Bio::DB::SeqFeature::Store::DBI::mysql::_deleteid()
>
> I've committed a fix that I hope won't break anything; all I did was
> have it return the number of rows deleted, since
> Bio::DB::SeqFeature::Store::delete() needs a true return from
> _deleteid() or it will only delete the first feature supplied to it.
> (I've left the current implementation for delete() which effectively
> gives up the moment a feature fails to be deleted, instead of trying to
> delete the remaining features it was supplied.)
>
> I propose changing delete() to return the number of features it
> successfully deletes instead of boolean, to match store() behaviour. But
> that isn't so important.
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>



-- 
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
(516) 367-8380 (voice)
(516) 367-8389 (fax)
FOR URGENT MESSAGES & SCHEDULING,
PLEASE CONTACT MY ASSISTANT,
SANDRA MICHELSEN, AT michelse at cshl.edu



More information about the Bioperl-l mailing list