use Getopt::Long;
use Pod::Usage;
+use FindBin;
+use lib $FindBin::Bin;
use File::Basename;
use File::Path 'rmtree';
use strict;
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"; }
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);
"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);
use Getopt::Long;
use Pod::Usage;
-use File::Basename;
+use FindBin;
+use lib $FindBin::Bin;
use strict;
use rsem_perl_utils;
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";
use Getopt::Long;
use Pod::Usage;
-use File::Basename;
+use FindBin;
+use lib $FindBin::Bin;
use strict;
use rsem_perl_utils;
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") {
use Getopt::Long;
use Pod::Usage;
-use File::Basename;
+use FindBin;
+use lib $FindBin::Bin;
use strict;
use rsem_perl_utils;
if ($bowtie_path ne "") { $bowtie_path .= "/"; }
-my ($fn, $dir, $suf) = fileparse($0);
+my $dir = "$FindBin::Bin/";
my $command = "";
if ($type == 0) {