Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- sample="test"
- data_f="/tmp/data.txt"
- gp_cfg_f="/tmp/gplot.${sample}.cfg"
- input_file=$1
- #1 220 5220
- #2 252 5215
- cat $input_file | head -27 | tail -25 |\
- awk '{print $1"\t"$4"\t"$5}' > $data_f
- (
- cat <<-EOF
- set terminal png nocrop size 750,450
- set nokey
- set xtics 2
- set grid x y
- #set datafile separator ","
- set t png
- #set xrange [0:800]
- #set yrange [0:100]
- set output "output.png"
- set xlabel "cycle"
- set ylabel "mismatch rate"
- set title "$sample"
- plot "$data_f" using 1:((\$2*100)/\$3)
- EOF
- ) > $gp_cfg_f
- cat $gp_cfg_f | gnuplot
Add Comment
Please, Sign In to add comment