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

fix duplicates

parent 4206c9ba
No related branches found
No related tags found
No related merge requests found
......@@ -37,13 +37,14 @@ sub run {
my %species_tax_id = %{$self->get_taxonomy_from_species_id($species_id)};
my $eg_io = $self->get_filehandle($file);
if ( !defined $eg_io ) {
print "ERROR: Could not open $file\n";
return 1; # 1 is an error
}
my $eg_io = $self->get_filehandle($file);
if ( !defined $eg_io ) {
print "ERROR: Could not open $file\n";
return 1; # 1 is an error
}
my %seen;
my $head = $eg_io->getline(); # first record are the headers
chomp $head;
......@@ -96,6 +97,12 @@ sub run {
next;
}
my $acc = $arr[$gene_id_index];
if($seen{$acc}){
next;
}
else{
$seen{$acc} = 1;
}
my $symbol = $arr[$gene_symbol_index];
my $desc = $arr[$gene_desc_index];
$self->add_xref($acc,"",$symbol,$desc,$source_id,$species_id);
......
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