diff --git a/GCAT_users_manual.odt b/GCAT_users_manual.odt index f3eea19..6849839 100755 Binary files a/GCAT_users_manual.odt and b/GCAT_users_manual.odt differ diff --git a/R/GCAT/R/GCAT.main.R b/R/GCAT/R/GCAT.main.R index 7096a2e..8ba1cbe 100644 --- a/R/GCAT/R/GCAT.main.R +++ b/R/GCAT/R/GCAT.main.R @@ -141,6 +141,17 @@ gcat.analysis.main = function(file.list, single.plate, layout.file = NULL, exception("", "time.input is NA.") } + # Check heatmap ranges + for (range1 in list(lagRange, totalRange, totalODRange, specRange)) { + if (!identical(range1,NA)) { + range1.string = paste(range1,collapse="-") + if (length(range1) != 2) exception("",paste("Heat map range must contain 2 values. Bad range:", range1.string)) + if (!all(is.finite(range1))) exception("",paste("Heat map range must be numeric and finite. Bad range:", range1.string)) + if (!all(range1 >= 0)) exception("",paste("Heat map range must be positive. Bad range:", range1.string)) + if (range1[1] >= range1[2]) exception("",paste("Heat map range max must be > min. Bad range:", range1.string)) + } + } + # MB: Now add.constant will always be 0. # No need to check. #if (add.constant < 0) diff --git a/R/GCAT/inst/extdata/heatmap_tests/test_heatmap_limits.R b/R/GCAT/inst/extdata/heatmap_tests/test_heatmap_limits.R index 1f5dd68..845da13 100644 --- a/R/GCAT/inst/extdata/heatmap_tests/test_heatmap_limits.R +++ b/R/GCAT/inst/extdata/heatmap_tests/test_heatmap_limits.R @@ -11,13 +11,6 @@ INPUT.FILE = "YPDAFEXglucoseTests_2-25-10.csv" library(GCAT) setwd(INPUT.DIR) time.input=1/3600 -# - do not specify parameter ranges -out1 = gcat.analysis.main(file.list = INPUT.FILE, single.plate = T, layout.file = NULL, - out.dir = OUTPUT.DIR.1, graphic.dir = OUTPUT.DIR.1, - add.constant = 1, blank.value = NULL, start.index = 2, growth.cutoff = 0.05, - use.linear.param=F, use.loess=F, smooth.param=0.1, - points.to.remove = integer(), remove.jumps = F, time.input=time.input, - silent = F, verbose = T, return.fit = T, overview.jpgs = T) # - do specify parameter ranges out2 = gcat.analysis.main(file.list = INPUT.FILE, single.plate = T, layout.file = NULL, @@ -28,5 +21,13 @@ out2 = gcat.analysis.main(file.list = INPUT.FILE, single.plate = T, layout.file silent = F, verbose = T, return.fit = T, overview.jpgs = T, lagRange = c(0,3), totalRange = c(0.2,0.82), totalODRange = c(0.06,1), specRange = c(0.04,0.13)) +# - do not specify parameter ranges +out1 = gcat.analysis.main(file.list = INPUT.FILE, single.plate = T, layout.file = NULL, + out.dir = OUTPUT.DIR.1, graphic.dir = OUTPUT.DIR.1, + add.constant = 1, blank.value = NULL, start.index = 2, growth.cutoff = 0.05, + use.linear.param=F, use.loess=F, smooth.param=0.1, + points.to.remove = integer(), remove.jumps = F, time.input=time.input, + silent = F, verbose = T, return.fit = T, overview.jpgs = T) + # Verify that specifying parameter ranges did not affect any computations except for how the heat maps are drawn all.equal(out1,out2) \ No newline at end of file diff --git a/Rails/app/models/assay.rb b/Rails/app/models/assay.rb index eb66899..3802148 100644 --- a/Rails/app/models/assay.rb +++ b/Rails/app/models/assay.rb @@ -97,10 +97,21 @@ class Assay #validates :plate_dimensions_column, :numericality => { :only_integer => true, :greater_than => 0} #validates :plate_dimensions_row, :numericality => { :only_integer => true, :greater_than => 0 } - #validate inoculation timepoint + # (7) validate inoculation timepoint validates :start_index, :numericality => { :only_integer => true, :greater_than => 0} - + # (8) validate heatmap ranges +#validates_numericality_of :blank_value_input,:if => :user_input?, :message => '- Invalid OD blank value. Please Enter A Real Number.' + validates_numericality_of :totg_min, :if => :user_input?, :allow_blank => true, :greater_than_or_equal_to => 0, :message => '- Please Enter a positive real number.' + validates_numericality_of :totg_max, :if => :user_input?, :allow_blank => true, :greater_than_or_equal_to => 0, :message => '- Please Enter a positive real number.' + validates_numericality_of :totg_OD_min, :if => :user_input?, :allow_blank => true, :greater_than_or_equal_to => 0, :message => '- Please Enter a positive real number.' + validates_numericality_of :totg_OD_max, :if => :user_input?, :allow_blank => true, :greater_than_or_equal_to => 0, :message => '- Please Enter a positive real number.' + validates_numericality_of :specg_min, :if => :user_input?, :allow_blank => true, :greater_than_or_equal_to => 0, :message => '- Please Enter a positive real number.' + validates_numericality_of :specg_max, :if => :user_input?, :allow_blank => true, :greater_than_or_equal_to => 0, :message => '- Please Enter a positive real number.' + validates_numericality_of :lagT_min, :if => :user_input?, :allow_blank => true, :greater_than_or_equal_to => 0, :message => '- Please Enter a positive real number.' + validates_numericality_of :lagT_max, :if => :user_input?, :allow_blank => true, :greater_than_or_equal_to => 0, :message => '- Please Enter a positive real number.' + + def initialize(attributes = {}) attributes.each do |name, value| send("#{name}=", value) diff --git a/Rails/public/resources/GCAT_users_manual.pdf b/Rails/public/resources/GCAT_users_manual.pdf index 84fe9bc..149765c 100644 Binary files a/Rails/public/resources/GCAT_users_manual.pdf and b/Rails/public/resources/GCAT_users_manual.pdf differ diff --git a/Rails/public/resources/Release_Notes.pdf b/Rails/public/resources/Release_Notes.pdf index 80a8008..bafff5c 100644 Binary files a/Rails/public/resources/Release_Notes.pdf and b/Rails/public/resources/Release_Notes.pdf differ diff --git a/Release_Notes.odt b/Release_Notes.odt index 96b99b2..e48beaf 100644 Binary files a/Release_Notes.odt and b/Release_Notes.odt differ