X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=convert-sam-for-rsem;h=c0776162e064ef7bec9eeefbdf0412be4a22f8ad;hb=0f8fbc39759d8a8a4fa755903b8bde403b0da6c9;hp=94b7965e88f4061afd5643ea44220aaa98236041;hpb=52f1bd6f44f9b2630b839f192fb9ece18581983b;p=rsem.git diff --git a/convert-sam-for-rsem b/convert-sam-for-rsem index 94b7965..c077616 100755 --- a/convert-sam-for-rsem +++ b/convert-sam-for-rsem @@ -1,7 +1,9 @@ -#!/usr/bin/perl +#!/usr/bin/env perl 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"; } @@ -89,11 +91,7 @@ convert-sam-for-rsem =head1 SYNOPSIS -=over - - convert-sam-for-rsem [options] output_file_name - -=back +convert-sam-for-rsem [options] output_file_name =head1 ARGUMENTS