]> git.donarmstrong.com Git - rsem.git/blobdiff - convert-sam-for-rsem
Fixed a bug that will lead perl scripts fail to find the perl module they use
[rsem.git] / convert-sam-for-rsem
index 94b7965e88f4061afd5643ea44220aaa98236041..eb34c543009049c80dd0f4526a10d0a3a3a86eee 100755 (executable)
@@ -2,6 +2,8 @@
 
 use Getopt::Long;
 use Pod::Usage;
+use FindBin;
+use lib $FindBin::Bin;
 use File::Basename;
 use File::Path 'rmtree';
 use strict;
@@ -31,7 +33,7 @@ $suf = lc(substr($suf, 1));
 pod2usage(-msg => "Input file's suffix is neither sam nor bam!", -exitval => 2, -verbose => 2) if (($suf ne "sam") && ($suf ne "bam"));
 my $isSam = ($suf eq "sam");
 
-($fn, $dir, $suf) = fileparse($0);
+$dir = "$FindBin::Bin/";
 
 my $temp_dir = "$out_file.temp";
 if (-d $temp_dir) { print "Warning: $temp_dir exists, convert-sam-for-rsem will write temporary files into this folder and delete it after it finishes!\n"; }