]> git.donarmstrong.com Git - rsem.git/commitdiff
Fixed a bug in perl scripts for printing error messages
authorBo Li <bli@cs.wisc.edu>
Sun, 22 Jul 2012 02:11:07 +0000 (21:11 -0500)
committerBo Li <bli@cs.wisc.edu>
Sun, 22 Jul 2012 02:11:07 +0000 (21:11 -0500)
convert-sam-for-rsem
rsem-calculate-expression
rsem-generate-ngvector
rsem-plot-transcript-wiggles
rsem-prepare-reference

index 13b9b13b209786d0e90d445d2a108834d8d460c8..decf86195f25d65a9cdacddb98d272d25c160df3 100755 (executable)
@@ -82,16 +82,16 @@ $command = $dir."rsem-sam-validator $out_file";
 
 # command, {err_msg}
 sub runCommand {
-    print STDERR $_[0]."\n";
+    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 script!"; }
-       print STDERR $errmsg."\n";
+       else { $errmsg = "\"$command\" failed! Plase check if you provide correct parameters/options for the pipeline!"; }
+       print $errmsg."\n";
        exit(-1);
     }
-    print STDERR "\n";
+    print "\n";
 }
 
 __END__
index 9e6ef2e99e1d72e7db053401b764d62f6e7bd5f8..684e33c2c3eb713536e3f1db6a82d44acda0bbe2 100755 (executable)
@@ -345,12 +345,12 @@ if ($mTime) {
 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);
+    if ($status != 0) {
+        my $errmsg = "";
+        if (scalar(@_) > 1) { $errmsg .= $_[1]."\n"; }
+        $errmsg .= "\"$_[0]\" failed! Plase check if you provide correct parameters/options for the pipeline!\n";
+        print $errmsg;
+        exit(-1);
     }
     print "\n";
 }
index c4d26a8f067efead6eb652e04a9cb31bfe6bf9ea..cd184b69ecfe5e1ccc69735add06d2ffaa74c7f4 100755 (executable)
@@ -28,10 +28,10 @@ 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";
+        my $errmsg = "";
+        if (scalar(@_) > 1) { $errmsg .= $_[1]."\n"; }
+        $errmsg .= "\"$_[0]\" failed! Plase check if you provide correct parameters/options for the pipeline!\n";
+        print $errmsg;
         exit(-1);
     }
     print "\n";
index 25e8b355dae5992cfd003bb3a659a0d28662f29a..37c7e270540667222142600ccc00a5b6258bfc03 100755 (executable)
@@ -46,6 +46,7 @@ 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";
index 80a954942031c88f6e6e50eb3fd84c86793ad20a..56d6972d12ad99f3cecceda21c6dfbc6133feebd 100755 (executable)
@@ -97,12 +97,12 @@ if (!$no_bowtie) {
 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);
+    if ($status != 0) {
+        my $errmsg = "";
+        if (scalar(@_) > 1) { $errmsg .= $_[1]."\n"; }
+        $errmsg .= "\"$_[0]\" failed! Plase check if you provide correct parameters/options for the pipeline!\n";
+        print $errmsg;
+        exit(-1);
     }
     print "\n";
 }