1#!/bin/bash 2 3vcfdistance <$1 | grep -oh 'BasesToClosestVariant=[0-9]*' | sed -e 's/BasesToClosestVariant=//g' > vardist 4 5gnuplot << \EOF 6set terminal dumb size 120, 30 7set autoscale 8#set xrange [10:150] 9unset label 10set title "Histogram of distance to closest variant" 11set ylabel "Number of Occurrences" 12set xlabel "Mean Depth" 13#set yr [0:100000] 14binwidth=1 15bin(x,width)=width*floor(x/width) + binwidth/2.0 16set xtics 5 17plot 'vardist' using (bin($1,binwidth)):(1.0) smooth freq with boxes 18pause -1 19EOF 20 21 22