Perform a fluorescence curve analysis on all samples in the provided dataset.
Source:R/fluorescence_workflows.R
flFit.Rd
flFit
performs all computational fluorescence fitting operations based on the user input.
Usage
flFit(
fl_data,
time = NULL,
growth = NULL,
control = fl.control(),
parallelize = TRUE,
...
)
Arguments
- fl_data
Either...
a
grodata
object created withread_data
orparse_data
,a list containing a
'time'
matrix (for x_type == "time") or'growth'
dataframe (for x_type == "growth") and a'fluorescence'
dataframes, ora dataframe containing (normalized) fluorescence values (if a
time
matrix orgrowth
dataframe is provided as separate argument).
- time
(optional) A matrix containing time values for each sample.
- growth
(optional) A dataframe containing growth values for each sample and sample identifiers in the first three columns.
- control
A
fl.control
object created withfl.control
, defining relevant fitting options.- parallelize
Run linear fits and bootstrapping operations in parallel using all but one available processor cores
- ...
Further arguments passed to the shiny app.
Value
An flFit
object that contains all fluorescence fitting results, compatible with
various plotting functions of the QurvE package.
- raw.x
Raw x matrix passed to the function as
time
(for x_type = 'time') orgrowth
(for x_type = 'growth').- raw.fl
Raw growth dataframe passed to the function as
data
.- flTable
Table with fluorescence parameters and related statistics for each fluorescence curve evaluation performed by the function. This table, which is also returned by the generic
summary.flFit
method applied to aflFit
object, is used as an input forfl.drFit
.- flFittedLinear
List of all
flFitLinear
objects, generated by the call offlFitLinear
. Note: access to each object in the list via double brace: flFittedLinear[[#n]].- flFittedSplines
List of all
flFitSpline
objects, generated by the call offlFitSpline
. Note: access to each object via double brace: flFittedSplines[[#n]].- flBootSplines
List of all
flBootSpline
objects, generated by the call offlBootSpline
. Note: access to each object via double brace: flFittedSplines[[#n]].- control
Object of class
fl.control
containing list of options passed to the function ascontrol
.
Details
Common response parameters used in dose-response analysis:
Linear fit:
- max_slope.linfit: Fluorescence increase rate
- lambda.linfit: Lag time
- dY.linfit: Maximum Fluorescence - Minimum Fluorescence
- A.linfit: Maximum fluorescence
Spline fit:
- max_slope.spline: Fluorescence increase rate
- lambda.spline: Lag time
- dY.spline: Maximum Fluorescence - Minimum Fluorescence
- A.spline: Maximum fluorescence
- integral.spline: Integral
Parametric fit:
- max_slope.model: Fluorescence increase rate
- lambda.model: Lag time
- dY.model: Maximum Fluorescence - Minimum Fluorescence
- A.model: Maximum fluorescence
- integral.model: Integral'
See also
Other workflows:
growth.gcFit()
,
growth.workflow()
Other fluorescence fitting functions:
flBootSpline()
,
flFitSpline()
Other dose-response analysis functions:
growth.drBootSpline()
,
growth.drFitSpline()
,
growth.gcFit()
,
growth.workflow()
Examples
# load example dataset
input <- read_data(data.growth = system.file("lac_promoters.xlsx", package = "QurvE"),
data.fl = system.file("lac_promoters.xlsx", package = "QurvE"),
sheet.growth = 1,
sheet.fl = 2 )
#> Sample data are stored in columns. If they are stored in row format, please run read_data() with data.format = 'row'.
# Define fit controls
control <- fl.control(fit.opt = "s",
x_type = "time", norm_fl = TRUE,
dr.parameter = "max_slope.spline",
dr.method = "model",
suppress.messages = TRUE)
# Run curve fitting workflow
res <- flFit(fl_data = input$norm.fluorescence,
time = input$time,
control = control,
parallelize = FALSE)
summary(res)
#> TestId AddId concentration reliability_tag log.x.spline log.y.spline
#> 1 pSEVA634∙GFP <NA> 0 TRUE FALSE FALSE
#> 2 pSEVA634r∙GFP <NA> 0 TRUE FALSE FALSE
#> 3 pSEVA634rκ∙GFP <NA> 0 TRUE FALSE FALSE
#> 4 pSEVA634∙GFP <NA> 0.01 TRUE FALSE FALSE
#> 5 pSEVA634r∙GFP <NA> 0.01 TRUE FALSE FALSE
#> 6 pSEVA634rκ∙GFP <NA> 0.01 TRUE FALSE FALSE
#> 7 pSEVA634∙GFP <NA> 0.05 TRUE FALSE FALSE
#> 8 pSEVA634r∙GFP <NA> 0.05 TRUE FALSE FALSE
#> 9 pSEVA634rκ∙GFP <NA> 0.05 TRUE FALSE FALSE
#> 10 pSEVA634∙GFP <NA> 0.1 TRUE FALSE FALSE
#> 11 pSEVA634r∙GFP <NA> 0.1 TRUE FALSE FALSE
#> 12 pSEVA634rκ∙GFP <NA> 0.1 TRUE FALSE FALSE
#> 13 pSEVA634∙GFP <NA> 0.2 TRUE FALSE FALSE
#> 14 pSEVA634r∙GFP <NA> 0.2 TRUE FALSE FALSE
#> 15 pSEVA634rκ∙GFP <NA> 0.2 TRUE FALSE FALSE
#> 16 pSEVA634∙GFP <NA> 0.5 TRUE FALSE FALSE
#> 17 pSEVA634r∙GFP <NA> 0.5 TRUE FALSE FALSE
#> 18 pSEVA634rκ∙GFP <NA> 0.5 TRUE FALSE FALSE
#> 19 pSEVA634∙GFP <NA> 1 TRUE FALSE FALSE
#> 20 pSEVA634r∙GFP <NA> 1 TRUE FALSE FALSE
#> 21 pSEVA634rκ∙GFP <NA> 1 TRUE FALSE FALSE
#> log.x.lin log.y.lin nboot.fl max_slope.linfit lambda.linfit dY.linfit
#> 1 FALSE FALSE 0 0 <NA> <NA>
#> 2 FALSE FALSE 0 0 <NA> <NA>
#> 3 FALSE FALSE 0 0 <NA> <NA>
#> 4 FALSE FALSE 0 0 <NA> <NA>
#> 5 FALSE FALSE 0 0 <NA> <NA>
#> 6 FALSE FALSE 0 0 <NA> <NA>
#> 7 FALSE FALSE 0 0 <NA> <NA>
#> 8 FALSE FALSE 0 0 <NA> <NA>
#> 9 FALSE FALSE 0 0 <NA> <NA>
#> 10 FALSE FALSE 0 0 <NA> <NA>
#> 11 FALSE FALSE 0 0 <NA> <NA>
#> 12 FALSE FALSE 0 0 <NA> <NA>
#> 13 FALSE FALSE 0 0 <NA> <NA>
#> 14 FALSE FALSE 0 0 <NA> <NA>
#> 15 FALSE FALSE 0 0 <NA> <NA>
#> 16 FALSE FALSE 0 0 <NA> <NA>
#> 17 FALSE FALSE 0 0 <NA> <NA>
#> 18 FALSE FALSE 0 0 <NA> <NA>
#> 19 FALSE FALSE 0 0 <NA> <NA>
#> 20 FALSE FALSE 0 0 <NA> <NA>
#> 21 FALSE FALSE 0 0 <NA> <NA>
#> A.linfit x.mu.start.linfit x.mu.end.linfit r2mu.linfit reliable_fit.linfit
#> 1 <NA> <NA> <NA> <NA> FALSE
#> 2 <NA> <NA> <NA> <NA> FALSE
#> 3 <NA> <NA> <NA> <NA> FALSE
#> 4 <NA> <NA> <NA> <NA> FALSE
#> 5 <NA> <NA> <NA> <NA> FALSE
#> 6 <NA> <NA> <NA> <NA> FALSE
#> 7 <NA> <NA> <NA> <NA> FALSE
#> 8 <NA> <NA> <NA> <NA> FALSE
#> 9 <NA> <NA> <NA> <NA> FALSE
#> 10 <NA> <NA> <NA> <NA> FALSE
#> 11 <NA> <NA> <NA> <NA> FALSE
#> 12 <NA> <NA> <NA> <NA> FALSE
#> 13 <NA> <NA> <NA> <NA> FALSE
#> 14 <NA> <NA> <NA> <NA> FALSE
#> 15 <NA> <NA> <NA> <NA> FALSE
#> 16 <NA> <NA> <NA> <NA> FALSE
#> 17 <NA> <NA> <NA> <NA> FALSE
#> 18 <NA> <NA> <NA> <NA> FALSE
#> 19 <NA> <NA> <NA> <NA> FALSE
#> 20 <NA> <NA> <NA> <NA> FALSE
#> 21 <NA> <NA> <NA> <NA> FALSE
#> max_slope2.linfit x.mu2.start.linfit x.mu2.end.linfit r2mu2.linfit
#> 1 <NA> <NA> <NA> <NA>
#> 2 <NA> <NA> <NA> <NA>
#> 3 <NA> <NA> <NA> <NA>
#> 4 <NA> <NA> <NA> <NA>
#> 5 <NA> <NA> <NA> <NA>
#> 6 <NA> <NA> <NA> <NA>
#> 7 <NA> <NA> <NA> <NA>
#> 8 <NA> <NA> <NA> <NA>
#> 9 <NA> <NA> <NA> <NA>
#> 10 <NA> <NA> <NA> <NA>
#> 11 <NA> <NA> <NA> <NA>
#> 12 <NA> <NA> <NA> <NA>
#> 13 <NA> <NA> <NA> <NA>
#> 14 <NA> <NA> <NA> <NA>
#> 15 <NA> <NA> <NA> <NA>
#> 16 <NA> <NA> <NA> <NA>
#> 17 <NA> <NA> <NA> <NA>
#> 18 <NA> <NA> <NA> <NA>
#> 19 <NA> <NA> <NA> <NA>
#> 20 <NA> <NA> <NA> <NA>
#> 21 <NA> <NA> <NA> <NA>
#> reliable_fit2.linfit max_slope.spline x.max.spline lambda.spline
#> 1 FALSE 92.2668917228958 20.5 15.5467166096303
#> 2 FALSE 30.7727385498335 20 31.2872267087632
#> 3 FALSE 64.1757831646139 16 20.8131240327297
#> 4 FALSE 242.557704041646 23.5 14.9826287460236
#> 5 FALSE 64.6529094536623 19 21.6712998092259
#> 6 FALSE 205.57971913027 18 12.5662904914234
#> 7 FALSE 509.394721871896 21.5 6.95952698278297
#> 8 FALSE 204.031623957343 17.5 13.4360564669418
#> 9 FALSE 290.961299939386 13 4.67379381987587
#> 10 FALSE 670.985334314907 6 0.373248436531114
#> 11 FALSE 327.194544214622 17 9.86802427129628
#> 12 FALSE 335.243584785665 17.5 3.65080407904781
#> 13 FALSE 728.625260083635 6.5 0.55381657857781
#> 14 FALSE 346.26811325449 16.5 9.75821807365777
#> 15 FALSE 320.246598452125 17.5 3.21350390586794
#> 16 FALSE 774.053986420781 5.5 0.246732777852532
#> 17 FALSE 337.909403917518 16.5 8.08916482172027
#> 18 FALSE 351.643501664605 18 4.8448445225091
#> 19 FALSE 779.134078966908 6 0.462268482214881
#> 20 FALSE 353.185039298378 16.5 9.57178508598632
#> 21 FALSE 338.826806405153 18 5.01597033523575
#> max_slope2.spline x.max2.spline lambda2.spline y0.spline
#> 1 <NA> <NA> <NA> 1291.4242870252
#> 2 <NA> <NA> <NA> 1188.27831547782
#> 3 <NA> <NA> <NA> 1565.59217809736
#> 4 <NA> <NA> <NA> 1519.80363776351
#> 5 <NA> <NA> <NA> 1255.7213080438
#> 6 <NA> <NA> <NA> 1624.15289883901
#> 7 <NA> <NA> <NA> 1132.18524639308
#> 8 <NA> <NA> <NA> 1405.71652864703
#> 9 <NA> <NA> <NA> 1468.52438340082
#> 10 <NA> <NA> <NA> 1209.47395589044
#> 11 <NA> <NA> <NA> 1187.83879461913
#> 12 <NA> <NA> <NA> 1467.93981010311
#> 13 <NA> <NA> <NA> 891.795404947046
#> 14 <NA> <NA> <NA> 1282.77700477438
#> 15 <NA> <NA> <NA> 1542.64869773804
#> 16 <NA> <NA> <NA> 1132.44043950228
#> 17 <NA> <NA> <NA> 862.662992687728
#> 18 <NA> <NA> <NA> 1602.42470098365
#> 19 <NA> <NA> <NA> 1017.04362101536
#> 20 <NA> <NA> <NA> 1323.6959493112
#> 21 <NA> <NA> <NA> 1707.52183129309
#> A.spline dY.spline integral.spline reliable_fit.spline
#> 1 3427.12552423136 2135.70123720616 82881.4064741573 TRUE
#> 2 1470.99207749984 282.713762022016 43222.9360971387 TRUE
#> 3 2196.18856426073 630.596386163375 67033.6678589487 TRUE
#> 4 7592.8006375136 6072.99699975009 151370.675832013 TRUE
#> 5 2384.30375521353 1128.58244716973 58249.0814015739 TRUE
#> 6 4820.28715109277 3196.13425225376 132414.081549266 TRUE
#> 7 17121.2144379567 15989.0291915636 367233.851934484 TRUE
#> 8 5206.54317686809 3800.82664822106 120525.231431367 TRUE
#> 9 7768.1886699261 6299.66428652528 223919.428584981 TRUE
#> 10 20079.009500852 18869.5355449615 490254.828661571 TRUE
#> 11 6840.37784263307 5652.53904801394 169914.301957325 TRUE
#> 12 9191.86346478597 7723.92365468286 269744.222628615 TRUE
#> 13 20481.0977680944 19589.3023631473 497122.375105376 TRUE
#> 14 7000.84532046274 5718.06831568836 179100.135589319 TRUE
#> 15 9006.21056404742 7463.56186630938 267724.576457374 TRUE
#> 16 20704.0909872883 19571.650547786 520199.730690859 TRUE
#> 17 6952.68659445913 6090.0236017714 178120.140852738 TRUE
#> 18 9322.62835009371 7720.20364911006 273698.194402021 TRUE
#> 19 19774.7021395644 18757.658518549 508722.732093214 TRUE
#> 20 7189.59680355257 5865.90085424137 182547.707805717 TRUE
#> 21 9258.53106887535 7551.00923758226 271383.083788706 TRUE
#> reliable_fit2.spline smooth.spline max_slope.bt lambda.bt A.bt dY.bt
#> 1 FALSE 0.75 NA NA NA NA
#> 2 FALSE 0.75 NA NA NA NA
#> 3 FALSE 0.75 NA NA NA NA
#> 4 FALSE 0.75 NA NA NA NA
#> 5 FALSE 0.75 NA NA NA NA
#> 6 FALSE 0.75 NA NA NA NA
#> 7 FALSE 0.75 NA NA NA NA
#> 8 FALSE 0.75 NA NA NA NA
#> 9 FALSE 0.75 NA NA NA NA
#> 10 FALSE 0.75 NA NA NA NA
#> 11 FALSE 0.75 NA NA NA NA
#> 12 FALSE 0.75 NA NA NA NA
#> 13 FALSE 0.75 NA NA NA NA
#> 14 FALSE 0.75 NA NA NA NA
#> 15 FALSE 0.75 NA NA NA NA
#> 16 FALSE 0.75 NA NA NA NA
#> 17 FALSE 0.75 NA NA NA NA
#> 18 FALSE 0.75 NA NA NA NA
#> 19 FALSE 0.75 NA NA NA NA
#> 20 FALSE 0.75 NA NA NA NA
#> 21 FALSE 0.75 NA NA NA NA
#> integral.bt stdmax_slope.bt stdlambda.bt stdA.bt stddY.bt stdintegral.bt
#> 1 NA NA NA NA NA NA
#> 2 NA NA NA NA NA NA
#> 3 NA NA NA NA NA NA
#> 4 NA NA NA NA NA NA
#> 5 NA NA NA NA NA NA
#> 6 NA NA NA NA NA NA
#> 7 NA NA NA NA NA NA
#> 8 NA NA NA NA NA NA
#> 9 NA NA NA NA NA NA
#> 10 NA NA NA NA NA NA
#> 11 NA NA NA NA NA NA
#> 12 NA NA NA NA NA NA
#> 13 NA NA NA NA NA NA
#> 14 NA NA NA NA NA NA
#> 15 NA NA NA NA NA NA
#> 16 NA NA NA NA NA NA
#> 17 NA NA NA NA NA NA
#> 18 NA NA NA NA NA NA
#> 19 NA NA NA NA NA NA
#> 20 NA NA NA NA NA NA
#> 21 NA NA NA NA NA NA
#> reliable_fit.bt ci90.mu.bt.lo ci90.mu.bt.up ci90.lambda.bt.lo
#> 1 NA NA NA NA
#> 2 NA NA NA NA
#> 3 NA NA NA NA
#> 4 NA NA NA NA
#> 5 NA NA NA NA
#> 6 NA NA NA NA
#> 7 NA NA NA NA
#> 8 NA NA NA NA
#> 9 NA NA NA NA
#> 10 NA NA NA NA
#> 11 NA NA NA NA
#> 12 NA NA NA NA
#> 13 NA NA NA NA
#> 14 NA NA NA NA
#> 15 NA NA NA NA
#> 16 NA NA NA NA
#> 17 NA NA NA NA
#> 18 NA NA NA NA
#> 19 NA NA NA NA
#> 20 NA NA NA NA
#> 21 NA NA NA NA
#> ci90.lambda.bt.up ci90.A.bt.lo ci90.A.bt.up ci90.integral.bt.lo
#> 1 NA NA NA NA
#> 2 NA NA NA NA
#> 3 NA NA NA NA
#> 4 NA NA NA NA
#> 5 NA NA NA NA
#> 6 NA NA NA NA
#> 7 NA NA NA NA
#> 8 NA NA NA NA
#> 9 NA NA NA NA
#> 10 NA NA NA NA
#> 11 NA NA NA NA
#> 12 NA NA NA NA
#> 13 NA NA NA NA
#> 14 NA NA NA NA
#> 15 NA NA NA NA
#> 16 NA NA NA NA
#> 17 NA NA NA NA
#> 18 NA NA NA NA
#> 19 NA NA NA NA
#> 20 NA NA NA NA
#> 21 NA NA NA NA
#> ci90.integral.bt.up ci95.mu.bt.lo ci95.mu.bt.up ci95.lambda.bt.lo
#> 1 NA NA NA NA
#> 2 NA NA NA NA
#> 3 NA NA NA NA
#> 4 NA NA NA NA
#> 5 NA NA NA NA
#> 6 NA NA NA NA
#> 7 NA NA NA NA
#> 8 NA NA NA NA
#> 9 NA NA NA NA
#> 10 NA NA NA NA
#> 11 NA NA NA NA
#> 12 NA NA NA NA
#> 13 NA NA NA NA
#> 14 NA NA NA NA
#> 15 NA NA NA NA
#> 16 NA NA NA NA
#> 17 NA NA NA NA
#> 18 NA NA NA NA
#> 19 NA NA NA NA
#> 20 NA NA NA NA
#> 21 NA NA NA NA
#> ci95.lambda.bt.up ci95.A.bt.lo ci95.A.bt.up ci95.integral.bt.lo
#> 1 NA NA NA NA
#> 2 NA NA NA NA
#> 3 NA NA NA NA
#> 4 NA NA NA NA
#> 5 NA NA NA NA
#> 6 NA NA NA NA
#> 7 NA NA NA NA
#> 8 NA NA NA NA
#> 9 NA NA NA NA
#> 10 NA NA NA NA
#> 11 NA NA NA NA
#> 12 NA NA NA NA
#> 13 NA NA NA NA
#> 14 NA NA NA NA
#> 15 NA NA NA NA
#> 16 NA NA NA NA
#> 17 NA NA NA NA
#> 18 NA NA NA NA
#> 19 NA NA NA NA
#> 20 NA NA NA NA
#> 21 NA NA NA NA
#> ci95.integral.bt.up
#> 1 NA
#> 2 NA
#> 3 NA
#> 4 NA
#> 5 NA
#> 6 NA
#> 7 NA
#> 8 NA
#> 9 NA
#> 10 NA
#> 11 NA
#> 12 NA
#> 13 NA
#> 14 NA
#> 15 NA
#> 16 NA
#> 17 NA
#> 18 NA
#> 19 NA
#> 20 NA
#> 21 NA