Skip to content
Snippets Groups Projects
Commit 381da0d3 authored by Ian Longden's avatar Ian Longden
Browse files

fix to stop descriptions for some hgnc identifiers not being copied

parent 35c77d47
No related branches found
No related tags found
No related merge requests found
......@@ -76,8 +76,10 @@ sub run {
# Use the RefSeq if available as this is manually curated
# If no RefSeq, use the Swissprot instead
my $seen = 0;
if ($array[6]) { # RefSeq
if(defined($refseq{$array[6]})){
$seen = 1;
$refseq_count++;
XrefParser::BaseParser->add_to_xrefs($refseq{$array[6]}, $array[0], '', $array[1], $array[2], "", $source_id, $species_id);
......@@ -99,6 +101,7 @@ sub run {
if ($array[5]) { # Uniprot
if(defined($swiss{$array[5]})){
my $seen = 1;
XrefParser::BaseParser->add_to_xrefs($swiss{$array[5]}, $array[0], '', $array[1], $array[2], "", ($source_id+1), $species_id);
$swiss_count++;
if (defined($array[3])) { # dead name, add to synonym
......@@ -116,7 +119,9 @@ sub run {
}
}
}
if(!$seen){ # Store to keep descriptions etc
$self->add_xref($array[0], "", $array[1], $array[2], $source_id, $species_id);
}
} # while HUGO
......
......@@ -26,14 +26,14 @@ sub run {
# becouse the direct mapping have no descriptions etc
# we have to steal these fromt he previous HUGO parser.
# This is why the order states this is after the other one.
# maybe 1091 is not right maybe should use name = HUGO and priority = 2 ??
# maybe 1091,1092 is not right maybe should use name = HUGO and priority = 30r4 ??
my %label;
my %version;
my %description;
my $dbi = $self->dbi();
my $sql = "select accession, label, version, description from xref where source_id = 1091";
my $sql = "select accession, label, version, description from xref where source_id in (1091, 1092)";
my $sth = $dbi->prepare($sql);
$sth->execute();
my ($acc, $lab, $ver, $desc);
......
......@@ -28,14 +28,14 @@ sub run {
# becouse the direct mapping have no descriptions etc
# we have to steal these fromt he previous HUGO parser.
# This is why the order states this is after the other one.
# maybe 1091 is not right maybe should use name = HUGO and priority = 2 ??
# maybe 1091,1092 is not right maybe should use name = HUGO and priority = 30r4 ??
my %label;
my %version;
my %description;
my $dbi = $self->dbi();
my $sql = "select accession, label, version, description from xref where source_id = 1091";
my $sql = "select accession, label, version, description from xref where source_id in (1091, 1092)";
my $sth = $dbi->prepare($sql);
$sth->execute();
my ($acc, $lab, $ver, $desc);
......
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