Created
May 5, 2010 20:29
-
-
Save drio/391379 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# /stornext/snfs1/next-gen/drio-scratch/bfast_related/dnaa/dqc postalignqc -f | |
# -f /stornext/snfs4/next-gen/solid/bf.references/h/hsap.36.1.hg18/hsap_36.1_hg18.fa | |
# -r 0:2000 /Users/drio/projects/synthetic.pipe/bf.bwt.sorted.bam > /tmp/foo.txt | |
# R CMD BATCH '--args in.file="/tmp/foo.txt" out.type="png" space="0" expid="test"' plot_dqc_postalignqc.R | |
# | |
sample="test" | |
data_f="/tmp/data.txt" | |
gp_cfg_f="/tmp/gplot.${sample}.cfg" | |
n_cycles="50" | |
input_file=$1 | |
#1 220 5220 | |
#2 252 5215 | |
cat $input_file | head -52 | tail -${n_cycles} |\ | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment