Guest User

Untitled

a guest
May 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. sample="test"
  4. data_f="/tmp/data.txt"
  5. gp_cfg_f="/tmp/gplot.${sample}.cfg"
  6.  
  7. input_file=$1
  8.  
  9. #1 220 5220
  10. #2 252 5215
  11. cat $input_file | head -27 | tail -25 |\
  12. awk '{print $1"\t"$4"\t"$5}' > $data_f
  13.  
  14. (
  15. cat <<-EOF
  16. set terminal png nocrop size 750,450
  17. set nokey
  18. set xtics 2
  19. set grid x y
  20. #set datafile separator ","
  21. set t png
  22. #set xrange [0:800]
  23. #set yrange [0:100]
  24. set output "output.png"
  25. set xlabel "cycle"
  26. set ylabel "mismatch rate"
  27. set title "$sample"
  28. plot "$data_f" using 1:((\$2*100)/\$3)
  29. EOF
  30. ) > $gp_cfg_f
  31.  
  32. cat $gp_cfg_f | gnuplot
Add Comment
Please, Sign In to add comment