#!/usr/bin/perl -w 


@dirs = qw(hs1A_50
hs1B_51
hs1C_52
hs1D_53);

@info = qw(wt+DMSO 
wt+pB
y2h2+DMSO
y2h2+pB);


@files = qw(
YKR095W-A
YPR028W
YDL191W
);

@nice = qw(PCC1
YOP1
RPL35A
);


for($j=0;$j<3;$j++){

$gene = $files[$j];
$nname = $nice[$j];
open(TG,">$nname.gnpl");
print TG "set terminal png size 1200,900 \n"; 
print TG "set key bot center \n";

print TG "set output \"$nname.png\" \n";
print TG "set xlabel \"'Position relative to 3\' SS\" \n";
print TG "set ylabel 'Fraction splice co-transcriptionally' \n";
print TG "set title '$gene $nname' \n";

print TG "plot [0:600][-0.05:1.05] ";
for($i=0;$i<4;$i++){

$d = $dirs[$i];
$info = $info[$i];

print TG " './smit_files/$d/$gene\_splicingValues.txt' u 1:4 w l smooth sbezier title '$info' linewidth 5  "; 
if($i<3){ print TG ", ";}
}
print TG "\n";
system("gnuplot < $nname.gnpl");
}







