get_TTDs: Estimation of the Time to Detection of OD measurements

View source: R/twofold_dilution.R

get_TTDsR Documentation

Estimation of the Time to Detection of OD measurements

Description

The function uses linear interpolation to identify the time at which different wells reached a target optical density

Usage

get_TTDs(OD_data, target_OD, codified = FALSE)

Arguments

OD_data

a tibble (or data.frame) with the readings of the equipment. It must have a column named time with the time of the rading and as many additional columns as conditions

target_OD

target OD for the calculation of the TTD

codified

whether the columns are codified. If FALSE (default), the TTD estimated for each condition is returned as such. If TRUE, it is assumed that each column is codified as condition_number-of-dilutions. Therefore, the results are separated to simplify the application of fit_serial_dilution()

Value

A tibble with two or three columns. If codified = FALSE, the tibble has two columns: condition (the name of the well according to OD_data) and TTD (the estimated time to detection). If the target_OD was not reached for some well, it assigns NA. If codified = TRUE, the code returns an additional column with the number of dilutions

Examples

data("example_od")  # example dataset included int he package

get_TTDs(example_od, target_OD = 0.2)  # default behaviour, returns two columns
get_TTDs(example_od, target_OD = 0.2, codified = TRUE)  # extracts also the number of dilutions



albgarre/biogrowth documentation built on April 12, 2025, 9:46 a.m.