modified: myjupyterlab.sh
[GalaxyCodeBases.git] / perl / etc / justonce / sperm / plotkmercnt.sh
blob8c1d8da1747d680bc43231184dd62d9eaa44ab54
1 #!/bin/bash
3 # argument 1 is path to input
4 # argument 2 is range
6 arrFN=(${1//[-.]/ })
7 if [[ X"" = X"${arrFN[2]}" ]]; then
8 arrFN[1]="File 1";
9 arrFN[2]="File 2";
11 echo -e "[$1] -> ${arrFN[0]} ${arrFN[1]} ${arrFN[2]}\ncb_max: $2"
13 gnuplot << PLOTCMD
14 set term png font "/bak/seqdata/sperm/sssC2/arial.ttf" 48 size 2102,2102 truecolor linewidth 3
15 #set terminal png
16 set output "$1.png"
17 #set size ratio 0.5
18 set title "Heatmap for [$1]"
20 #set xlabel "File 2"
21 #set ylabel "File 1"
22 set ylabel "${arrFN[1]}"
23 set xlabel "${arrFN[2]}"
25 set tic scale 0
27 set palette rgbformulae 22,13,10 #color
28 set palette rgbformulae 3,3,3 #gray
29 #set palette rgbformula 34,35,36 #heat
30 #set palette negative #just for fun
32 #set cbrange [0:10000]
33 set cbrange [0:"$2"]
34 #unset cbtics
36 set tics nomirror
37 set xrange [-0.5:40.5]
38 set yrange [-0.5:40.5]
39 set xtics ("0" 0, "0.2" 8, "0.4" 16, "0.6" 24, "0.8" 32, "0.9" 36, ">1" 40)
40 set ytics ("0" 0, "0.2" 8, "0.4" 16, "0.6" 24, "0.8" 32, "0.9" 36, ">1" 40)
41 set tics out
42 set tics scale 0.7
44 #set cbrange [1:*]
45 set format cb "%3.0e"
46 #set cbtics in
47 set cbtics font "/bak/seqdata/sperm/sssC2/arial.ttf, 40"
49 set view map
51 splot '$1' matrix with image
52 PLOTCMD
54 echo << XEOF
55 sh plotkmercnt.sh t100k.40.plot 10000
56 eg. find out/*.plot |while read a;do sh plotkmercnt.sh $a 100000;done
57 XEOF