GCAT5.0 released
This commit is contained in:
Executable
+35
@@ -0,0 +1,35 @@
|
||||
% Generated by roxygen2 (4.0.2): do not edit by hand
|
||||
\name{fit.model}
|
||||
\alias{fit.model}
|
||||
\title{fit.model}
|
||||
\usage{
|
||||
fit.model(input.well, growth.model, backup.growth.model = NULL,
|
||||
fit.if.no.growth = F, use.linear.param = F, use.loess = F, smooth.param,
|
||||
silent = T)
|
||||
}
|
||||
\arguments{
|
||||
\item{input.well}{The well needed to be fitted with the given model.}
|
||||
|
||||
\item{growth.model}{What growth model should be used?}
|
||||
|
||||
\item{backup.growth.model}{If \code{gowth.mode} fails, this model will be used.}
|
||||
|
||||
\item{fit.if.no.growth}{should the function attempt to fit a well even if there was no growth detected? default is F}
|
||||
|
||||
\item{silent}{output back to R console?}
|
||||
|
||||
\item{use.linear.param:}{Should an additional linear parameter (c) be used when fitting the data to the model?}
|
||||
|
||||
\item{use.loess:}{Should Local Polynomial Regression Fitting (loess function) be used instead of nls?}
|
||||
|
||||
\item{smooth.param:}{If loess is used, an optional smoothing parameter. Default is .6}
|
||||
}
|
||||
\description{
|
||||
This function will use the function stored in the "guess" slot of \code{growth.model} to calculate initial guesses
|
||||
for growth.model parameters, then it will use the "formula" slot with \code{nls} to fit a non-linear least squares
|
||||
\code{growth.model} or Local Polynomial Regression Fitting to the data. Richards model is first fitted.
|
||||
If the shape parameter is statisticaly significant then Richards is used. If it is within 2 SE of 1 or Zero than
|
||||
a simpler model is preferred. If the Richards fit fails, then Logistic is tried. If it fails, Gompertz is tried.
|
||||
Model fit failure is reported if none of the models can sucessfully fit the data
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
\name{GCAT}
|
||||
\alias{GCAT}
|
||||
\title{
|
||||
Growth Curve Analysis Tool
|
||||
}
|
||||
\description{
|
||||
Mathematical modeling and parameter estimation of high volume microbial growth data.
|
||||
}
|
||||
\details{
|
||||
GCAT utilizes the \code{\link{nls}} function in the R base package to fit logistic and Richards models to
|
||||
growth curve data. Input is in .csv format and analysis is accessed using \code{\link{gcat.analysis.main}}
|
||||
or \code{\link{gcat.fit.main}}. Output is in .txt and .pdf format, and is accessed using \code{\link{gcat.analysis.main}}
|
||||
or \code{\link{gcat.output.main}}.
|
||||
|
||||
\tabular{ll}{
|
||||
Version: \tab 5.0\cr
|
||||
Depends: \tab pheatmap, gplots\cr
|
||||
License: \tab LGPL-3\cr
|
||||
Date: \tab 2014-02-10\cr
|
||||
}
|
||||
|
||||
}
|
||||
\author{
|
||||
Jason Shao\cr
|
||||
Nate DiPiazza\cr
|
||||
Yury Bukhman\cr
|
||||
Minh Bui\cr
|
||||
|
||||
Maintainer: Yury Bukhman
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
% Generated by roxygen2 (4.0.2): do not edit by hand
|
||||
\name{gcat.analysis.main}
|
||||
\alias{gcat.analysis.main}
|
||||
\title{Analyze screening growth data from the given .csv files.}
|
||||
\usage{
|
||||
gcat.analysis.main(file.list, single.plate, layout.file = NULL,
|
||||
out.dir = getwd(), graphic.dir = paste(out.dir, "/pics", sep = ""),
|
||||
add.constant = 0.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 = 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>)}
|
||||
|
||||
\item{single.plate}{The file in the single plate (wide) format vs. the multi-plate (long) format?}
|
||||
|
||||
\item{layout.file}{Full path to a layout file with strain and media definitions (applies to all files in list)}
|
||||
|
||||
\item{out.dir}{A directory to output the table of curve parameters to (defaults to working directory)}
|
||||
|
||||
\item{graphic.dir}{A directory to output the images of the fitted curves to (defaults to subdirectory "pics" of <out.dir> above)}
|
||||
|
||||
\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{start.index}{Which timepoint should be used as the first one after inoculation (defaults to the 2th one)}
|
||||
|
||||
\item{growth.cutoff}{Minimum threshold for curve growth.}
|
||||
|
||||
\item{use.linear.param}{Whether to use linear parameters or not?}
|
||||
|
||||
\item{use.loess}{Whether to use LOESS model or not?}
|
||||
|
||||
\item{smooth.param}{Smoothing parameter for LOESS model.}
|
||||
|
||||
\item{points.to.remove}{A list of numbers referring to troublesome points that should be removed across all wells.}
|
||||
|
||||
\item{remove.jumps}{Should the slope checking function be on the lookout for large jumps in OD?}
|
||||
|
||||
\item{time.input}{The time setting in which the current system is running?}
|
||||
|
||||
\item{plate.nrow}{The number of rows in a plate.}
|
||||
|
||||
\item{plate.ncol}{The number of columns in a plate.}
|
||||
|
||||
\item{input.skip.lines}{If specified, this number of lines shall be skipped from the top when reading the input file with read.csv}
|
||||
|
||||
\item{multi.column.headers}{The headers of the result tabular data when analyzing multiple plates at once.}
|
||||
|
||||
\item{single.column.headers}{The headers of the result tebaular data when analyzaing a single plate.}
|
||||
|
||||
\item{layout.sheet.headers}{The headers of the layout file?}
|
||||
|
||||
\item{silent}{Shoulde messages be returned to the console?}
|
||||
|
||||
\item{verbose}{Should sub-functions return messages to console? (when I say verbose, I mean it!)}
|
||||
|
||||
\item{overview.jpgs}{Should GCAT enable an overview image?}
|
||||
}
|
||||
\value{
|
||||
A list of the output files.
|
||||
}
|
||||
\description{
|
||||
Top-level GCAT function
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
% Generated by roxygen2 (4.0.2): do not edit by hand
|
||||
\name{gcat.fit.main}
|
||||
\alias{gcat.fit.main}
|
||||
\title{Main analysis function for GCAT}
|
||||
\usage{
|
||||
gcat.fit.main(file.name, input.data = NULL, load.type = "csv",
|
||||
layout.file = NULL, single.plate = F, blank.value = NULL,
|
||||
start.index = 2, time.input = NA, normalize.method = "default",
|
||||
add.constant = 1, use.log = T, points.to.remove = 0,
|
||||
use.linear.param = F, use.loess = F, smooth.param = 0.1,
|
||||
fall.cutoff = -0.0025, growth.cutoff = 0.05, remove.jumps = F,
|
||||
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"), growth.model = NA, backup.growth.model = NA,
|
||||
silent = F, verbose = F)
|
||||
}
|
||||
\arguments{
|
||||
\item{file.name}{Complete path and file name of a comma-separated values (.csv) file containing growth curve data
|
||||
in the multiple-plate (long) format.}
|
||||
|
||||
\item{input.data}{A list of tables representing input files read with \code{read.table}. Used to save time in cases
|
||||
of running multiple analyses on the same dataset. If used, the function will ignore \code{file.name} entirely.}
|
||||
|
||||
\item{load.type}{.csv by default.}
|
||||
|
||||
\item{layout.file}{Specifies the location of a layout file containing identifying information.}
|
||||
|
||||
\item{single.plate}{Whether the GCAT is analyzing a single plate or not.}
|
||||
|
||||
\item{blank.value}{Blank OD measurement for uninoculated wells. By default(NULL), the value of the first OD
|
||||
measurement in each well is used.}
|
||||
|
||||
\item{start.index}{Which timepoint should be used as the first one after inoculation?}
|
||||
|
||||
\item{time.input}{Either a character describing the format used to convert timestamps in the input to numbers
|
||||
representing number of seconds (see \code{strptime}), or a factor to divide entries in the Time column by to get the
|
||||
numbers of hours.}
|
||||
|
||||
\item{normalize.method}{Describes the method used by \code{normalize.ODs} to normalize cell density values using blank reads.}
|
||||
|
||||
\item{add.constant}{A value for r in the log(OD + r) transformation.}
|
||||
|
||||
\item{use.log}{Should the analysis use log on all values.}
|
||||
|
||||
\item{points.to.remove}{A vector of integers specifying which timepoints should be removed across all wells.
|
||||
By default(0) none are marked for removal.}
|
||||
|
||||
\item{use.linear.param}{Should the linear parameter be used or not.}
|
||||
|
||||
\item{use.loess}{Should the loess model be used or not.}
|
||||
|
||||
\item{smooth.param}{If loess model is used, this parameter define the smoothing parameter for the loess model.}
|
||||
|
||||
\item{fall.cutoff}{A cutoff used by \code{check.slopes} to decide on thresholds for jumps and tanking.}
|
||||
|
||||
\item{growth.cutoff}{A threshold used by check.growth to decide whether a well displays growth.}
|
||||
|
||||
\item{remove.jumps}{Should jumps in OD detected by the subfunction \code{check.slopes}?}
|
||||
|
||||
\item{plate.nrow}{The number of rows in the input files.}
|
||||
|
||||
\item{plate.ncol}{The number of columns in the input files.}
|
||||
|
||||
\item{input.skip.lines}{If specified, this number of lines shall be skipped from the top when reading the input file with read.csv}
|
||||
|
||||
\item{multi.column.headers}{The headers of the column when analyzing multiple plates.}
|
||||
|
||||
\item{single.column.headers}{The headers of the column when analyzing a single plate.}
|
||||
|
||||
\item{growth.model}{What growth model should be used?}
|
||||
|
||||
\item{backup.growth.model}{If the main growth model fails, the back up model will be used.}
|
||||
|
||||
\item{silent}{Surpress all messages.}
|
||||
|
||||
\item{verbose}{Display all messages when analyzing each well.}
|
||||
|
||||
\item{layour.sheet.headers}{The headers of the layout file.}
|
||||
}
|
||||
\value{
|
||||
An array of well objects
|
||||
}
|
||||
\description{
|
||||
This is the main function that handles all the analyses for data files in both single and multiple plate formats.
|
||||
It is called by the top level function \code{gcat.analysis.main} along with \code{gcat.output.main}.
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
% Generated by roxygen2 (4.0.2): do not edit by hand
|
||||
\name{gcat.load.data}
|
||||
\alias{gcat.load.data}
|
||||
\title{Load tabular data}
|
||||
\usage{
|
||||
gcat.load.data(file.name = NULL, load.type = "csv", input.data = NULL,
|
||||
single.plate.ID = NULL, plate.layout = NULL, 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"), blank.value = NULL, start.index = 2,
|
||||
single.plate = F, silent = T)
|
||||
}
|
||||
\arguments{
|
||||
\item{file.name}{Complete path and file name of a comma-separated values (.csv) file containing growth curve data
|
||||
in the multiple-plate (long) format.}
|
||||
|
||||
\item{load.type}{.csv by default.}
|
||||
|
||||
\item{input.data}{A list of tables representing input files read with \code{read.table}. Used to save time in cases
|
||||
of running multiple analyses on the same dataset. If used, the function will ignore \code{file.name} entirely.}
|
||||
|
||||
\item{single.plate.ID}{specifies a plate name for a single-plate read. If NULL, this is derived from the file name.}
|
||||
|
||||
\item{plate.nrow}{The number of rows in the input files.}
|
||||
|
||||
\item{plate.ncol}{The number of columns in the input files.}
|
||||
|
||||
\item{input.skip.lines}{specifies a plate name for a single-plate read. If NULL, this is derived from the file name.}
|
||||
|
||||
\item{multi.column.headers}{The headers of the column when analyzing multiple plates.}
|
||||
|
||||
\item{single.column.headers}{The headers of the column when analyzing a single plate.}
|
||||
|
||||
\item{layout.sheet.headers}{The headers of the layout file.}
|
||||
|
||||
\item{blank.value}{Blank OD measurement for uninoculated wells. By default(NULL), the value of the first OD
|
||||
measurement in each well is used.}
|
||||
|
||||
\item{silent}{Surpress all messages.}
|
||||
|
||||
\item{plate.laout}{Specifies the layout of the given plate.}
|
||||
|
||||
\item{add.constant}{A value for r in the log(OD + r) transformation.}
|
||||
|
||||
\item{verbose}{Display all messages when analyzing each well.}
|
||||
}
|
||||
\value{
|
||||
A list of well objects.
|
||||
}
|
||||
\description{
|
||||
This function handles loading data from tabular format (.csv, tab-delimited text or R data frame object)
|
||||
and returns an array of well objects, each filled with raw Time vs. OD data.
|
||||
It takes single-plate or multiple-plate format data. For single-plate data,
|
||||
it calls on the function \code{gcat.reorganize.single.plate.data} to rearrange the table before creating the output object.
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
% Generated by roxygen2 (4.0.2): do not edit by hand
|
||||
\name{gcat.output.main}
|
||||
\alias{gcat.output.main}
|
||||
\title{Output function for generating files from fitted data.}
|
||||
\usage{
|
||||
gcat.output.main(fitted.well.array, out.prefix = "", source.file.list,
|
||||
upload.timestamp = NULL, add.constant, blank.value, start.index,
|
||||
growth.cutoff, points.to.remove, remove.jumps, out.dir = getwd(),
|
||||
graphic.dir = paste(out.dir, "/pics", sep = ""), overview.jpgs = T,
|
||||
use.linear.param = F, use.loess = F, plate.nrow = 8, plate.ncol = 12,
|
||||
unlog = F, silent = T)
|
||||
}
|
||||
\arguments{
|
||||
\item{fitted.well.array}{A list of fitted well objects.}
|
||||
|
||||
\item{out.prefix}{Prefix that is in the name of output files.}
|
||||
|
||||
\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{start.index}{Which timepoint should be used as the first one after inoculation (defaults to the 2th one)}
|
||||
|
||||
\item{growth.cutoff}{Minimum threshold for curve growth.}
|
||||
|
||||
\item{points.to.remove}{A list of numbers referring to troublesome points that should be removed across all wells.}
|
||||
|
||||
\item{remove.jumps}{Should the slope checking function be on the lookout for large jumps in OD?}
|
||||
|
||||
\item{out.dir}{name a directory to output the table of curve parameters to (defaults to working directory)}
|
||||
|
||||
\item{graphic.dir}{name a directory to output the images of the fitted curves to
|
||||
(defaults to subdirectory "pics" of <out.dir> above)}
|
||||
|
||||
\item{overview.jpgs}{should jpgs be generated for each plate with the overview graphic?
|
||||
This is for backwards compatibility with the old web server.}
|
||||
|
||||
\item{unlog}{should exported graphics be transformed back to the OD scale?}
|
||||
|
||||
\item{silent}{should messages be returned to the console?}
|
||||
|
||||
\item{constant.added}{(should be the same value as add.constant above) -
|
||||
used to readjust for the constant added during the log transform when plotting ODs.}
|
||||
}
|
||||
\value{
|
||||
A list of output files if success.
|
||||
}
|
||||
\description{
|
||||
Handles files and directories, calls \code{table.out}, \code{plate.overview} and \code{view.fit}
|
||||
to generate output tables and graphics.
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
\name{gcat.set.constants}
|
||||
\alias{gcat.set.constants}
|
||||
\title{
|
||||
Set global constants for GCAT analysis package
|
||||
}
|
||||
\description{
|
||||
Sets global constants, mostly regarding issues in input file format, for GCAT analysis.
|
||||
}
|
||||
\usage{
|
||||
gcat.set.constants(plate.nrow = 8, plate.ncol = 12, input.skip.lines = 0, time.format = "\%Y-\%m-\%d \%H:\%M:\%S",
|
||||
multi.column.headers = c("Plate ID", "Well", "OD", "Time"), single.column.headers = c("", "A1"),
|
||||
xlsx.data.headers = c("Plate ID", "Well positions"), xlsx.layout.sheet = "Plate layout",
|
||||
layout.sheet.headers = c("Strain", "Media Definition"))
|
||||
}
|
||||
\arguments{
|
||||
\item{plate.nrow}{
|
||||
Number of rows present in each plate of input data. Default 8 (A-H)
|
||||
}
|
||||
\item{plate.ncol}{
|
||||
Number of columns present in each plate of input data. Default 12 (1-12)
|
||||
}
|
||||
\item{input.skip.lines}{
|
||||
Number of lines to skip at the top when reading input data files.
|
||||
}
|
||||
\item{time.format}{
|
||||
Either a character describing the format used to convert timestamps
|
||||
in the input to numbers representing number of seconds (see \code{\link{strptime}}), or a
|
||||
factor to divide entries in the \code{Time} column by to get the number of hours.
|
||||
}
|
||||
\item{multi.column.headers}{
|
||||
A character vector describing the names of the columns for
|
||||
Plate ID, Well ID, Cellular density measurements and Time, respectively, in the multi-plate (long) format.
|
||||
}
|
||||
\item{single.column.headers}{
|
||||
A character vector describing the name of the Time column and the first well data in the single plate (wide) format.
|
||||
}
|
||||
\item{xlsx.data.headers}{
|
||||
For .xlsx data only, a vector describing possible entries in the upper left cell marking worksheets in each
|
||||
workbook as containing data. .csv files don't have multiple worksheets and are assumed to contain useable data.
|
||||
}
|
||||
\item{xlsx.layout.sheet}{
|
||||
For .xlsx data only, the name of the worksheet containing plate layout information. .csv files use a separate layout file.
|
||||
}
|
||||
\item{layout.sheet.headers}{
|
||||
A character vector describing the name of the Strain and Media definiton columns, respectively, in the plate layout file.
|
||||
}
|
||||
}
|
||||
\value{
|
||||
NULL
|
||||
}
|
||||
\author{
|
||||
Jason Shao
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
% Generated by roxygen2 (4.0.2): do not edit by hand
|
||||
\name{model}
|
||||
\alias{model}
|
||||
\title{Model}
|
||||
\usage{
|
||||
model(name, expression, formula, guess)
|
||||
}
|
||||
\arguments{
|
||||
\item{name}{The name of the model}
|
||||
|
||||
\item{expression}{Expression of the model}
|
||||
|
||||
\item{formula}{The formula of this model}
|
||||
|
||||
\item{guess}{The guess of this model}
|
||||
}
|
||||
\value{
|
||||
The new model
|
||||
}
|
||||
\description{
|
||||
Function to create a new model
|
||||
}
|
||||
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
% Generated by roxygen2 (4.0.2): do not edit by hand
|
||||
\name{plot.data}
|
||||
\alias{plot.data}
|
||||
\title{plot.data}
|
||||
\usage{
|
||||
\method{plot}{data}(input.well, view.raw.data = F, unlog = F, scale = 1,
|
||||
main = paste(plate.name(input.well), well.name(input.well)),
|
||||
number.points = T, draw.symbols = F, constant.added, ylim, ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{input.well}{The well object that need to be plottedd}
|
||||
|
||||
\item{view.raw.data}{should the raw data be plotted? (}
|
||||
|
||||
\item{unlog}{should data be plotted on a linear (vs. logarithmic) scale?}
|
||||
|
||||
\item{scale}{determines the font scale for the entire graph. all cex values are calculated from this.}
|
||||
|
||||
\item{number.points}{should points be labeled with numeric indices?}
|
||||
|
||||
\item{draw.symbols}{- should <check.slopes> be called on the well and markings drawn on the graph?}
|
||||
|
||||
\item{...}{additional arguments passed to plot()}
|
||||
}
|
||||
\description{
|
||||
Basic function plots time vs. OD from a well object
|
||||
}
|
||||
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
% Generated by roxygen2 (4.0.2): do not edit by hand
|
||||
\name{transform.ODs}
|
||||
\alias{transform.ODs}
|
||||
\title{Transform.Ods}
|
||||
\usage{
|
||||
\method{transform}{ODs}(input.well, use.log = T, blank.value = NULL,
|
||||
start.index = 2, negative.OD.cutoff = 10, constant.added = 1, ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{input.well}{an object of class well}
|
||||
|
||||
\item{use.log}{gets added to the "use.log" slot of the well object. this will determine whether the log-transformed data
|
||||
or raw normalized data is returned using the function \code{data.from}.}
|
||||
|
||||
\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{start.index}{which timepoint should be used as the first one after inoculation (defaults to the 2th one)}
|
||||
|
||||
\item{negative.OD.cutoff}{if any ODs below the specified blank value are detected before this index timepoint, the entire well is discarded.}
|
||||
}
|
||||
\description{
|
||||
This function adds a "log.OD" column to the "screen.data" slot of a well object with log-transformed data.
|
||||
The raw data is kept intact.
|
||||
It also checks to see if any of the raw OD values (before a certain timepoint) is below the blank OD.
|
||||
This can be disastrous for the log(OD) transform.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user