estimate_conj_rate: Estimate plasmid conjugation rates

Description Usage Arguments Value See Also Examples

View source: R/estimate_conj_rate.R

Description

estimate_conj_rate returns the conjugation rate estimates from data.

Usage

1
2
3
4
5
6
estimate_conj_rate(
  data,
  method = c("SM", "ASM"),
  id_cols = c("ID"),
  verbose = T
)

Arguments

data

Dataframe. Required columns vary depending on the method used to estimate the conjugation rates. The following columns are typically required: D.t, R.t, T.t are final population sizes; D.0, R.0 are initial pop sizes; psi.D, psi.R, psi.T are growth rates; t is the time of measurement (assumes start at 0). Optional columns: T.0, psi.max (for the Simonsen method).

method

String or list of strings. Describes method(s) used to estimate the conjugation rate. Takes the following values:

  • SM (Simonsen Method): The population growth rate can be supplied with psi.N or psi.max; otherwise the method will choose the maximum among psi.D, psi.R, psi.T;

  • ASM (Approximate Simonsen Method): ;

  • TD: T/D;

  • T_DR: T/DR;

  • T_RT: T/(R+T): The fraction of plasmid-carrying recipients;

  • Dionisio: T/√{DR};

  • Gama: log10(T/√{DR}).

id_cols

List of strings. Column names in the data that should be treated as identifiers (will be returned in output).

verbose

Boolean. Should the method return warnings?

Value

Dataframe with the conjugation rate estimates. Contains 3 columns: sample IDs, estimates, methods.

See Also

estimate_crit_time for estimation of the critical time.

Examples

1
2
estimate_conj_rate(DRT_example)
estimate_conj_rate(DRT_example, method = c('SM', 'T_DR', 'Dionisio'))

JSHuisman/conjugator documentation built on Dec. 18, 2021, 12:27 a.m.