\name{fitCellGrowths} \alias{fitCellGrowths} \title{Fit multiple growth curves} \usage{ fitCellGrowths(well, plot.folder = NULL, model = "locfit", xlab = "time", ylab = expression(log2(Absorption)), scaleX = 1, scaleY = log2, calibration = identity, fileParser = readYeastGrower, getWellIds = getWellIdsTecan, locfit.h = 3 * 60 * 60, bandwidths = seq(0.5 * 3600, 10 * 3600, length.out = 30), nFold = 10, nWell = 100, cutoff = 0.95, ...) } \arguments{ \item{well}{data.frame with mandatory columns directory, filename, well. See \code{\link{wellDataFrame}}} \item{plot.folder}{see details} \item{model}{model to choose for fitting growth curve} \item{fileParser}{Converts the file generated by the machine to proper R format. See \code{\link{readYeastGrower}} for details.} \item{xlab}{plot parameter} \item{ylab}{plot parameter} \item{scaleX}{useful if you want to get the doubling in another unit, e.g. days instead of seconds.} \item{scaleY}{\code{function} applied to the calibrated data.} \item{calibration}{\code{function} or \code{list} of \code{functions}. If function, calibration is applied to all raw data. If list, the well dataframe must contain a column \code{machine}. Depending on that column the according function in the list is applied to the raw data. See details} \item{getWellIds}{function or vector. If function its parameter is the return value of fileParser. It should return a vector containing the well ids (e.g. A01, A02, ...). You can set the well ids vector directly. See \code{\link{getWellIdsTecan}}.} \item{locfit.h}{bandwidth parameter for local polynomial fitting. If set to "bandwidthCV" bandwidth is automatically selected through \code{\link{bandwidthCV}}} \item{bandwidths}{passed to \code{\link{bandwidthCV}} if locfit.h="bandwidthCV"} \item{nFold}{passed to \code{\link{bandwidthCV}} if locfit.h="bandwidthCV"} \item{nWell}{passed to \code{\link{bandwidthCV}} if locfit.h="bandwidthCV"} \item{cutoff}{passed to \code{\link{bandwidthCV}} if locfit.h="bandwidthCV"} \item{...}{Parameter is passed to \code{\link{fitCellGrowth}}} } \value{ dataframe with entries \item{maxGrowthRate}{maximal growth rate} \item{pointOfMaxGrowthRate}{datapoint where growth rate is maximal} \item{max}{inferred maximum among the time points} \item{pointOfMax}{datapoint of the max fitted value} } \description{ Fit growth curves for multiple wells } \details{ Essentially a wrapper for \code{\link{fitCellGrowth}}. The function gets a well object and fits a growth curve on all wells. It computes the doubling frequency observed in a well and extracts the maximal growth rate ( 1/minimal doubling time). The raw values from the machine might not be directly optical densities (OD), which is needed to infer doubling time. Calibration functions for each machine can be provided to map raw values into OD using the \code{calibration} parameter. If the parameter plot.folder is set, the function creates a folder within plot.folder for each file in the well object. For each well a plot is written into that folder, named \code{well_id.png}. } \examples{ plateLayout <- system.file("extdata", "plateLayout.txt", package="cellGrowth") machineRun <- system.file("extdata", "machineRun.txt", package="cellGrowth") well <- wellDataFrame(plateLayout,machineRun) cal <- function(x){x+1} fit <- fitCellGrowths(well,plot.folder="data",calibration=cal) } \author{ Julien Gagneur and Andreas Neudecker } \seealso{ \code{\link{fitCellGrowth}} }