From 8354d323a7216c38cade5034dda94a7bc966f213 Mon Sep 17 00:00:00 2001 From: Kieron Taylor <ktaylor@ebi.ac.uk> Date: Thu, 4 Feb 2016 17:26:13 +0000 Subject: [PATCH] Old xref connections should not be typed by the new master xref. Generate type mappings for both sets explicitly. --- .../xref_mapping/XrefMapper/ProcessPrioritys.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm b/misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm index 7cfb79bb85..ebcb156f6d 100644 --- a/misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm +++ b/misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm @@ -277,13 +277,19 @@ sub process_dependents{ my @old_ensembl_ids = $self->_get_old_ensembl_ids_associated_with_xref($old_master_xref_id, $best_ensembl_ids); - # determine object type of best_ensembl_ids. This will be the only type left once we've deleted the other object_xrefs + # determine object type of the ensembl_ids we are taking links from and connecting to. my %splonk; - foreach my $ens_id (@$best_ensembl_ids,@old_ensembl_ids) { + foreach my $ens_id (@$best_ensembl_ids) { $get_type_sth->execute($ens_id,$new_master_xref_id); my ($type) = $get_type_sth->fetchrow_array(); $splonk{$ens_id} = $type; } + foreach my $ens_id (@old_ensembl_ids) { + $get_type_sth->execute($ens_id,$old_master_xref); + my ($type) = $get_type_sth->fetchrow_array(); + $splonk{$ens_id} = $type; + } + ## Loop through all dependent xrefs of old master xref, and recurse while(my $xref_id = pop(@master_xrefs)){ -- GitLab