Skip to content
Snippets Groups Projects
Commit 1a2a25c6 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Unbreak.

parent 560f60e2
No related branches found
No related tags found
No related merge requests found
......@@ -234,24 +234,25 @@ sub run {
}
}
} else {
# Be careful! Some accessions for some of the Dbxref sources
# are not case-sensetively unique. Only store the very first
# of each variation of a name and ignore the rest.
my $lc_name = lc($accession);
my $good_name = 0;
if ( exists( $names{$source_name}{$lc_name} ) ) {
# We've seen a variation of this name before...
if ( $names{$source_name}{$lc_name} eq $accession ) {
# This is our elected variation.
foreach my $accession ( @{ $dbxref->{$dbxref_name} } ) {
# Be careful! Some accessions for some of the Dbxref
# sources are not case-sensetively unique. Only store the
# very first of each variation of a name and ignore the
# rest.
my $lc_name = lc($accession);
my $good_name = 0;
if ( exists( $names{$source_name}{$lc_name} ) ) {
# We've seen a variation of this name before...
if ( $names{$source_name}{$lc_name} eq $accession ) {
# This is our elected variation.
$good_name = 1;
}
} else {
$names{$source_name}{$lc_name} = $accession;
$good_name = 1;
}
} else {
$names{$source_name}{$lc_name} = $accession;
$good_name = 1;
}
if ($good_name) {
foreach my $accession ( @{ $dbxref->{$dbxref_name} } ) {
if ($good_name) {
my $xref_id;
if ( exists( $xref_ids{$source_name}{$accession} ) ) {
$xref_id = $xref_ids{$source_name}{$accession};
......@@ -264,7 +265,7 @@ sub run {
$self->add_direct_xref( $xref_id, $id, $type, '' );
}
}
} ## end foreach my $accession ( @{ ...
} ## end else [ if ( defined($pre_source...
} ## end if ( exists( $source_name_map...
} ## end foreach my $dbxref_name ( keys...
......
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