{"action":"created","issue":{"url":"https://api.github.com/repos/cjfields/redmine-test/issues/3","labels_url":"https://api.github.com/repos/cjfields/redmine-test/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/cjfields/redmine-test/issues/3/comments","events_url":"https://api.github.com/repos/cjfields/redmine-test/issues/3/events","html_url":"https://github.com/cjfields/redmine-test/issues/3","id":90285454,"number":3,"title":"Removing sequences from mysql using bioentry-id","user":{"login":"cjfields","id":49265,"avatar_url":"https://avatars.githubusercontent.com/u/49265?v=3","gravatar_id":"","url":"https://api.github.com/users/cjfields","html_url":"https://github.com/cjfields","followers_url":"https://api.github.com/users/cjfields/followers","following_url":"https://api.github.com/users/cjfields/following{/other_user}","gists_url":"https://api.github.com/users/cjfields/gists{/gist_id}","starred_url":"https://api.github.com/users/cjfields/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjfields/subscriptions","organizations_url":"https://api.github.com/users/cjfields/orgs","repos_url":"https://api.github.com/users/cjfields/repos","events_url":"https://api.github.com/users/cjfields/events{/privacy}","received_events_url":"https://api.github.com/users/cjfields/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cjfields/redmine-test/labels/Component:%20URL","name":"Component: URL","color":"ededed"},{"url":"https://api.github.com/repos/cjfields/redmine-test/labels/Priority:%20Normal","name":"Priority: Normal","color":"ededed"},{"url":"https://api.github.com/repos/cjfields/redmine-test/labels/Status:%20New","name":"Status: New","color":"ededed"},{"url":"https://api.github.com/repos/cjfields/redmine-test/labels/Tracker:%20Bug","name":"Tracker: Bug","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-23T04:39:21Z","updated_at":"2015-06-23T04:39:21Z","closed_at":null,"body":"---\n\n\nAuthor Name: **Nikolay empty** (Nikolay empty)\nOriginal Redmine Issue: 1528, https://redmine.open-bio.org/issues/1528\nOriginal Date: 2003-09-26\nOriginal Assignee: Bioperl Guts\n\n---\n\nHi I have been using biosql with mysql database for analyzing genetic material.\nYou have included the script that gets data into the database called\nload_seqdatabase.pl. However, the main problem is that there doesn't seem to\nexist a safe way of REMOVING sequences from this database. Can you write a\nscript that cleanly removes biosequence and information about it based on\nAccession Number, or simply bioentry_id. Such script would allow a greater\ncontrol and order of the database.\n\nOf course the easiest solution is not to add those unwanted sequences in the\nfirst place, and that's what I've been doing. However, proves to be extrememly\ninconvenient.\n\nThanx\n\nNikolay\n\n\n"},"comment":{"url":"https://api.github.com/repos/cjfields/redmine-test/issues/comments/114353244","html_url":"https://github.com/cjfields/redmine-test/issues/3#issuecomment-114353244","issue_url":"https://api.github.com/repos/cjfields/redmine-test/issues/3","id":114353244,"user":{"login":"cjfields","id":49265,"avatar_url":"https://avatars.githubusercontent.com/u/49265?v=3","gravatar_id":"","url":"https://api.github.com/users/cjfields","html_url":"https://github.com/cjfields","followers_url":"https://api.github.com/users/cjfields/followers","following_url":"https://api.github.com/users/cjfields/following{/other_user}","gists_url":"https://api.github.com/users/cjfields/gists{/gist_id}","starred_url":"https://api.github.com/users/cjfields/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjfields/subscriptions","organizations_url":"https://api.github.com/users/cjfields/orgs","repos_url":"https://api.github.com/users/cjfields/repos","events_url":"https://api.github.com/users/cjfields/events{/privacy}","received_events_url":"https://api.github.com/users/cjfields/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T04:39:21Z","updated_at":"2015-06-23T04:39:21Z","body":"---\n\nOriginal Redmine Comment\nAuthor Name: **Chris Fields** (Chris Fields)\nOriginal Date: 2006-11-09T12:28:24Z\n\n---\n\nThough there is no documentation, the test scripts in bioperl-db demonstrate how to remove persistent objects from the database.  i.e. from 13remove.t:\n\n```<code class=\"perl\">\n1. delete seq\nforeach $pseq (@seqs) {\n    ok ($pseq->remove(), 1);\n}\n</code>\n```\n\nfrom 03simpleseq.t:\n\n```<code class=\"perl\">\n1. delete seq and namespace\nok ($pseq->remove(), 1);\nmy $ns = Bio::DB::Persistent::BioNamespace->new(-identifiable => $pseq);\nok $ns = $db->get_object_adaptor($ns)->find_by_unique_key($ns);\nok $ns->primary_key();\nok ($ns->remove(), 1);\n</code>\n```\n\n"}}