Skip to content

Commit

Permalink
Add info header line to empty ontology files to indicate the lack of …
Browse files Browse the repository at this point in the history
…data isn't an error
  • Loading branch information
markquintontulloch committed Feb 12, 2021
1 parent de7f0ca commit 3f1b4c8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/ONTOLOGY/GAF.pm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ sub print_wormbase_GAF_header {
}
print $fh "\!project-release: $release\n";
print $fh "\!Contact Email: help\@wormbase.org\n";

}

####################################
Expand Down Expand Up @@ -139,7 +138,12 @@ sub make_species_files {
my $species_file = $file . '.' . $wb->full_name('-g_species' => 1);
open (SPECIES, '>', $species_file) or die "Could not open $species_file for writing\n";
print SPECIES join("\n", @headers) . "\n";
print SPECIES join("\n", @{$species_lines{$wb->ncbi_tax_id}}) . "\n" if exists $species_lines{$wb->ncbi_tax_id};;
if (exists $species_lines{$wb->ncbi_tax_id}) {
print SPECIES join("\n", @{$species_lines{$wb->ncbi_tax_id}}) . "\n";
}
else {
print SPECIES '!info: WormBase is not currently aware of any associations for ' . $wb->full_name() . "\n";
}
close (SPECIES);
}

Expand Down

0 comments on commit 3f1b4c8

Please sign in to comment.