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.
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,
...
)
A flFitRes
object that contains all computation results, compatible with various plotting functions of the QurvE package and with fl.report
.
Raw time matrix passed to the function as time
(if no grofit
object is provided. Else, extracted from grofit
).
Raw data dataframe passed to the function as grodata
.
flFit
object created with the call of flFit
on fluorescence data.
drFit
or drFitfl
object created with the call of growth.drFit
or fl.drFit
for fluorescence data (based on the dr.method
argument in control
; see fl.control
).
Experimental design table inherited from grodata
or created from the identifier columns (columns 1-3) in data
.
Object of class fl.control
created with the call of fl.control
.
A grodata
object created with read_data
or parse_data
, containing fluorescence data and data for the independent variable (i.e., time or growth).
(optional) A matrix containing time values for each sample (if a fl_data
dataframe is provided as separate argument).
(optional) A dataframe containing growth data (if a fl_data
matrix is provided as separate argument).
(optional) A dataframe containing fluorescence data (if a time
matrix or growth
dataframe is provided as separate argument).
(Logical) Perform dose-response analysis (TRUE
) or not (FALSE
).
("all"
, a string vector, or a list of string vectors) Define groups to combine into common plots in the final report based on sample identifiers (if report == TRUE
). Partial matches with sample/group names are accepted. Note: The maximum number of sample groups (with unique condition/concentration indicators) is 50. If you have more than 50 groups, option "all"
will produce the error ! Insufficient values in manual scale. [Number] needed but only 50 provided
.
(A numeric vector, or a list of numeric vectors) Define concentrations to combine into common plots in the final report (if report == TRUE
).
(Character or character vector) Indicates whether the program should perform a linear regression ("l"
), model fit ("m"
), spline fit ("s"
), or all ("a"
). Combinations can be freely chosen by providing a character vector, e.g. fit.opt = c("l", "s")
Default: fit.opt = c("l", "s")
.
(Character) Which data type shall be used as independent variable? Options are 'growth'
and 'time'
.
(Logical) use normalized (to growth) fluorescence data in fits. Has an effect only when x_type = 'time'
(Numeric) Minimum time value considered for linear and spline fits (if x_type = 'time'
).
(Numeric) Maximum time value considered for linear and spline fits (if x_type = 'time'
)..
(Numeric) Indicate whether only values above a certain threshold should be considered for linear regressions or spline fits (if x_type = 'growth'
).
(Numeric) Indicate whether only growth values below a certain threshold should be considered for linear regressions or spline fits (if x_type = 'growth'
).
(Logical) Indicates whether ln(x+1) should be applied to the independent variable for linear fits. Default: FALSE
.
(Logical) Indicates whether ln(x+1) should be applied to the independent variable for spline fits. Default: FALSE
.
(Logical) Indicates whether ln(y/y0) should be applied to the fluorescence data for linear fits. Default: FALSE
(Logical) Indicates whether ln(y/y0) should be applied to the fluorescence data for spline fits. Default: FALSE
(Numeric) Manually define the size of the sliding window used in flFitLinear
. If NULL
, h is calculated for each samples based on the number of measurements in the fluorescence increase phase of the plot.
(Numeric) R2 threshold for flFitLinear
.
(Numeric) Relative standard deviation (RSD) threshold for the calculated slope in flFitLinear
.
(Numeric) Threshold for the minimum fraction of growth increase a linear regression window should cover. Default: 0.05 (5%).
(Logical) Shall flFitLinear
and flFitSpline
try to extract fluorescence parameters for two different phases (as observed with, e.g., regulator-promoter systems with varying response in different growth stages) (TRUE
) or not (FALSE
)?
(Logical) Controls whether the fit for each sample and method is controlled manually by the user. If TRUE
, each fit is visualized in the Plots pane and the user can adjust fitting parameters and confirm the reliability of each fit per sample. Default: TRUE
.
(Character or numeric) The response parameter in the output table to be used for creating a dose response curve. See fl.drFit
for further details. Default: "max_slope.spline"
, which represents the maximum slope of the spline fit Typical options include: "max_slope.linfit"
, "dY.linfit"
, "max_slope.spline"
, and "dY.spline"
.
(Character) Perform either a smooth spline fit on response parameter vs. concentration data ("spline"
) or fit a biosensor response model (proposed by Meyer et al., 2019).
(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: 6
.
(Numeric) Smoothing parameter used in the spline fit by smooth.spline during dose response curve estimation. Usually (not necessesary) in (0; 1]. See smooth.spline
for further details. Default: NULL
.
(Logical) Indicates whether ln(x+1)
should be applied to the concentration data of the dose response curves. Default: FALSE
.
(Logical) Indicates whether ln(y+1)
should be applied to the response data of the dose response curves. Default: FALSE
.
(Numeric) Defines the number of bootstrap samples for EC50 estimation. Use nboot.dr = 0
to disable bootstrapping. Default: 0
.
(Numeric) Number of bootstrap samples used for nonparametric curve fitting with flBootSpline
. Use nboot.fl = 0
to disable the bootstrap. Default: 0
(Numeric) Parameter describing the smoothness of the spline fit; usually (not necessary) within (0;1]. smooth.gc=NULL
causes the program to query an optimal value via cross validation techniques. Especially for datasets with few data points the option NULL
might cause a too small smoothing parameter. This can result a too tight fit that is susceptible to measurement errors (thus overestimating slopes) or produce an error in smooth.spline
or lead to overfitting. The usage of a fixed value is recommended for reproducible results across samples. See smooth.spline
for further details. Default: 0.55
(Numeric) Define a threshold for growth. Only if any growth value in a sample is greater than growth.thresh
(default: 1.5) times the start growth, further computations are performed. Else, a message is returned.
(Logical) Indicates whether messages (information about current fluorescence curve, EC50 values etc.) should be displayed (FALSE
) or not (TRUE
). This option is meant to speed up the high-throughput processing data. Note: warnings are still displayed. Default: FALSE
.
(Logical) Indicates whether the program should stop when negative fluorescence values or NA values appear (TRUE
). Otherwise, the program removes these values silently (FALSE
). Improper values may be caused by incorrect data or input errors. Default: FALSE
.
(Logical) Determines if negative values which occur during bootstrap should be removed (TRUE
) or kept (FALSE
). Note: Infinite values are always removed. Default: TRUE
.
(Character or NULL) Create a PDF ('pdf'
) and/or HTML ('html'
) report after running all computations. Define NULL
if no report should be created. Default: (c('pdf', 'html')
)
Character or NULL
Define the name of a folder in which all result files (tables and reports) are stored. If NULL
, the folder will be named with a combination of "FluorescenceResults_" and the current date and time.
Character or NULL
Define the name of the report files. If NULL
, the files will be named with a combination of "FluorescenceReport_" and the current date and time.
(Logical) Export all figures created in the report as separate PNG and PDF files (TRUE
) or not (FALSE
). Only effective if report = TRUE
.
(Logical) Create tab-separated TXT files containing calculated parameters and dose-response analysis results as well as an .RData file for the resulting flFitRes
object.
Run linear fits and bootstrapping operations in parallel using all but one available processor cores
Further arguments passed to the shiny app.
# 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)
Run the code above in your browser using DataLab