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

Richard HOLLAND hollandr at gis.a-star.edu.sg
Mon Jun 20 06:11:57 EDT 2005


There is also the BS-zap-all script in the BioSQL distribution which
will wipe the whole lot for you in one go. :)

Richard Holland
Bioinformatics Specialist
GIS extension 8199
---------------------------------------------
This email is confidential and may be privileged. If you are not the
intended recipient, please delete it and notify us immediately. Please
do not copy or use it for any purpose, or disclose its content to any
other person. Thank you.
---------------------------------------------


> -----Original Message-----
> From: biosql-l-bounces at portal.open-bio.org 
> [mailto:biosql-l-bounces at portal.open-bio.org] On Behalf Of 
> mark.schreiber at novartis.com
> Sent: Monday, June 20, 2005 6:07 PM
> To: Martina
> Cc: biojava-l-bounces at portal.open-bio.org; BioJava; 
> biosql-l at open-bio.org
> Subject: [BioSQL-l] Re: [Biojava-l] _removeSequence
> 
> 
> To remove the database completely (while still keeping the 
> tables etc) you 
> would again need to turn on cascading deletes and delete the 
> appropriate 
> biodatabase row from the biodatabase table (or all of them if 
> you have 
> more than one).
> 
> You cannot currently do this using the biojava interface. You 
> would need 
> to code a JDBC statement to do it for you, or connect to the 
> DB and issue 
> the SQL statement yourself.
> 
> - Mark
> 
> 
> 
> 
> 
> Martina <boehme at mpiib-berlin.mpg.de>
> Sent by: biojava-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:        [Biojava-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
> 
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
> 
> 
> 
> _______________________________________________
> 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