new file: cell2loc.py
[GalaxyCodeBases.git] / perl / soap / draw / subBin / plotDepthDistribution.pl
blob57d8ff8ad0adde68e0c78029fdfa9cc44340b2ea
1 #!/usr/bin/perl -w
3 use strict;
5 my $dataFile = $ARGV[0];
6 my $out_dir = $ARGV[1];
7 my $xrange = $ARGV[2];
8 my $xtic = $ARGV[3];
9 my $yrange = $ARGV[4];
10 my $ytic = $ARGV[5];
11 my $pro_name = $ARGV[6];
12 my $title = "Sequencing depth distribution";
13 my $font = 'font "Arial-Bold,24"';
14 my $titleFont = 'font "Arial-Bold,32"';
15 my $legendSize = 28;
16 my $xScale = 1;
17 my $yScale = 1;
18 my $pointSize = 1.3;
22 my $script = << "script";
23 set terminal postscript eps enhanced defaultplex leveldefault color colortext dashed dashlength 3.0 linewidth 1.0 butt palfuncparam 2000,0.003 "Helvetica" 16
25 #set title '$title' $titleFont
26 #set lmargin 10
27 #set bmargin 7
28 set yrange [0:$yrange]
29 #set y2range [0:60]
30 set xrange [-0.5:$xrange]
31 set ytics $ytic $font
32 #set y2tics 10 $font
33 set xtics $xtic $font
34 set ytics nomirror
36 set boxwidth 0.8 absolute
37 #set style fill solid 1.00 border 0
38 set style histogram clustered gap 1 title offset character 0, 0, 0
39 set datafile missing '-'
40 set style data histograms
41 set xtics border in scale 1,0.5 nomirror offset character -1, -0.5, 10
42 #set xtics border in scale 1,0.5 nomirror offset character 0, -0.5, 10
44 set style line 3 linetype 1 linecolor rgb "navy" linewidth 5.000 pointtype 0 pointsize $pointSize
45 set style line 2 linetype 1 linecolor rgb "green" linewidth 5.000 pointtype 0 pointsize $pointSize
46 set style line 1 linetype 1 linecolor rgb "pink" linewidth 5.000 pointtype 11 pointsize $pointSize
47 set style line 4 linetype 1 linecolor rgb "red" linewidth 5.000 pointtype 11 pointsize $pointSize
49 #set style histogram rowstacked
52 set key horizontal Left reverse enhanced autotitles columnhead nobox spacing 1.5 width 4.4 top right
53 #unset key
54 #set key outside right spacing 1.2
55 set size $xScale,$yScale
57 set origin 0,0
58 set output "$out_dir/$pro_name.depthdistribution.eps"
59 set xlabe "\\nDepth(X)\\n\\n" $font
60 #set xlabe "\\n16mer(X)\\n\\n" $font
61 set ylabe "Percentage(\%)\\n" $font
62 #set y2labe "\\nGC(\%)\\n" $font
65 plot '$dataFile' using 1:3 title "{/Arial=$legendSize $pro_name}" with linespoints ls 3 smooth csplines, '' u 1:4 title "{/Arial=$legendSize Poisson}" with linespoints ls 2 smooth csplines
68 script
69 print "$script\n";