fitCellGrowths: Fit multiple growth curves

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/fitCellGrowths.R

Description

Fit growth curves for multiple wells

Usage

1
2
3
4
5
6
7
8
  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

well

data.frame with mandatory columns directory, filename, well. See wellDataFrame

plot.folder

see details

model

model to choose for fitting growth curve

fileParser

Converts the file generated by the machine to proper R format. See readYeastGrower for details.

xlab

plot parameter

ylab

plot parameter

scaleX

useful if you want to get the doubling in another unit, e.g. days instead of seconds.

scaleY

function applied to the calibrated data.

calibration

function or list of functions. If function, calibration is applied to all raw data. If list, the well dataframe must contain a column machine. Depending on that column the according function in the list is applied to the raw data. See details

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 getWellIdsTecan.

locfit.h

bandwidth parameter for local polynomial fitting. If set to "bandwidthCV" bandwidth is automatically selected through bandwidthCV

bandwidths

passed to bandwidthCV if locfit.h="bandwidthCV"

nFold

passed to bandwidthCV if locfit.h="bandwidthCV"

nWell

passed to bandwidthCV if locfit.h="bandwidthCV"

cutoff

passed to bandwidthCV if locfit.h="bandwidthCV"

...

Parameter is passed to fitCellGrowth

Details

Essentially a wrapper for 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 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 well_id.png.

Value

dataframe with entries

maxGrowthRate

maximal growth rate

pointOfMaxGrowthRate

datapoint where growth rate is maximal

max

inferred maximum among the time points

pointOfMax

datapoint of the max fitted value

Author(s)

Julien Gagneur and Andreas Neudecker

See Also

fitCellGrowth

Examples

1
2
3
4
5
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)

Example output

Loading required package: locfit
locfit 1.5-9.1 	 2013-03-22
treating 4 unique tecan files.
treating file /usr/local/lib/R/site-library/cellGrowth/extdata/./Plate1_YPMalt.txt 
treating file /usr/local/lib/R/site-library/cellGrowth/extdata/./Plate1_YPFruc.txt 
treating file /usr/local/lib/R/site-library/cellGrowth/extdata/./Plate2_YPMalt.txt 
treating file /usr/local/lib/R/site-library/cellGrowth/extdata/./Plate2_YPFruc.txt 
Warning messages:
1: In fitCellGrowth(x = x[ii], z = z[ii], model = model, locfit.h = locfit.h,  :
  Maximal population reached close to the border. You can identify the well by testing for pointOfMax
2: In fitCellGrowth(x = x[ii], z = z[ii], model = model, locfit.h = locfit.h,  :
  Maximal population reached close to the border. You can identify the well by testing for pointOfMax
3: In fitCellGrowth(x = x[ii], z = z[ii], model = model, locfit.h = locfit.h,  :
  Maximal population reached close to the border. You can identify the well by testing for pointOfMax

cellGrowth documentation built on Oct. 31, 2019, 8:38 a.m.