diff --git a/GCAT_users_manual.odt b/GCAT_users_manual.odt index 3d67d97..f3eea19 100755 Binary files a/GCAT_users_manual.odt and b/GCAT_users_manual.odt differ diff --git a/R/GCAT/DESCRIPTION b/R/GCAT/DESCRIPTION index 9d09fb1..6dde5fc 100755 --- a/R/GCAT/DESCRIPTION +++ b/R/GCAT/DESCRIPTION @@ -8,11 +8,10 @@ Description: Imports high-throughput growth curve data from microtiter GCAT estimates important growth characteristics (specific growth rate, maximum growth capacity, and lag time) for each well in a read. - The code was written by Jason Shao (no longer at GLBRC) and Nate DiPiazza. -Version: 5.0.2 +Version: 6.0.1 Depends: pheatmap, gplots, methods Maintainer: Yury Bukhman License: LGPL-3 -Date: 2015-04-21 +Date: 2015-06-11 Author: Jason Shao, Nate DiPiazza , Minh Duc Bui, Yury V Bukhman Suggests: testthat diff --git a/R/GCAT/GCAT.Rproj b/R/GCAT/GCAT.Rproj index f7442a1..5a4617f 100644 --- a/R/GCAT/GCAT.Rproj +++ b/R/GCAT/GCAT.Rproj @@ -14,4 +14,4 @@ LaTeX: pdfLaTeX BuildType: Package PackageInstallArgs: --no-multiarch --with-keep.source -PackageRoxygenize: rd +PackageRoxygenize: rd,collate,namespace diff --git a/R/GCAT/NAMESPACE b/R/GCAT/NAMESPACE index 433990b..9f7fb76 100755 --- a/R/GCAT/NAMESPACE +++ b/R/GCAT/NAMESPACE @@ -19,6 +19,7 @@ exportMethods(getStartIndex) exportMethods(getUseLog) exportMethods(getWellInfo) exportMethods(getnls) +exportMethods(plot) import(gplots) import(methods) import(pheatmap) diff --git a/R/GCAT/R/GCAT.main.R b/R/GCAT/R/GCAT.main.R index 7c45ab9..ed460ab 100644 --- a/R/GCAT/R/GCAT.main.R +++ b/R/GCAT/R/GCAT.main.R @@ -90,7 +90,7 @@ global.version.number = packageDescription(pkg="GCAT")$Version #' @param use.loess Whether to use LOESS model or not? #' @param smooth.param Smoothing parameter for LOESS model. #' @param add.constant A numeric constant that will be added to each curve before the log transform (defaults to 1) -#' @param blank.value User can enter a blank OD measurement for uninoculated wells. if NULL, defaults to the value of the first OD measurement of each well. +#' @param blank.value User can enter a blank OD measurement for uninoculated wells. if NULL, assumes the first OD measurement of each well to be blank. #' @param start.index Which timepoint should be used as the first one after inoculation (defaults to the 2th one) #' @param growth.cutoff Minimum threshold for curve growth. #' @param points.to.remove A list of numbers referring to troublesome points that should be removed across all wells. @@ -115,7 +115,7 @@ global.version.number = packageDescription(pkg="GCAT")$Version #' @export gcat.analysis.main = function(file.list, single.plate, layout.file = NULL, out.dir = getwd(), graphic.dir = paste(out.dir, "/pics", sep = ""), - add.constant = 0, blank.value = NULL, start.index = 2, growth.cutoff = 0.05, + add.constant = 0, blank.value, start.index, growth.cutoff = 0.05, use.linear.param = F, use.loess = F, smooth.param=0.1, lagRange = NA, totalRange = NA, specRange = NA, points.to.remove = 0, remove.jumps = F, time.input = NA, @@ -126,6 +126,11 @@ gcat.analysis.main = function(file.list, single.plate, layout.file = NULL, # Capture the starting environment for debugging main.envir = c(as.list(environment())) + + # Check blank value and start index + if (is.null(blank.value) && start.index==1) { + exception("", "If inoculation time point is 1, the user must specify a blank value") + } # MB: Not the best solution. if (is.na(time.input)) { diff --git a/R/GCAT/R/class.well.R b/R/GCAT/R/class.well.R index 436315b..2819bdd 100644 --- a/R/GCAT/R/class.well.R +++ b/R/GCAT/R/class.well.R @@ -306,6 +306,7 @@ setMethod("show", "well", #' @param well.number the number of the well in an array of wells #' @param ... additional arguments passed to the generic plot function #' +#' @export setMethod("plot", signature(x = "well", y="missing"), function (x, y, constant.added = 1.0, xlim = NULL, ylim = NULL, diff --git a/R/GCAT/man/gcat.analysis.main.Rd b/R/GCAT/man/gcat.analysis.main.Rd index 5794c57..8f18040 100644 --- a/R/GCAT/man/gcat.analysis.main.Rd +++ b/R/GCAT/man/gcat.analysis.main.Rd @@ -6,15 +6,14 @@ \usage{ gcat.analysis.main(file.list, single.plate, layout.file = NULL, out.dir = getwd(), graphic.dir = paste(out.dir, "/pics", sep = ""), - add.constant = 0, blank.value = NULL, start.index = 2, - growth.cutoff = 0.05, use.linear.param = F, use.loess = F, - smooth.param = 0.1, lagRange = NA, totalRange = NA, specRange = NA, - points.to.remove = 0, remove.jumps = F, time.input = NA, - 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) + add.constant = 0, blank.value, start.index, growth.cutoff = 0.05, + use.linear.param = F, use.loess = F, smooth.param = 0.1, + lagRange = NA, totalRange = NA, specRange = NA, points.to.remove = 0, + remove.jumps = F, time.input = NA, 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) } \arguments{ \item{file.list}{A list of full paths to .csv files. all files must be in the same format (see )} @@ -29,7 +28,7 @@ gcat.analysis.main(file.list, single.plate, layout.file = NULL, \item{add.constant}{A numeric constant that will be added to each curve before the log transform (defaults to 1)} -\item{blank.value}{User can enter a blank OD measurement for uninoculated wells. if NULL, defaults to the value of the first OD measurement of each well.} +\item{blank.value}{User can enter a blank OD measurement for uninoculated wells. if NULL, assumes the first OD measurement of each well to be blank.} \item{start.index}{Which timepoint should be used as the first one after inoculation (defaults to the 2th one)} diff --git a/Rails/app/models/assay.rb b/Rails/app/models/assay.rb index eb82851..f2dc6f7 100644 --- a/Rails/app/models/assay.rb +++ b/Rails/app/models/assay.rb @@ -139,7 +139,7 @@ class Assay # (4) start index (A Positive Integer Number) if start_index == '' - self.start_index = 2 + self.start_index = 1 else self.start_index.gsub(/\s+/, "") # remove white spaces self.start_index = self.start_index.to_i @@ -276,6 +276,7 @@ class Assay # (2) transformation. N value (A Real Number) R.assign "add.constant", self.transformation # R.assign "add.constant", 0 + # (3) blank value (A Real Number) if (self.blank_value == nil) R.eval "blank.value <- NULL" @@ -284,8 +285,14 @@ class Assay else R.assign "blank.value", self.blank_value end - # (4) start index (A Positive Integer Number) - R.assign "start.index", self.start_index + + # (4) start index (A Positive Integer Number). Cannot be 1 if blank value is nil. + if(self.blank_value == nil && self.start_index == 1) + return {:error_message => "Error: inoculation timepoint cannot be 1 if using first OD reading as blank", :path => inputfile} + else + R.assign "start.index", self.start_index + end + # (5) remove points [a space-separated list of points. Example: 2,3,4,5 (Positive Integer Number)] R.assign "points.to.remove", self.remove_points diff --git a/Rails/app/views/assays/_form.html.erb b/Rails/app/views/assays/_form.html.erb index fb64a85..cd50b1e 100644 --- a/Rails/app/views/assays/_form.html.erb +++ b/Rails/app/views/assays/_form.html.erb @@ -45,16 +45,17 @@
  • -

    Media background

    - <%= f.radio_button(:blank_value, "zero", {:class => "user_enter3 user_enter3_no"}) %> - <%= f.label(:blank_value_zero, "0" ) %>
    - <%= f.radio_button(:blank_value, "default", {:class => "user_enter3 user_enter3_no"}) %> - <%= f.label(:blank_value_default, "Take the first OD reading of each well to be the blank") %>
    +

    Media background

    <%= f.radio_button(:blank_value, "user", {:checked => true, :class => "user_enter3 user_enter3_yes"}) %> <%= f.label(:blank_value_user, "User Input.") %> +
    + <%= f.radio_button(:blank_value, "default", {:class => "user_enter3 user_enter3_no"}) %> + <%= f.label(:blank_value_default, "Take the first OD reading of each well to be the blank") %>
    + <%= f.radio_button(:blank_value, "zero", {:class => "user_enter3 user_enter3_no"}) %> + <%= f.label(:blank_value_zero, "Set to 0" ) %>
  • OD Transform

    @@ -84,8 +85,8 @@

    Inoculation timepoint

    - <%= f.label :start_index, "Enter the timepoint index (positive integer only). The default value is 2. " %>
    - <%= f.text_field(:start_index, :type => 'number', :min =>'1', :size => '3', :value => '2') %> + <%= f.label :start_index, "Enter the timepoint index (positive integer only). The default value is 1. " %>
    + <%= f.text_field(:start_index, :type => 'number', :min =>'1', :size => '3', :value => '1') %>
  • @@ -156,4 +157,4 @@ -<% end %> \ No newline at end of file +<% end %> diff --git a/Rails/public/resources/GCAT_users_manual.pdf b/Rails/public/resources/GCAT_users_manual.pdf index 85358bb..84fe9bc 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 cf7662c..80a8008 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 deleted file mode 100644 index 10e0742..0000000 Binary files a/Release Notes.odt and /dev/null differ diff --git a/Release_Notes.odt b/Release_Notes.odt new file mode 100644 index 0000000..96b99b2 Binary files /dev/null and b/Release_Notes.odt differ diff --git a/Testing/GCAT_Test_Plan.docx b/Testing/GCAT_Test_Plan.docx index fa06187..31903c9 100644 Binary files a/Testing/GCAT_Test_Plan.docx and b/Testing/GCAT_Test_Plan.docx differ