[Biojava-l] Re: [BioSQL-l] _removeSequence

mark.schreiber at novartis.com mark.schreiber at novartis.com
Mon Jun 20 05:56:40 EDT 2005


Biojava doesn't attempt to recusivley remove features by itself. It relies 
on cascading deletes in the database. I know Oracle can be set to do this 
(and it works very well). If MySQL has equivalent functionality you may 
need to turn it on. I'm pretty sure it does but you need to set it up.

- Mark





Martina <boehme at mpiib-berlin.mpg.de>
Sent by: biosql-l-bounces at portal.open-bio.org
06/20/2005 05:43 PM

 
        To:     biosql-l at open-bio.org, BioJava <biojava-l at biojava.org>
        cc:     (bcc: Mark Schreiber/GP/Novartis)
        Subject:        [BioSQL-l] _removeSequence


Hi,

Im trying to delete a sequence and recursivly all its features.

So:

for (SequenceIterator si = db.sequenceIterator(); si.hasNext();) {
                 Sequence s = si.nextSequence();
                 String name = s.getName();
                 s = null;
                 db.removeSequence(name);
}

But if I look in the database (MySQL  4.1.12) I can still see plenty 
of entries and I have problems entering the same features again, 
because of dublicate key error. I would like to know if 
_removeSequence(String) in BioSQLSequenceDB is supposed to remove 
features recursivly or just the features of the removed sequence?
If so - what is the best way do delete the features of the features 
(and so on)? And how to empty the db completly?

Martina

_______________________________________________
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