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

ENSCORESW-389: when processing pairs, process dependent xrefs as well

parent 8872775b
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,7 @@ sub process{
my $transl_object_xrefs_sth = $self->xref->dbc->prepare("select ox.object_xref_id, ox.ensembl_id, x.accession from object_xref ox join xref x on (ox.xref_id = x.xref_id and ox.ox_status = 'DUMP_OUT' and ox.ensembl_object_type = 'Translation') join source s on (x.source_id = s.source_id and s.name like 'RefSeq\_peptide%')");
my $ox_mark_delete_sth = $self->xref->dbc->prepare("update object_xref set ox_status = 'MULTI_DELETE' where object_xref_id = ?");
my $ox_dx_delete_sth = $self->xref->dbc->prepare("update object_xref master_ox, object_xref dependent_ox, xref dependent, xref master, dependent_xref dx set dependent_ox.ox_status = 'MULTI_DELETE' where dependent.xref_id = dx.dependent_xref_id and master.xref_id = dx.master_xref_id and dependent.xref_id = dependent_ox.xref_id and master.xref_id = master_ox.xref_id and master_ox.object_xref_id = ? and dependent_ox.ensembl_id = ?");
$transcr_obj_xrefs_sth->execute();
......@@ -168,6 +169,8 @@ sub process{
#this translations's transcript is not matched with the paired RefSeq_mRNA%,
#change the status to 'MULTI_DELETE'
$ox_mark_delete_sth->execute($translation_object_xref_id) || die("Failed to update status to 'MULTI_DELETE for object_xref_id $translation_object_xref_id");
$ox_dx_delete_sth->execute($translation_object_xref_id, $translation_id);
# Process all dependent xrefs as well
$change{'translation object xrefs removed'}++;
}
......
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