]> git.donarmstrong.com Git - rsem.git/commitdiff
Fixed a bug that will lead perl scripts fail to find the perl module they use
authorBo Li <bli@cs.wisc.edu>
Sun, 27 Jan 2013 15:19:02 +0000 (09:19 -0600)
committerBo Li <bli@cs.wisc.edu>
Sun, 27 Jan 2013 15:19:02 +0000 (09:19 -0600)
convert-sam-for-rsem
rsem-calculate-expression
rsem-generate-ngvector
rsem-plot-transcript-wiggles
rsem-prepare-reference

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"; }
index 4fbb4a59beac6a449a90e4dc6335d7a9633f6dcc..fec2e310471c331d4bdf3b745ad4c129f2f5aee1 100755 (executable)
@@ -2,7 +2,8 @@
 
 use Getopt::Long;
 use Pod::Usage;
-use File::Basename;
+use FindBin;
+use lib $FindBin::Bin;
 use strict;
 
 use rsem_perl_utils qw(runCommand collectResults showVersionInfo);
@@ -109,7 +110,7 @@ GetOptions("keep-intermediate-files" => \$keep_intermediate_files,
           "q|quiet" => \$quiet,
           "h|help" => \$help) or pod2usage(-exitval => 2, -verbose => 2);
 
-my ($fn, $dir, $suf) = fileparse($0);
+my $dir = "$FindBin::Bin/";
 
 pod2usage(-verbose => 2) if ($help == 1);
 &showVersionInfo($dir) if ($version == 1);
index 0f44fd4daa2f153e60d3874a09c948aebc606b62..137fa03db354e8e7078a8dd16b535549034f949e 100755 (executable)
@@ -2,7 +2,8 @@
 
 use Getopt::Long;
 use Pod::Usage;
-use File::Basename;
+use FindBin;
+use lib $FindBin::Bin;
 use strict;
 
 use rsem_perl_utils;
@@ -16,7 +17,7 @@ GetOptions("k=i" => \$k,
 pod2usage(-verbose => 2) if ($help == 1);
 pod2usage(-msg => "Invalid number of arguments!", -exitval => 2, -verbose => 2) if (scalar(@ARGV) != 2);
 
-my ($fn, $dir, $suf) = fileparse($0);
+my $dir = "$FindBin::Bin/";
 my $command = "";
 
 $command = $dir."EBSeq/rsem-for-ebseq-calculate-clustering-info $k $ARGV[0] $ARGV[1].ump";
index 35dfd75544c7d50d6afa61a41d39ecd8c3241608..11027a1ea30fa91b880d5e776dfdd5b032a2d71b 100755 (executable)
@@ -2,7 +2,8 @@
 
 use Getopt::Long;
 use Pod::Usage;
-use File::Basename;
+use FindBin;
+use lib $FindBin::Bin;
 use strict;
 
 use rsem_perl_utils;
@@ -18,7 +19,7 @@ GetOptions("gene-list" => \$gene_list,
 pod2usage(-verbose => 2) if ($help == 1);
 pod2usage(-msg => "Invalid number of arguments!", -exitval => 2, -verbose => 2) if (scalar(@ARGV) != 3);
 
-my ($fn, $dir, $suf) = fileparse($0);
+my $dir = "$FindBin::Bin/";
 my $command = "";
 
 unless (-e "$ARGV[0].transcript.sorted.bam") {
index 5d954a1fc7b7f411fa8fe46d43b5cda1cb181fa6..223d79db8a2d3852d0fa601decdef89651b7aae5 100755 (executable)
@@ -2,7 +2,8 @@
 
 use Getopt::Long;
 use Pod::Usage;        
-use File::Basename;
+use FindBin;
+use lib $FindBin::Bin;
 use strict;
 
 use rsem_perl_utils;
@@ -60,7 +61,7 @@ elsif ($subsetFile ne "") { $polyAChoice = 2; }
 
 if ($bowtie_path ne "") { $bowtie_path .= "/"; }
 
-my ($fn, $dir, $suf) = fileparse($0); 
+my $dir = "$FindBin::Bin/";
 my $command = "";
 
 if ($type == 0) {