Commiting branch GCAT_6.0 at SVN revision 572
This commit is contained in:
Binary file not shown.
+2
-3
@@ -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 <ybukhman@glbrc.wisc.edu>
|
||||
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
|
||||
Suggests: testthat
|
||||
|
||||
+1
-1
@@ -14,4 +14,4 @@ LaTeX: pdfLaTeX
|
||||
|
||||
BuildType: Package
|
||||
PackageInstallArgs: --no-multiarch --with-keep.source
|
||||
PackageRoxygenize: rd
|
||||
PackageRoxygenize: rd,collate,namespace
|
||||
|
||||
@@ -19,6 +19,7 @@ exportMethods(getStartIndex)
|
||||
exportMethods(getUseLog)
|
||||
exportMethods(getWellInfo)
|
||||
exportMethods(getnls)
|
||||
exportMethods(plot)
|
||||
import(gplots)
|
||||
import(methods)
|
||||
import(pheatmap)
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 <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{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)}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -45,16 +45,17 @@
|
||||
</div>
|
||||
</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>
|
||||
<%= 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>
|
||||
<h3><span data-tooltip="OD value for blank well read">Media background</span></h3>
|
||||
<%= f.radio_button(:blank_value, "user", {:checked => true, :class => "user_enter3 user_enter3_yes"}) %>
|
||||
<%= f.label(:blank_value_user, "User Input.") %>
|
||||
<div class="field optional_input3" style="display:none">
|
||||
<%= f.text_field :blank_value_input, :placeholder => 'Enter your OD blank value here' %>
|
||||
</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>
|
||||
<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.
|
||||
" >Inoculation timepoint</span></h3>
|
||||
<div class="field">
|
||||
<%= f.label :start_index, "Enter the timepoint index (positive integer only). The default value is 2. " %><br />
|
||||
<%= 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. " %><br />
|
||||
<%= f.text_field(:start_index, :type => 'number', :min =>'1', :size => '3', :value => '1') %>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
@@ -156,4 +157,4 @@
|
||||
</div>
|
||||
</ul>
|
||||
</section>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user