Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing sequences from mysql using bioentry-id #2

Open
cjfields opened this issue Oct 7, 2015 · 3 comments
Open

Removing sequences from mysql using bioentry-id #2

cjfields opened this issue Oct 7, 2015 · 3 comments

Comments

@cjfields
Copy link
Member

cjfields commented Oct 7, 2015


Author Name: Nikolay empty (Nikolay empty)
Original Redmine Issue: 1528, https://redmine.open-bio.org/issues/1528
Original Date: 2003-09-26
Original Assignee: Bioperl Guts


Hi I have been using biosql with mysql database for analyzing genetic material.
You have included the script that gets data into the database called
load_seqdatabase.pl. However, the main problem is that there doesn’t seem to
exist a safe way of REMOVING sequences from this database. Can you write a
script that cleanly removes biosequence and information about it based on
Accession Number, or simply bioentry_id. Such script would allow a greater
control and order of the database.

Of course the easiest solution is not to add those unwanted sequences in the
first place, and that’s what I’ve been doing. However, proves to be extrememly
inconvenient.

Thanx

Nikolay

@cjfields
Copy link
Member Author

cjfields commented Oct 7, 2015


Original Redmine Comment
Author Name: Sendu Bala
Original Date: 2006-09-02T10:30:26Z


We would welcome any contribution from you to resolve this: after all these years it doesn’t seem like anyone else has been interested.

@cjfields
Copy link
Member Author

cjfields commented Oct 7, 2015


Original Redmine Comment
Author Name: Chris Fields
Original Date: 2006-11-09T12:28:24Z


Though there is no documentation, the test scripts in bioperl-db demonstrate how to remove persistent objects from the database. i.e. from 13remove.t:

# delete seq
foreach $pseq (@seqs) {
    ok ($pseq->remove(), 1);
}

from 03simpleseq.t:

# delete seq and namespace
ok ($pseq->remove(), 1);
my $ns = Bio::DB::Persistent::BioNamespace->new(-identifiable => $pseq);
ok $ns = $db->get_object_adaptor($ns)->find_by_unique_key($ns);
ok $ns->primary_key();
ok ($ns->remove(), 1);

@cjfields
Copy link
Member Author

cjfields commented Oct 7, 2015


Original Redmine Comment
Author Name: Chris Fields
Original Date: 2007-09-24T15:10:48Z


I think this has been answered several times on the mail list and here. Maybe time to get a bioperl-db HOWTO up and going?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant