]> git.donarmstrong.com Git - rsem.git/blobdiff - convert-sam-for-rsem
Added user-friendly error messages if users forget to compile the source codes
[rsem.git] / convert-sam-for-rsem
index decf86195f25d65a9cdacddb98d272d25c160df3..94b7965e88f4061afd5643ea44220aaa98236041 100755 (executable)
@@ -6,6 +6,8 @@ use File::Basename;
 use File::Path 'rmtree';
 use strict;
 
+use rsem_perl_utils;
+
 my ($in_file, $out_file) = ();
 
 my @tmp_dirs = ();
@@ -79,21 +81,6 @@ print STDERR "Conversion is completed. $out_file will be checked by 'rsem-sam-va
 $command = $dir."rsem-sam-validator $out_file";
 &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