Skip to content
Snippets Groups Projects
Commit 9d5742db authored by Magali Ruffier's avatar Magali Ruffier
Browse files

when cleaning up left over transcript xrefs extended from gene xrefs which...

when cleaning up left over transcript xrefs extended from gene xrefs which match pattern '-201', make sure these are transcript xrefs, not gene xrefs
parent 7e428233
No related branches found
No related tags found
No related merge requests found
......@@ -737,7 +737,7 @@ sub transcript_names_from_gene {
my $xref_id_sth = $self->core->dbc->prepare("SELECT max(xref_id) FROM xref");
my $ox_id_sth = $self->core->dbc->prepare("SELECT max(object_xref_id) FROM object_xref");
my $del_xref_sth = $self->core->dbc->prepare("DELETE FROM xref WHERE display_label REGEXP '-2[0-9]{2}\$'");
my $del_xref_sth = $self->core->dbc->prepare("DELETE x FROM xref x, object_xref ox WHERE x.xref_id = ox.xref_id AND ensembl_object_type = 'Transcript' AND display_label REGEXP '-2[0-9]{2}\$'");
my $reuse_xref_sth = $self->core->dbc->prepare("SELECT xref_id FROM xref x WHERE external_db_id = ? AND display_label = ? AND version = 0 AND description = ? AND info_type = 'MISC' AND info_text = 'via gene name'");
my $del_ox_sth = $self->core->dbc->prepare("DELETE ox FROM object_xref ox LEFT JOIN xref x ON x.xref_id = ox.xref_id WHERE isnull(x.xref_id)");
my $ins_xref_sth = $self->core->dbc->prepare("INSERT into xref (xref_id, external_db_id, dbprimary_acc, display_label, version, description, info_type, info_text) values(?, ?, ?, ?, 0, ?, 'MISC', 'via gene name')");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment