Title: | Individual Growth Curve Parameter Calculation using Polynomial Functions |
Version: | 1.0.0 |
Depends: | R (≥ 3.5.0) |
Description: | Calculation of key bacterial growth curve parameters using fourth degree polynomial functions. Six growth curve parameters are provided including peak growth rate, doubling time, lag time, maximum growth, and etc. 'ipolygrowth' takes time series data from individual biological samples (with technical replicates) or multiple samples. |
License: | GPL (≥ 3) |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
Imports: | dplyr, magrittr, rlang, tidyr, tidyselect |
Suggests: | knitr, rmarkdown, testthat (≥ 3.0.0), growthrates, kableExtra, ggplot2 |
Config/testthat/edition: | 3 |
URL: | https://github.com/kivanvan/ipolygrowth |
BugReports: | https://github.com/kivanvan/ipolygrowth/issues |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2024-08-29 01:54:45 UTC; wjifa |
Author: | Jifan Wang |
Maintainer: | Jifan Wang <wjifan@hotmail.com> |
Repository: | CRAN |
Date/Publication: | 2024-08-29 10:00:02 UTC |
ipolygrowth: Individual Growth Curve Parameter Calculation using Polynomial Functions
Description
Calculation of key bacterial growth curve parameters using fourth degree polynomial functions. Six growth curve parameters are provided including peak growth rate, doubling time, lag time, maximum growth, and etc. 'ipolygrowth' takes time series data from individual biological samples (with technical replicates) or multiple samples.
Details
This package calculates growth curve parameters using fourth degree polynomial functions. The package was developed for bacterial growth experiments. Thus, data from microplate readers serve as the input data format for R functions in this package. Polynomial growth curves are estimated from time series data from a single biological sample or multiple samples. Technical replicates within biological samples are allowed. Output includes six calculated growth curve parameters: peak growth rate, peak growth time, doubling time at peak growth, lag time, max y, and max y time.
Author(s)
Maintainer: Jifan Wang wjifan@hotmail.com (ORCID) [copyright holder]
Authors:
Kathryn Barger kathrynjbarger@gmail.com [copyright holder]
See Also
Useful links:
Report bugs at https://github.com/kivanvan/ipolygrowth/issues
Pipe operator
Description
See magrittr::%>%
for details.
Usage
lhs %>% rhs
Arguments
lhs |
A value or the magrittr placeholder. |
rhs |
A function call using the magrittr semantics. |
Value
The result of calling rhs(lhs)
.
Growth parameter estimates for multiple samples
Description
This function estimates growth parameters for multiple (biological) samples. Technical replicates (multiple time series) are allowed.
Usage
ipg_multisample(data, id, time.name, y.name, epsilon = 0.2/100)
Arguments
data |
Input data frame containing the time and dependent variable (y) of multiple biological samples. Data needs to be in long format (i.e. one row per time point per sample). Remove rows with missing in the dependent variable (y). |
id |
Unique identifier to indicate each biological sample. |
time.name |
Name of the time variable. The variable needs to be numeric. |
y.name |
Name of the dependent variable (y). The variable needs to be numeric. |
epsilon |
Convergence threshold for max y time calculation. The input represents the fraction of the range of the observed dependent variable (y). It needs to be between 0 and 1, and a small value is recommended. The input can be either a single value or a vector of different values (in the same length and order as id) for multiple samples. Default is 0.2% for all samples. |
Details
The function uses the same approach to estimate growth parameters as in ipg_singlesample()
.
Value
A list that contains a table of estimates, polynomial models, a table of beta coefficients, and a table of fitted values, all by sample ID. Growth parameters include peak growth rate, peak growth time, doubling time (at the peak growth), lag time, max y, and max y time.
Examples
library(dplyr)
data <- growthrates::bactgrowth
data <- data %>% mutate(id = paste(strain, conc, sep = "-"))
out.multisample <- ipg_multisample(data, "id", "time", "value", 0.2/100)
Growth parameter estimates for single sample
Description
This function estimates growth parameters for a single (biological) sample. Technical replicates (multiple time series) are allowed.
Usage
ipg_singlesample(data, time.name, y.name, epsilon = 0.2/100)
Arguments
data |
Input data frame containing the time and dependent variable (y) from a single biological sample. Data needs to be in long format (i.e. one row per time point). Remove rows with missing in the dependent variable (y). |
time.name |
Name of the time variable. The variable needs to be numeric. |
y.name |
Name of the dependent variable (y). The variable needs to be numeric. |
epsilon |
Convergence threshold for max y time calculation. The input represents the fraction of the range of the observed dependent variable (y). The input needs to be between 0 and 1, and a small value is recommended. Default is 0.2%. |
Details
This function calculates growth curve parameters for a single sample. A 4th degree polynomial is fit to the input data using ordinary least squares estimation. Peak growth time is identified using the second derivative of the estimated polynomial function. Peak growth rate is calculated using the first derivative at peak growth time. Doubling time at peak growth is calculated using the equation: ln(2)/peak growth rate . Lag time is determined using linear interpolation of the peak growth rate to identify the start of the exponential growth phase. Max y time is identified by convergence of the dependent variable where the growth curve reaches an asymptote, with convergence threshold epsilon. Max y is the value of the fitted polynomial function at max y time.
Value
A list that contains a table of estimates, the polynomial model, a table of beta coefficients, and a table of fitted values. Growth parameters include peak growth rate, peak growth time, doubling time (at the peak growth), lag time, max y, and max y time.
Examples
library(dplyr)
data <- growthrates::bactgrowth
df.singlesample <- data %>% dplyr::filter(strain == "D", conc == 0)
out.singlesample <- ipg_singlesample(data = df.singlesample, time.name = "time", y.name = "value")