X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=rsem-plot-transcript-wiggles;h=efe00ba91863d7125268d0e492d602ae6b9cbeb7;hb=58d504aaf36ae486b1dba6d03e0e9f1c25855037;hp=37c7e270540667222142600ccc00a5b6258bfc03;hpb=683863b75f8d8bef2461039a6911b0e9619cc113;p=rsem.git diff --git a/rsem-plot-transcript-wiggles b/rsem-plot-transcript-wiggles index 37c7e27..efe00ba 100755 --- a/rsem-plot-transcript-wiggles +++ b/rsem-plot-transcript-wiggles @@ -2,9 +2,12 @@ use Getopt::Long; use Pod::Usage; -use File::Basename; +use FindBin; +use lib $FindBin::Bin; use strict; +use rsem_perl_utils; + my $gene_list = 0; # default is 0, means input is a transcript list; 1 means input is a gene list my $show_unique = 0; # 0, default value, means do not show unique transcript wiggles; 1 means show unique transcript wiggles my $help = 0; @@ -16,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") { @@ -46,21 +49,6 @@ if ($show_unique) { $command = $dir."rsem-gen-transcript-plots $ARGV[0] $ARGV[1] $gene_list $show_unique $ARGV[2]"; &runCommand($command); - -# command, {err_msg} -sub runCommand { - print $_[0]."\n"; - my $status = system($_[0]); - if ($status != 0) { - my $errmsg; - if (scalar(@_) > 1) { $errmsg = $_[1]; } - else { $errmsg = "\"$command\" failed! Plase check if you provide correct parameters/options for the pipeline!"; } - print $errmsg."\n"; - exit(-1); - } - print "\n"; -} - __END__ =head1 NAME @@ -69,11 +57,7 @@ rsem-plot-transcript-wiggles =head1 SYNOPSIS -=over - - rsem-plot-transcript-wiggles [options] sample_name input_list output_plot_file - -=back +rsem-plot-transcript-wiggles [options] sample_name input_list output_plot_file =head1 ARGUMENTS