Skip to content

Commit

Permalink
getExactTaxonomy.pl: better error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lskatz authored Jun 14, 2023
1 parent f6fee3d commit 58a7c3e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bin/getExactTaxonomy.pl
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ sub writeDmps{
# read the names file
my $names = readDmp("$$settings{datadir}/names.dmp", $settings);

mkdir $outdir;
open(my $nodesFh, ">", "$outdir/nodes.dmp") or die $!;
open(my $namesFh, ">", "$outdir/names.dmp") or die $!;
if(!-e $outdir){
mkdir $outdir or die "ERROR: could not make directory $outdir: $!";
}
open(my $nodesFh, ">", "$outdir/nodes.dmp") or die "ERROR: could not write to $outdir/nodes.dmp $!";
open(my $namesFh, ">", "$outdir/names.dmp") or die "ERROR: could not write to $outdir/nodes.dmp $!";

for my $taxid(@taxid){
if($$nodes{$taxid}){
Expand Down

0 comments on commit 58a7c3e

Please sign in to comment.