Added support for heat maps of achieved growth on linear scale. Still having trouble with the input form in Rails.

This commit is contained in:
Yury V Bukhman
2015-07-02 16:07:27 -05:00
parent 745f8a70af
commit 105be75c26
9 changed files with 82 additions and 39 deletions
+15 -3
View File
@@ -34,7 +34,7 @@ class Assay
extend ActiveModel::Naming
attr_accessor :input_file, :blank_value, :blank_value_input, :start_index, :remove_points, :remove_jumps, :plate_type,
:plate_dimensions_row, :plate_dimensions_column, :timestamp_format, :growth_threshold, :layout_file,:filename,:content_type, :model, :loess_input, :console_out, :specg_min,
:specg_max, :totg_min, :totg_max, :lagT_min, :lagT_max,:transformation, :transformation_input
:specg_max, :totg_min, :totg_max, :totg_OD_min, :totg_OD_max, :lagT_min, :lagT_max,:transformation, :transformation_input
# (1) Validation of input data file
@@ -169,6 +169,10 @@ class Assay
self.totg_min = Float(self.totg_min)
self.totg_max = Float(self.totg_max)
end
if (self.totg_OD_min != '' && self.totg_OD_max != '')
self.totg_OD_min = Float(self.totg_OD_min)
self.totg_OD_max = Float(self.totg_OD_max)
end
if (self.lagT_min != '' && self.lagT_max != '')
self.lagT_max = Float(self.lagT_max)
self.lagT_min = Float(self.lagT_min)
@@ -351,6 +355,13 @@ class Assay
else
R.eval 'totalRange <- NA'
end
if (self.totg_OD_min != '' && self.totg_OD_max != '')
R.assign 'totODMin', self.totg_OD_min
R.assign 'totODMax', self.totg_OD_max
R.eval "totalODRange <- c(totODMin, totODMax)"
else
R.eval 'totalODRange <- NA'
end
if (self.lagT_min != '' && self.lagT_max != '')
R.assign 'lagT_min', self.lagT_min
R.assign 'lagT_max', self.lagT_max
@@ -361,8 +372,9 @@ class Assay
# This block evaluates the files (csv or xlsx, single.plate or multiple.plate)
R.eval ('R_file_return_value <- gcat.analysis.main(file, single.plate, layout.file, out.dir=out.dir, graphic.dir = out.dir, add.constant, blank.value,
start.index, growth.cutoff, use.linear.param=use.linear.param, use.loess=use.loess, smooth.param=smooth.param, lagRange = lagRange,
totalRange = totalRange, specRange = specRange, points.to.remove = points.to.remove, remove.jumps, time.input, plate.nrow = 8,
start.index, growth.cutoff, use.linear.param=use.linear.param, use.loess=use.loess, smooth.param=smooth.param,
lagRange = lagRange, totalRange = totalRange, totalODRange = totalODRange, specRange = specRange,
points.to.remove = points.to.remove, remove.jumps, time.input, plate.nrow = 8,
plate.ncol = 12, input.skip.lines = 0, multi.column.headers = c("Plate.ID", "Well", "OD", "Time"), single.column.headers = c("","A1"),
layout.sheet.headers = c("Strain", "Media Definition"), silent = T, verbose = F, return.fit = F, overview.jpgs = T)')
+9 -3
View File
@@ -128,15 +128,21 @@
</div>
</li>
<li>
<h3><span data-tooltip="Select the range for the heatmaps for easier comparison.">Heatmap options</span></h3>
<h3><span data-tooltip="Select value ranges for the heatmaps for easier comparison between experiments.">Heatmap options</span></h3>
<div class="field">
<%= f.label "Enter the range for the total growth." %><br />
<%= f.label "Enter the range for the achieved growth on log scale." %><br />
<%= f.text_field(:totg_min, :type => 'number', :min => '0', :size => '2') %>
<%= f.label "-" %>
<%= f.text_field(:totg_max, :type => 'number', :min => '1', :size => '2') %>
</div>
<div class="field">
<%= f.label "Enter the range for the specific growth." %><br />
<%= f.label "Enter the range for the achieved growth on linear scale." %><br />
<%= f.text_field(:totg_OD_min, :type => 'number', :min => '0', :size => '2') %>
<%= f.label "-" %>
<%= f.text_field(:totg_OD_max, :type => 'number', :min => '1', :size => '2') %>
</div>
<div class="field">
<%= f.label "Enter the range for the max specific growth rate." %><br />
<%= f.text_field(:specg_min, :type => 'number', :min => '0', :size => '2') %>
<%= f.label "-" %>
<%= f.text_field(:specg_max, :type => 'number', :min => '1', :size => '2') %>