]> git.donarmstrong.com Git - rsem.git/blobdiff - rsem-run-ebseq
install the rsem_perl_utils.pm to /usr/bin even though this is wrong
[rsem.git] / rsem-run-ebseq
index 4d424915f820b9b28e956e65f70629282f3cef9e..47f767859a51f97c070f6c134c216159e5da2b79 100755 (executable)
@@ -1,13 +1,17 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use Getopt::Long;
 use Pod::Usage;
-use FindBin;
-use lib $FindBin::Bin;
-use strict;
 
+use FindBin;
+use lib $FindBin::RealBin;
 use rsem_perl_utils;
 
+use Env qw(@PATH);
+@PATH = ("$FindBin::RealBin/EBSeq", @PATH);
+
+use strict;
+
 my $ngvF = "";
 my $help = 0;
 
@@ -18,7 +22,6 @@ pod2usage(-verbose => 2) if ($help == 1);
 pod2usage(-msg => "Invalid number of arguments!", -exitval => 2, -verbose => 2) if (scalar(@ARGV) != 3);
 pod2usage(-msg => "ngvector file cannot be named as #! # is reserved for other purpose!", -exitval => 2, -verbose => 2) if ($ngvF eq "#");
 
-my $dir = "$FindBin::Bin/";
 my $command = "";
 
 my @conditions = split(/,/, $ARGV[1]);
@@ -28,7 +31,7 @@ pod2usage(-msg => "At least 2 conditions are required for differential expressio
 if ($ngvF eq "") { $ngvF = "#"; }
 
 $" = " ";
-$command = $dir."EBSeq/rsem-for-ebseq-find-DE ".$dir."EBSeq $ngvF $ARGV[0] $ARGV[2] @conditions";
+$command = "rsem-for-ebseq-find-DE $FindBin::RealBin/EBSeq $ngvF $ARGV[0] $ARGV[2] @conditions";
 &runCommand($command)
 
 __END__