]> git.donarmstrong.com Git - rsem.git/blobdiff - rsem-plot-transcript-wiggles
Fixed a bug in perl scripts for printing error messages
[rsem.git] / rsem-plot-transcript-wiggles
index 5054f5bc0d4fa3256bc4ac4899162c4b4e570847..37c7e270540667222142600ccc00a5b6258bfc03 100755 (executable)
@@ -19,8 +19,12 @@ pod2usage(-msg => "Invalid number of arguments!", -exitval => 2, -verbose => 2)
 my ($fn, $dir, $suf) = fileparse($0);
 my $command = "";
 
+unless (-e "$ARGV[0].transcript.sorted.bam") {
+    $command = $dir."sam/samtools sort $ARGV[0].transcript.bam $ARGV[0].transcript.sorted";
+    &runCommand($command);
+}
 unless (-e "$ARGV[0].transcript.readdepth") {
-    $command = $dir."rsem-bam2readdepth $ARGV[0].transcript.sorted.bam $ARGV[0].transcript.readdepth";
+    $command = $dir."rsem-bam2readdepth $ARGV[0].transcript.sorted.bam $ARGV[0].transcript.readdepth";
     &runCommand($command);
 }
 
@@ -34,7 +38,7 @@ if ($show_unique) {
        &runCommand($command);
     }
     unless (-e "$ARGV[0].uniq.transcript.readdepth") {
-       $command = $dir."rsem-bam2readdepth $ARGV[0].uniq.transcript.sorted.bam $ARGV[0].uniq.transcript.readdepth";
+       $command = $dir."rsem-bam2readdepth $ARGV[0].uniq.transcript.sorted.bam $ARGV[0].uniq.transcript.readdepth";
        &runCommand($command);
     }
 }
@@ -42,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";