View source: R/dose-response-analysis.R
fl.drFitModel | R Documentation |
fl.drFitModel
fits the biosensor model proposed by Meyer et al. (2019) to the provided response (e.g., max_slope.spline
vs. concentration data to determine the leakiness, sensitivity, induction fold-change, and cooperativity.
fl.drFitModel(conc, test, drID = "undefined", control = fl.control())
conc |
Vector of concentration values. |
test |
Vector of response parameter values of the same length as |
drID |
(Character) The name of the analyzed condition |
control |
A |
A drFitFLModel
object.
raw.conc |
Raw data provided to the function as |
raw.test |
Raw data for the response parameter provided to the function as |
drID |
(Character) Identifies the tested condition |
fit.conc |
Fitted concentration values. |
fit.test |
Fitted response values. |
model |
|
parameters |
List of parameters estimated from dose response curve fit. |
yEC50
: Response value related to EC50.
y.min
: Minimum fluorescence ('leakiness', if lowest concentration is 0).
y.max
: Maximum fluorescence.
fc
: Fold change (y.max
divided by y.min
).
K
: Concentration at half-maximal response ('sensitivity').
n
: Cooperativity.
yEC50.orig
: Response value for EC50 in original scale, if a transformation was applied.
K.orig
: K in original scale, if a transformation was applied.
test.nm
: Test identifier extracted from test
.
fitFlag |
(Logical) Indicates whether a spline could fitted successfully to data. |
reliable |
(Logical) Indicates whether the performed fit is reliable (to be set manually). |
control |
Object of class |
Use plot.drFitModel
to visualize the model fit.
Meyer, A.J., Segall-Shapiro, T.H., Glassey, E. et al. Escherichia coli “Marionette” strains with 12 highly optimized small-molecule sensors. Nat Chem Biol 15, 196–204 (2019). DOI: 10.1038/s41589-018-0168-3
# Create concentration values via a serial dilution
conc <- c(0, rev(unlist(lapply(1:18, function(x) 10*(2/3)^x))),10)
# Simulate response values via biosensor equation
response <- biosensor.eq(conc, y.min = 110, y.max = 6000, K = 0.5, n = 2) +
0.01*6000*rnorm(10)
# Perform fit
TestRun <- fl.drFitModel(conc, response, drID = 'test', control = fl.control())
print(summary(TestRun))
plot(TestRun)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.