fl.workflow {QurvE} | R Documentation |
Run a complete fluorescence curve analysis and dose-reponse analysis workflow.
Description
fl.workflow
runs fl.control
to create a fl.control
object and then performs all computational fitting operations based on the user input. Finally, if desired, a final report is created in PDF or HTML format that summarizes all results obtained.
Usage
fl.workflow(
grodata = NULL,
time = NULL,
growth = NULL,
fl_data = NULL,
ec50 = TRUE,
mean.grp = NA,
mean.conc = NA,
fit.opt = c("l", "s"),
x_type = c("growth", "time"),
norm_fl = TRUE,
t0 = 0,
tmax = NA,
min.growth = 0,
max.growth = NA,
log.x.lin = FALSE,
log.x.spline = FALSE,
log.y.lin = FALSE,
log.y.spline = FALSE,
lin.h = NULL,
lin.R2 = 0.97,
lin.RSD = 0.07,
lin.dY = 0.05,
biphasic = FALSE,
interactive = FALSE,
dr.parameter = "max_slope.spline",
dr.method = c("model", "spline"),
dr.have.atleast = 5,
smooth.dr = NULL,
log.x.dr = FALSE,
log.y.dr = FALSE,
nboot.dr = 0,
nboot.fl = 0,
smooth.fl = 0.75,
growth.thresh = 1.5,
suppress.messages = FALSE,
neg.nan.act = FALSE,
clean.bootstrap = TRUE,
report = NULL,
out.dir = NULL,
out.nm = NULL,
export.fig = FALSE,
export.res = FALSE,
parallelize = TRUE,
...
)
Arguments
grodata |
A |
time |
(optional) A matrix containing time values for each sample (if a |
growth |
(optional) A dataframe containing growth data (if a |
fl_data |
(optional) A dataframe containing fluorescence data (if a |
ec50 |
(Logical) Perform dose-response analysis ( |
mean.grp |
( |
mean.conc |
(A numeric vector, or a list of numeric vectors) Define concentrations to combine into common plots in the final report (if |
fit.opt |
(Character or character vector) Indicates whether the program should perform a linear regression ( |
x_type |
(Character) Which data type shall be used as independent variable? Options are |
norm_fl |
(Logical) use normalized (to growth) fluorescence data in fits. Has an effect only when |
t0 |
(Numeric) Minimum time value considered for linear and spline fits (if |
tmax |
(Numeric) Maximum time value considered for linear and spline fits (if |
min.growth |
(Numeric) Indicate whether only values above a certain threshold should be considered for linear regressions or spline fits (if |
max.growth |
(Numeric) Indicate whether only growth values below a certain threshold should be considered for linear regressions or spline fits (if |
log.x.lin |
(Logical) Indicates whether ln(x+1) should be applied to the independent variable for linear fits. Default: |
log.x.spline |
(Logical) Indicates whether ln(x+1) should be applied to the independent variable for spline fits. Default: |
log.y.lin |
(Logical) Indicates whether ln(y/y0) should be applied to the fluorescence data for linear fits. Default: |
log.y.spline |
(Logical) Indicates whether ln(y/y0) should be applied to the fluorescence data for spline fits. Default: |
lin.h |
(Numeric) Manually define the size of the sliding window used in |
lin.R2 |
(Numeric) R2 threshold for |
lin.RSD |
(Numeric) Relative standard deviation (RSD) threshold for the calculated slope in |
lin.dY |
(Numeric) Threshold for the minimum fraction of growth increase a linear regression window should cover. Default: 0.05 (5%). |
biphasic |
(Logical) Shall |
interactive |
(Logical) Controls whether the fit for each sample and method is controlled manually by the user. If |
dr.parameter |
(Character or numeric) The response parameter in the output table to be used for creating a dose response curve. See |
dr.method |
(Character) Perform either a smooth spline fit on response parameter vs. concentration data ( |
dr.have.atleast |
(Numeric) Minimum number of different values for the response parameter one should have for estimating a dose response curve. Note: All fit procedures require at least six unique values. Default: |
smooth.dr |
(Numeric) Smoothing parameter used in the spline fit by smooth.spline during dose response curve estimation. Usually (not necessesary) in (0; 1]. See |
log.x.dr |
(Logical) Indicates whether |
log.y.dr |
(Logical) Indicates whether |
nboot.dr |
(Numeric) Defines the number of bootstrap samples for EC50 estimation. Use |
nboot.fl |
(Numeric) Number of bootstrap samples used for nonparametric curve fitting with |
smooth.fl |
(Numeric) Parameter describing the smoothness of the spline fit; usually (not necessary) within (0;1]. |
growth.thresh |
(Numeric) Define a threshold for growth. Only if any growth value in a sample is greater than |
suppress.messages |
(Logical) Indicates whether messages (information about current fluorescence curve, EC50 values etc.) should be displayed ( |
neg.nan.act |
(Logical) Indicates whether the program should stop when negative fluorescence values or NA values appear ( |
clean.bootstrap |
(Logical) Determines if negative values which occur during bootstrap should be removed ( |
report |
(Character or NULL) Create a PDF ( |
out.dir |
Character or |
out.nm |
Character or |
export.fig |
(Logical) Export all figures created in the report as separate PNG and PDF files ( |
export.res |
(Logical) Create tab-separated TXT files containing calculated parameters and dose-response analysis results as well as an .RData file for the resulting |
parallelize |
Run linear fits and bootstrapping operations in parallel using all but one available processor cores |
... |
Further arguments passed to the shiny app. |
Value
A flFitRes
object that contains all computation results, compatible with various plotting functions of the QurvE package and with fl.report
.
time |
Raw time matrix passed to the function as |
data |
Raw data dataframe passed to the function as |
flFit |
|
drFit |
|
expdesign |
Experimental design table inherited from |
control |
Object of class |
Examples
# load example dataset
input <- read_data(data.growth = system.file("lac_promoters_growth.txt", package = "QurvE"),
data.fl = system.file("lac_promoters_fluorescence.txt", package = "QurvE"),
csvsep = "\t",
csvsep.fl = "\t")
# Run workflow
res <- fl.workflow(grodata = input, ec50 = FALSE, fit.opt = "s",
x_type = "time", norm_fl = TRUE,
dr.parameter = "max_slope.spline",
suppress.messages = TRUE,
parallelize = FALSE)
plot(res, data.type = "raw", legend.ncol = 3, basesize = 15)