From e6bec636d42b4448993fb806430e668ec5e98a53 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Tue, 27 Nov 2012 07:21:04 +0000 Subject: [PATCH] added -c to plot_nuc_dist git-svn-id: http://biopieces.googlecode.com/svn/trunk@2003 74ccb610-7750-0410-82ae-013aeee3265d --- bp_scripts/QA_454_report.rb | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/bp_scripts/QA_454_report.rb b/bp_scripts/QA_454_report.rb index 362c728..8c079f3 100755 --- a/bp_scripts/QA_454_report.rb +++ b/bp_scripts/QA_454_report.rb @@ -107,7 +107,7 @@ class Report end class PlotData - attr_reader :lendist_unclipped, :lendist_clipped, :scores_unclipped, :scores_clipped, :mean_scores, :nucleotide_dist + attr_reader :lendist_unclipped, :lendist_clipped, :scores_unclipped, :scores_clipped, :mean_scores, :nucleotide_dist500, :nucleotide_dist50 def initialize(sff_file, tmpdir) @sff_file = sff_file @@ -117,15 +117,17 @@ class Report @plot4 = File.join(tmpdir, "plot4.png") @plot5 = File.join(tmpdir, "plot5.png") @plot6 = File.join(tmpdir, "plot6.png") + @plot7 = File.join(tmpdir, "plot7.png") bp_plot - @lendist_unclipped = png2base64(@plot1) - @lendist_clipped = png2base64(@plot3) - @scores_unclipped = png2base64(@plot2) - @scores_clipped = png2base64(@plot4) - @mean_scores = png2base64(@plot5) - @nucleotide_dist = png2base64(@plot6) + @lendist_unclipped = png2base64(@plot1) + @lendist_clipped = png2base64(@plot3) + @scores_unclipped = png2base64(@plot2) + @scores_clipped = png2base64(@plot4) + @mean_scores = png2base64(@plot5) + @nucleotide_dist500 = png2base64(@plot6) + @nucleotide_dist50 = png2base64(@plot7) end def bp_plot @@ -141,8 +143,10 @@ class Report mean_scores | bin_vals -k SCORES_MEAN -b 5 | plot_histogram -s num -k SCORES_MEAN_BIN -T 'Mean score bins' -X 'Bins (size 5)' -Y 'Count' -t png -o #{@plot5} | + extract_seq -l 500 | + plot_nucleotide_distribution -c -t png -o #{@plot6} | extract_seq -l 50 | - plot_nucleotide_distribution -t png -o #{@plot6} -x" + plot_nucleotide_distribution -t png -o #{@plot7} -x" ) STDERR.puts "done.\n" end @@ -306,7 +310,9 @@ template = %{

Residue frequency analysis

Plot of nucleotide distribution in percent of the first 50 bases:

-

plot_nucleotide_distribution

+

plot_nucleotide_distribution

+

Plot of nucleotide distribution in percent of the first 500 bases:

+

plot_nucleotide_distribution

}.gsub(/^\s+/, '') -- 2.39.2