Cecum Lymph Node Dendritic Cells Harbor Slow-Growing Bacteria Phenotypically Tolerant to Antibiotic Treatment

Salmonella bacteria can tolerate antibiotics by adopting a slow-growing “persister” state that hides in host dendritic cells and can re-initiate infection after treatment ends. This can be avoided by supplementing antibiotic treatment with stimulants of innate immunity.

This material is provided mostly for the sake of transparency. The functions were developed for the specific research questions and datasets presented in Kaiser et al PLoS Biol (2014) and Kaiser et al, PLoS Path (2013). They may not work beyond this restricted field of application.
We tried to document the functions as well as we could. However, documentation is only rudimentary, and will remain so because the package will not be updated.
Some of the experimental data presented and analyzed in Kaiser et al, PLoS Biol (2014) are included in this package (see kaiser14pb.data).
For a summary of the probability generating functions and likelihoods see pgf.kaiser14pb and likelihoods.kaiser14pb, respectively.
The convenience routines described in fit.functions.kaiser14pb allow you to maximize the likelihoods. The parameter estimates we obtained by fitting the models are stored in the dataset kaiser14pb.MLEs contained in this package.
See bdi.sim and sim.treat for documentation of the simulation functions. These functions rely on ssa in the package GillespieSSA.

Author(s)
Roland R Regoes <roland.regoes@env.ethz.ch> The package is not maintained. It is provided as supplementary online material to the paper Kaiser et al PLoS Biol (2014

output.data
Logical indicating if the entire simulation is returned.

Details
The function requires the package GillespieSSA.
The function does not simulate properly for c > and mu > . If the simulation reaches a population size of 0, it always terminates. It never restarts, although it sometimes should if mu > .
This function is used in sim.treat.

fit.functions.kaiser14pb
Value If output.data is set to FALSE a positive integer is returned with the population size at around time.final.
Otherwise bdi.sim returns a list with two elements: final a positive integer is returned with the population size at around time.final data A dataframe with two columns, one for time t and the second for population size M.
pgf Function encoding a probability generating function of the form pgf.kaiser14pb.
Only used in fit.function.muG and fit.function.pbs.
cfix Non-negative scalar. This passes a fixed value for c to fit.function.cfix. For the default cfix = , fit.function.cfix is equivalent to fit.function.c .

output.sd
Logical indicating if standard deviations of parameter estimates should be returned.

Details
These are convenience functions, wrapping around optim.
fit.function.c fits assuming an initially empty lymph node and c= .
fit.function.cfix fits assuming an initially empty lymph node and c=cfix.
fit.function.muG fits assuming an initial distribution of bacterial populations size in the lymph node specified by pgf and muG= .
fit.function.pbs fits assuming an initial distribution of bacterial populations size in the lymph node specified by pgf and c= .

Value
A list with components: pars Vector with the maximum likelihood estimates.
sd Vector with the standard deviations of the maximum likelihood estimates.
ll Scalar with the value of the log likelihood at its maximum.

kaiser14pb.data
Author ( Description WITS data presented and analyzed in Kaiser et al, PLoS Biol (2014).

Format
A data frame with 231 observations on the following 8 variables.
day a numeric vector with the day after inoculation, at which the mouse was sacrificed and bacterial counts measured mouse.type a factor with levels wt, wt+Cipro, and wt+PBS, indicating the genotype and treatment the mouse received.
mouse a factor with many levels; this is a meaningless mouse ID salmonella.strain a factor with only one level SB3 ; this is the Salmonella Typhimuroim strain we used total a numeric vector; gives the total number of bacteria in the lymph node (measures as CFU)

WITS.dilution a numeric vector with the fractions of each WITS in the inoculum
WITS a factor with levels 1 11 13 17 19 2 21; this is a "WITS ID" (which is unfortunately an integer); there are seven such IDs dataline A data.frame with a single row. The structure has to be similar to data, and by extension to kaiser14pb.data.
prob.gen.fct A function with the probability generation function describing the stochastic process. Can be any function described in pgf.kaiser14pb.
N Large integer, best a power of 2. This number is used internally by ll.salmonella.mdl.fourier and determines the accuracy of the likelihood value computed.
Details ll.salmonella.mdl.roger calculates the likelihood using an analytical expression for the state probabilities. This expression was obtained with the help of Roger Kouyos (which explains the name of the function).
ll.salmonella.mdl.fourier uses the Fast Fourier Transform fft to numerically compute the state probabilities from the probability function. That is why it needs prob.gen.fct as an input.

Value
List with two elements: ll Scalar containing the log-likelihood value gr A vector of length 3 gradient of the log-likelihood with respect to the three model parameters r, c, muG. This is only calculated by ll.salmonella.mdl.roger. ll.salmonella.mdl.fourier returns c(NA,NA,NA).

Author(s)
Roland Regoes <roland.regoes@env.ethz.ch> The package is not maintained. It is provided as supplementary online material to the paper Kaiser et al PLoS Biol (2014).
Arguments parms Named vector containing the parameters at which the pgf should be evaluated. The elements should have names "r", "c", and "muG" t Scalar, indicating the time in days.
s Scalar between 0 and 1. Dummy variable of the probability generating function.

Details
Some of these functions are used to calculate the likelihoods (see likelihoods.kaiser14pb).
pgf.salmonella is the probability generating function for a process starting with an empty lymph node.
pgf.treat.d3 is the probability generating function for a process starting with some bacteria in the lymph node. The distribution of the number of bacteria is given by pgf.salmonella evaluated at the maximum likelihood estimates for the parameters r, and muG obtained during the first day.
The function is only valid assuming muG=0 during treatment.
pgf.treat.d5 and pgf.treat.d1 give the probability generating functions at later days. They rely on the pgf from the previous periods, i.e. pgf.treat.d3 and pgf.treat.d5, respectively. These functions are also only valid assuming muG=0 during treatment.
pgf.pbs encodes the probability generating function for a process starting with some bacteria in the lymph node, and does not require muG=0.

Value
Scalar value of the probability generating function (which is always between 0 and 1).

Author(s)
Roland Regoes <roland.regoes@env.ethz.ch> The package is not maintained. It is provided as supplementary online material to the paper Kaiser et al PLoS Biol (2014).

Description
Function simulating the colonization dynamics of Salmonella typhimurium in the cecal lymph node under treatment used in Kaiser et al, PLoS Biol (2014). It can be used to produce Figure 4B of the paper.

parms.d1
Named vector of the form c(r=3, c= , mu=3 ) containing the parameters characterizing the colonization of the cecal lymph node during the first day after inoculation. Defaults to the maximum likelihood estimates stored in kaiser14pb.data.

parms.d3
Named vector of the form c(r=3, c= , mu=3 ) containing the parameters characterizing the colonization of the cecal lymph node between day 1 and 3 of infection. Defaults to the maximum likelihood estimates stored in kaiser14pb.data.

parms.d5
Named vector of the form c(r=3, c= , mu=3 ) containing the parameters characterizing the colonization of the cecal lymph node between day 3 and 5 of infection. Defaults to the maximum likelihood estimates stored in kaiser14pb.data.

parms.d1
Named vector of the form c(r=3, c= , mu=3 ) containing the parameters characterizing the colonization of the cecal lymph node between day 5 and 10 of infection. Defaults to the maximum likelihood estimates stored in kaiser14pb.data.
output.data Logical indicating if the the population size throughout the simulation time should be returned. If set to FALSE only the population sizes at day 1, 3, 5, and 10 are returned.

Details
This convenience function simply concatenates simulations run piecewise using bdi.sim with the maximum likelihood estimates for r, c, and mu. It simulates the first ten days of infection. With default parameters it simulates the colonization of the lymph node in mice that are treated 1 day after infection.

Value
If output.data is set to TRUE a dataframe is returned with two columns, one for time t and the second for population size M.
If output.data is set to FALSE a named integer vector is returned that contains the population sizes at day 1, 3, 5, and 10.

Author(s)
Roland R Regoes <roland.regoes@env.ethz.ch> The package is not maintained. It is provided as supplementary online material to the paper Kaiser et al PLoS Biol (2014).