From 495b78e2a34417e8769035c92868f7d42dcc72f0 Mon Sep 17 00:00:00 2001
From: Ian Longden <ianl@sanger.ac.uk>
Date: Tue, 29 Jan 2008 17:45:30 +0000
Subject: [PATCH] get uniprot HGNC references as last priority

---
 misc-scripts/xref_mapping/XrefParser/UniProtParser.pm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/misc-scripts/xref_mapping/XrefParser/UniProtParser.pm b/misc-scripts/xref_mapping/XrefParser/UniProtParser.pm
index 1dd8e064f7..aea971203e 100644
--- a/misc-scripts/xref_mapping/XrefParser/UniProtParser.pm
+++ b/misc-scripts/xref_mapping/XrefParser/UniProtParser.pm
@@ -161,6 +161,9 @@ sub create_xrefs {
 
   my %dependent_sources = $self->get_dependent_xref_sources(); # name-id hash
 
+  if(defined($dependent_sources{'HGNC'})){
+    $dependent_sources{'HGNC'} = XrefParser::BaseParser->get_source_id_for_source_name("HGNC","uniprot");
+  }	
   # Get predicted equivalents of various sources used here
     my $sp_pred_source_id =
       $self->get_source_id_for_source_name(
@@ -336,6 +339,10 @@ sub create_xrefs {
           $dep{SOURCE_NAME} = $source;
           $dep{LINKAGE_SOURCE_ID} = $xref->{SOURCE_ID};
           $dep{SOURCE_ID} = $dependent_sources{$source};
+	  if($source =~ /HGNC/){
+	    $acc =~ s/HGNC://;
+	    $dep{LABEL} = $extra[0]
+	  }
 	  $dep{ACCESSION} = $acc;
 	  if($dep =~ /MIM/){
 	    $dep{ACCESSION} = $acc;
-- 
GitLab