use strict;
use warnings;
use XML::Simple;
+my $root_dir = shift;
my $library_info = shift;
my %libs;
my %quest;
$desc{outfile} = "";
$desc{fasta} = "";
if($caller eq "QuEST") {
- $desc{Summary} = `~/EXPTRACK/ProjectScripts/SummarizeQuEST.pm $caller_dir`;
+ $desc{Summary} = `$root_dir/scripts/SummarizeQuEST.pm $caller_dir`;
$desc{outfile} = "$caller_dir/peak_caller.ChIP.out.bedgraph";
$desc{fasta} = "$caller_dir/peak_caller.ChIP.out.fasta";
} elsif($caller eq "WingPeaks") {
- $desc{Summary} = `~/EXPTRACK/ProjectScripts/SummarizeWingPeaks.pm $caller_dir/$name.peaks`;
+ $desc{Summary} = `$root_dir/scripts/SummarizeWingPeaks.pm $caller_dir/$name.peaks`;
$desc{outfile} = "$caller_dir/$name.peaks.bed";
$desc{fasta} = "$caller_dir/$name.peaks.fasta";
} elsif($caller eq "MACS") {
my $peakfile = $caller_dir.'/'.$name.'_peaks.xls';
my $negpeakfile = $caller_dir.'/'.$name.'_negative_peaks.xls';
- $desc{Summary} = `~/EXPTRACK/ProjectScripts/SummarizeMACS.pm $peakfile $negpeakfile`;
+ $desc{Summary} = `$root_dir/scripts/SummarizeMACS.pm $peakfile $negpeakfile`;
$desc{outfile} = "$caller_dir/".$name."_peaks.bed";
$desc{fasta} = "$caller_dir/".$name."_peaks.fasta";
}
$libs{$lib} = 0;
if( ! -e $outfile ) { $qPCR_Summary .= "<TR BCOLOR=#FFBBBB><TD>$name</TD><TD>Processing...</TD></TR>\n"; } else {
- my $summary_line = `~/EXPTRACK/ProjectScripts/Summarize_qPCR.pm $name $lib $outfile`;
+ my $summary_line = `$root_dir/scripts/Summarize_qPCR.pm $name $lib $outfile`;
if($summary_line eq "") { $qPCR_Summary .= "<TR BCOLOR=#FFBBBB><TD>$name</TD><TD>Processing...</TD></TR>\n"; }
else {
$qPCR_Summary .= $summary_line;
my $task = $xml->{CompareLibraries}->[$i]->{TaskId};
my $tf = $xml->{CompareLibraries}->[$i]->{TF};
my $genome = $xml->{CompareLibraries}->[$i]->{Genome};
- my $features = "~/EXPTRACK/compare_peak_calls/".$genome."_uptream5k_downtream1k";
+ my $features = "$root_dir/reference_data/".$genome."_uptream5k_downtream1k";
my $name1 = $xml->{CompareLibraries}->[$i]->{Library}->[0]->{Library};
my $name2 = $xml->{CompareLibraries}->[$i]->{Library}->[1]->{Library};
my $outfile = "../../Tasks/".$task.'/'.$name1."_".$name2.".compare";
$libs{$name1} = 0; $libs{$name2} = 0;
my $correlation;
- if(-e $outfile) { $correlation = `cat $outfile | awk '{print \$8}'`; }
- my $color;
if( !(-e $outfile) ) { $correlation = "In Progress..."; $color = "#FFBBBB"; }
- elsif($correlation > 0.9) { $color = "#BBFFBB"; }
- elsif($correlation > 0.6) { $color = "#BBBBFF"; }
- else { $color = "#FFBBBB"; }
+ else {
+ if(-e $outfile) { $correlation = `cat $outfile | awk '{print \$8}'`; }
+ my $color;
+ elsif($correlation > 0.9) { $color = "#BBFFBB"; }
+ elsif($correlation > 0.6) { $color = "#BBBBFF"; }
+ else { $color = "#FFBBBB"; }
+ }
$library_comparisons .= "<TR BGCOLOR=$color><TD>$tf</TD><TD>$name1</TD><TD>$name2</TD<TD>$correlation</TD></TR>\n";
}
$library_comparisons .= "</TABLE>\n";