Commiting branch GCAT_6.0 at SVN revision 572

pull/3/head
Yury V Bukhman 9 years ago
parent 2d658405a1
commit c7fb48ce68

Binary file not shown.

@ -8,11 +8,10 @@ Description: Imports high-throughput growth curve data from microtiter
GCAT estimates important growth characteristics GCAT estimates important growth characteristics
(specific growth rate, maximum growth capacity, and lag time) (specific growth rate, maximum growth capacity, and lag time)
for each well in a read. for each well in a read.
The code was written by Jason Shao (no longer at GLBRC) and Nate DiPiazza. Version: 6.0.1
Version: 5.0.2
Depends: pheatmap, gplots, methods Depends: pheatmap, gplots, methods
Maintainer: Yury Bukhman <ybukhman@glbrc.wisc.edu> Maintainer: Yury Bukhman <ybukhman@glbrc.wisc.edu>
License: LGPL-3 License: LGPL-3
Date: 2015-04-21 Date: 2015-06-11
Author: Jason Shao, Nate DiPiazza <ndipiazza@wisc.edu>, Minh Duc Bui, Yury V Bukhman Author: Jason Shao, Nate DiPiazza <ndipiazza@wisc.edu>, Minh Duc Bui, Yury V Bukhman
Suggests: testthat Suggests: testthat

@ -14,4 +14,4 @@ LaTeX: pdfLaTeX
BuildType: Package BuildType: Package
PackageInstallArgs: --no-multiarch --with-keep.source PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd PackageRoxygenize: rd,collate,namespace

@ -19,6 +19,7 @@ exportMethods(getStartIndex)
exportMethods(getUseLog) exportMethods(getUseLog)
exportMethods(getWellInfo) exportMethods(getWellInfo)
exportMethods(getnls) exportMethods(getnls)
exportMethods(plot)
import(gplots) import(gplots)
import(methods) import(methods)
import(pheatmap) import(pheatmap)

