X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=rsem-plot-transcript-wiggles;h=5bd89f2ffecb2d0d55818bd77a8363f71de461c2;hp=3aa7e359290b9cab8ef845f375da37a26c8208fe;hb=refs%2Fheads%2Fupstream;hpb=f054dfb3f9bb35d4043534ea88e1f5fa8e7eb2ea diff --git a/rsem-plot-transcript-wiggles b/rsem-plot-transcript-wiggles index 3aa7e35..5bd89f2 100755 --- a/rsem-plot-transcript-wiggles +++ b/rsem-plot-transcript-wiggles @@ -2,11 +2,16 @@ use Getopt::Long; use Pod::Usage; + use FindBin; -use lib $FindBin::Bin; +use lib $FindBin::RealBin; +use rsem_perl_utils; + +use Env qw(@PATH); +@PATH = ($FindBin::RealBin, "$FindBin::RealBin/sam", @PATH); + use strict; -use rsem_perl_utils; my $gene_list = 0; # default is 0, means input is not a gene list my $transcript_list = 0; # default is 0, this option can only be turned on if allele-specific expression is calculated @@ -27,29 +32,28 @@ if (-e "$ARGV[0].alleles.results") { $alleleS = 1; } pod2usage(-msg => "--transcript-list cannot be set if allele-specific reference is not built!", -exitval => 2, -verbose => 2) if (!$alleleS && $transcript_list); pod2usage(-msg => "--gene-list and --transcript-list cannot be set at the same time!", -exitval => 2, -verbose => 2) if ($gene_list && $transcript_list); -my $dir = "$FindBin::Bin/"; my $command = ""; unless (-e "$ARGV[0].transcript.sorted.bam") { - $command = $dir."sam/samtools sort $ARGV[0].transcript.bam $ARGV[0].transcript.sorted"; + $command = "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 = "rsem-bam2readdepth $ARGV[0].transcript.sorted.bam $ARGV[0].transcript.readdepth"; &runCommand($command); } if ($show_unique) { unless (-e "$ARGV[0].uniq.transcript.bam") { - $command = $dir."rsem-get-unique $ARGV[0].transcript.bam $ARGV[0].uniq.transcript.bam"; + $command = "rsem-get-unique $ARGV[0].transcript.bam $ARGV[0].uniq.transcript.bam"; &runCommand($command); } unless (-e "$ARGV[0].uniq.transcript.sorted.bam") { - $command = $dir."sam/samtools sort $ARGV[0].uniq.transcript.bam $ARGV[0].uniq.transcript.sorted"; + $command = "samtools sort $ARGV[0].uniq.transcript.bam $ARGV[0].uniq.transcript.sorted"; &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 = "rsem-bam2readdepth $ARGV[0].uniq.transcript.sorted.bam $ARGV[0].uniq.transcript.readdepth"; &runCommand($command); } } @@ -66,7 +70,7 @@ else { if ($gene_list) { $id_type = 2; } } -$command = $dir."rsem-gen-transcript-plots $ARGV[0] $ARGV[1] $alleleS $id_type $show_unique $ARGV[2]"; +$command = "rsem-gen-transcript-plots $ARGV[0] $ARGV[1] $alleleS $id_type $show_unique $ARGV[2]"; &runCommand($command); __END__