calculates growth rate and generation time by computing the log-phase start and end time.
calculate_growth_rate( dat_growth_curve, average_replicates = FALSE, first_timepoint = 0, select_replicates = NULL, end_timepoint = NULL )
dat_growth_curve | a tibble, with first column as `Time` and after that columns as samples. Samples should be named as `sampleName_replicate`, for example `CgFlu_R1` , `CgFlu_R2`, `CgFlu_R3`. If data does not contain replicates then sample name should be `CgFlu_R1`, `Cg_R1`, `YPD_R1` The function assumes that data contains OD values in increasing order. |
---|---|
average_replicates | logical, to calculate growth rates as average of replicates, Default: FALSE |
first_timepoint | numeric, first time-point from where to calculate the lag-phase;, Default: 0 |
select_replicates | a vector, define replicates to be selected to plot, it should be anything after `_`. for eg. if only replicate R1 and R2 need to be plotted from samples CgFlu_R1, CgFlu_R2; the vector should be `c("R1", "R2")`, Default: NULL |
end_timepoint | numeric, end time-point to be considered. Specifically useful for appropriate growth curve calculation when the stationary phase OD is very fluctuating. Default:NULL (end-timepoint from data) |
a tibble, containing growth rate (generation/hour) and generation time or doubling time (minutes/generation)
Start and End-point are computed as; Start time-point: is time at which OD is appx double of the first-time point and end time-point: is time from which stationary phase is beginning.
if (FALSE) { if(interactive()){ calculate_growth_rate(dat_growth_curve=yeast_growth_data, average_replicates = TRUE, select_replicates = c("R1", "R2", "R4")) } }