X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=misc%2Fplot-bamcheck;h=1792c6ffe8c0647b640a075f301f6e6cd7293c5d;hb=607d7a0ab79152be4153fa09861cfa889488f2c7;hp=adaebe6e92d218533925754758e7c46ba4e852b3;hpb=9970092ef7f25a74fb5870f5e0820e9e1ba358a7;p=samtools.git diff --git a/misc/plot-bamcheck b/misc/plot-bamcheck index adaebe6..1792c6f 100755 --- a/misc/plot-bamcheck +++ b/misc/plot-bamcheck @@ -349,6 +349,7 @@ sub plot_qualities set size 0.4,0.8 unset ytics set y2tics mirror + set yrange [0:$yrange] unset ylabel set xlabel "Cycle (rev reads)" set label "$$args{title}" at screen 0.5,0.95 center @@ -662,7 +663,8 @@ sub plot_coverage my @vals; for my $cov (@{$$opts{dat}{COV}}) { push @vals,$$cov[2]; } - my $p99 = percentile(99.8,@vals); + my $i = percentile(99.8,@vals); + my $p99 = $$opts{dat}{COV}[$i][1]; my $args = get_defaults($opts,"$$opts{prefix}coverage.png"); my $fh = $$args{fh}; @@ -803,14 +805,17 @@ sub plot_indel_cycles set style line 1 linetype 1 linecolor rgb "red" set style line 2 linetype 2 linecolor rgb "black" set style line 3 linetype 3 linecolor rgb "green" + set style line 4 linetype 4 linecolor rgb "blue" set style increment user set ylabel "Indel count" set xlabel "Read Cycle" set title "$$args{title}" - plot '-' w l ti 'Insertions', '' w l ti 'Deletions' + plot '-' w l ti 'Insertions (fwd)', '' w l ti 'Insertions (rev)', '' w l ti 'Deletions (fwd)', '' w l ti 'Deletions (rev)' ]; for my $len (@{$$opts{dat}{IC}}) { print $fh "$$len[0]\t$$len[1]\n"; } print $fh "end\n"; for my $len (@{$$opts{dat}{IC}}) { print $fh "$$len[0]\t$$len[2]\n"; } print $fh "end\n"; + for my $len (@{$$opts{dat}{IC}}) { print $fh "$$len[0]\t$$len[3]\n"; } print $fh "end\n"; + for my $len (@{$$opts{dat}{IC}}) { print $fh "$$len[0]\t$$len[4]\n"; } print $fh "end\n"; close($fh); plot($$args{gp}); }