@ -90,7 +90,7 @@ global.version.number = packageDescription(pkg="GCAT")$Version
#' @param use.loess Whether to use LOESS model or not? #' @param use.loess Whether to use LOESS model or not?
#' @param smooth.param Smoothing parameter for LOESS model. #' @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 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 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 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. #' @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 #' @export
gcat.analysis.main = function(file.list, single.plate, layout.file = NULL, gcat.analysis.main = function(file.list, single.plate, layout.file = NULL,
out.dir = getwd(), graphic.dir = paste(out.dir, "/pics", sep = ""), 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, use.linear.param = F, use.loess = F, smooth.param=0.1,
lagRange = NA, totalRange = NA, specRange = NA, lagRange = NA, totalRange = NA, specRange = NA,
points.to.remove = 0, remove.jumps = F, time.input = NA, points.to.remove = 0, remove.jumps = F, time.input = NA,
@ -127,6 +127,11 @@ gcat.analysis.main = function(file.list, single.plate, layout.file = NULL,
# Capture the starting environment for debugging # Capture the starting environment for debugging
main.envir = c(as.list(environment())) 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. # MB: Not the best solution.
if (is.na(time.input)) { if (is.na(time.input)) {
if (single.plate) if (single.plate)

@ -306,6 +306,7 @@ setMethod("show", "well",
#' @param well.number the number of the well in an array of wells #' @param well.number the number of the well in an array of wells
#' @param ... additional arguments passed to the generic plot function #' @param ... additional arguments passed to the generic plot function
#' #'
#' @export
setMethod("plot", setMethod("plot",
signature(x = "well", y="missing"), signature(x = "well", y="missing"),
function (x, y, constant.added = 1.0, xlim = NULL, ylim = NULL, function (x, y, constant.added = 1.0, xlim = NULL, ylim = NULL,

@ -6,15 +6,14 @@
\usage{ \usage{
gcat.analysis.main(file.list, single.plate, layout.file = NULL, gcat.analysis.main(file.list, single.plate, layout.file = NULL,
out.dir = getwd(), graphic.dir = paste(out.dir, "/pics", sep = ""), out.dir = getwd(), graphic.dir = paste(out.dir, "/pics", sep = ""),
add.constant = 0, blank.value = NULL, start.index = 2, add.constant = 0, blank.value, start.index, growth.cutoff = 0.05,
growth.cutoff = 0.05, use.linear.param = F, use.loess = F, use.linear.param = F, use.loess = F, smooth.param = 0.1,
smooth.param = 0.1, lagRange = NA, totalRange = NA, specRange = NA, lagRange = NA, totalRange = NA, specRange = NA, points.to.remove = 0,
points.to.remove = 0, remove.jumps = F, time.input = NA, remove.jumps = F, time.input = NA, plate.nrow = 8, plate.ncol = 12,
plate.nrow = 8, plate.ncol = 12, input.skip.lines = 0, input.skip.lines = 0, multi.column.headers = c("Plate.ID", "Well", "OD",
multi.column.headers = c("Plate.ID", "Well", "OD", "Time"), "Time"), single.column.headers = c("", "A1"),
single.column.headers = c("", "A1"), layout.sheet.headers = c("Strain", layout.sheet.headers = c("Strain", "Media Definition"), silent = T,
"Media Definition"), silent = T, verbose = F, return.fit = F, verbose = F, return.fit = F, overview.jpgs = T)
overview.jpgs = T)
} }
\arguments{ \arguments{
\item{file.list}{A list of full paths to .csv files. all files must be in the same format (see <single.plate>)} \item{file.list}{A list of full paths to .csv files. all files must be in the same format (see <single.plate>)}
@ -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{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)} \item{start.index}{Which timepoint should be used as the first one after inoculation (defaults to the 2th one)}

@ -139,7 +139,7 @@ class Assay
# (4) start index (A Positive Integer Number) # (4) start index (A Positive Integer Number)
if if
start_index == '' start_index == ''
self.start_index = 2 self.start_index = 1
else else
self.start_index.gsub(/\s+/, "") # remove white spaces self.start_index.gsub(/\s+/, "") # remove white spaces
self.start_index = self.start_index.to_i self.start_index = self.start_index.to_i
@ -276,6 +276,7 @@ class Assay
# (2) transformation. N value (A Real Number) # (2) transformation. N value (A Real Number)
R.assign "add.constant", self.transformation R.assign "add.constant", self.transformation
# R.assign "add.constant", 0 # R.assign "add.constant", 0
# (3) blank value (A Real Number) # (3) blank value (A Real Number)
if (self.blank_value == nil) if (self.blank_value == nil)
R.eval "blank.value <- NULL" R.eval "blank.value <- NULL"
@ -284,8 +285,14 @@ class Assay
else else
R.assign "blank.value", self.blank_value R.assign "blank.value", self.blank_value
end 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)] # (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 R.assign "points.to.remove", self.remove_points

@ -45,16 +45,17 @@
</div> </div>
</li> </li>
<li> <li>
<h3><span data-tooltip="OD value for blank well read. As the default option <NULL>, GCAT will automatically take the first OD reading of each well to be the blank.">Media background</span></h3> <h3><span data-tooltip="OD value for blank well read">Media background</span></h3>
<%= f.radio_button(:blank_value, "zero", {:class => "user_enter3 user_enter3_no"}) %>
<%= f.label(:blank_value_zero, "0" ) %> <br/>
<%= 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") %><br>
<%= f.radio_button(:blank_value, "user", {:checked => true, :class => "user_enter3 user_enter3_yes"}) %> <%= f.radio_button(:blank_value, "user", {:checked => true, :class => "user_enter3 user_enter3_yes"}) %>
<%= f.label(:blank_value_user, "User Input.") %> <%= f.label(:blank_value_user, "User Input.") %>
<div class="field optional_input3" style="display:none"> <div class="field optional_input3" style="display:none">
<%= f.text_field :blank_value_input, :placeholder => 'Enter your OD blank value here' %> <%= f.text_field :blank_value_input, :placeholder => 'Enter your OD blank value here' %>
</div> </div>
<br>
<%= 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") %><br>
<%= f.radio_button(:blank_value, "zero", {:class => "user_enter3 user_enter3_no"}) %>
<%= f.label(:blank_value_zero, "Set to 0" ) %>
</li> </li>
<li> <li>
<h3><span data-tooltip="GCAT transforms optical density (OD) to log(x+δ). x = OD Media background. Specify a value for n or choose from the defaults. Note: 0 is not recommended unless all wells contain many repeated measurements for initial density that can be used to accurately estimate the baseline density. See the user manual for more details.">OD Transform</span></h3> <h3><span data-tooltip="GCAT transforms optical density (OD) to log(x+δ). x = OD Media background. Specify a value for n or choose from the defaults. Note: 0 is not recommended unless all wells contain many repeated measurements for initial density that can be used to accurately estimate the baseline density. See the user manual for more details.">OD Transform</span></h3>
@ -84,8 +85,8 @@
<h3><span data-tooltip="Enter the index of the timepoint at which the wells were inoculated with the culture. <h3><span data-tooltip="Enter the index of the timepoint at which the wells were inoculated with the culture.
" >Inoculation timepoint</span></h3> " >Inoculation timepoint</span></h3>
<div class="field"> <div class="field">
<%= f.label :start_index, "Enter the timepoint index (positive integer only). The default value is 2. " %><br /> <%= f.label :start_index, "Enter the timepoint index (positive integer only). The default value is 1. " %><br />
<%= f.text_field(:start_index, :type => 'number', :min =>'1', :size => '3', :value => '2') %> <%= f.text_field(:start_index, :type => 'number', :min =>'1', :size => '3', :value => '1') %>
</div> </div>
</li> </li>
<li> <li>

Binary file not shown.

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save