Skip to content

Commit

Permalink
smarter about path finding
Browse files Browse the repository at this point in the history
  • Loading branch information
lh3 committed Nov 19, 2014
1 parent d36083b commit d58beee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bwakit/run-bwamem
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ my $idx = $ARGV[0];

my $exepath = $0 =~/^\S+\/[^\/\s]+/? $0 : &which($0);
my $root = $0 =~/^(\S+)\/[^\/\s]+/? $1 : undef;
$root = $exepath =~/^(\S+)\/[^\/\s]+/? $1 : undef if !defined($root);
die "ERROR: failed to locate the 'bwa.kit' directory\n" if !defined($root);
die("ERROR: failed to locate the BWA index. Please run '$root/bwa index -p $idx ref.fa'.\n")
Expand Down

0 comments on commit d58beee

Please sign in to comment.