^{1}

^{2}

^{1}

^{2}

^{1}

^{2}

^{*}

The authors have declared that no competing interests exist.

Conceived and designed the experiments: GKG ABO LB. Performed the experiments: GKG. Analyzed the data: GKG LB. Wrote the paper: GKG LB.

The human gut microbiota comprise a complex and dynamic ecosystem that profoundly affects host development and physiology. Standard approaches for analyzing time-series data of the microbiota involve computation of measures of ecological community diversity at each time-point, or measures of dissimilarity between pairs of time-points. Although these approaches, which treat data as static snapshots of microbial communities, can identify shifts in overall community structure, they fail to capture the dynamic properties of individual members of the microbiota and their contributions to the underlying time-varying behavior of host ecosystems. To address the limitations of current methods, we present a computational framework that uses continuous-time dynamical models coupled with Bayesian dimensionality adaptation methods to identify time-dependent signatures of individual microbial taxa within a host as well as across multiple hosts. We apply our framework to a publicly available dataset of 16S rRNA gene sequences from stool samples collected over ten months from multiple human subjects, each of whom received repeated courses of oral antibiotics. Using new diversity measures enabled by our framework, we discover groups of both phylogenetically close and distant bacterial taxa that exhibit consensus responses to antibiotic exposure across multiple human subjects. These consensus responses reveal a timeline for equilibration of sub-communities of micro-organisms with distinct physiologies, yielding insights into the successive changes that occur in microbial populations in the human gut after antibiotic treatments. Additionally, our framework leverages microbial signatures shared among human subjects to automatically design optimal experiments to interrogate dynamic properties of the microbiota in new studies. Overall, our approach provides a powerful, general-purpose framework for understanding the dynamic behaviors of complex microbial ecosystems, which we believe will prove instrumental for future studies in this field.

Microbes colonize the human body soon after birth and propagate to form rich ecosystems. These ecosystems play essential roles in health and disease. Recent advances in DNA sequencing technologies make possible comprehensive studies of the time-dependent behavior of microbes throughout the body. Sophisticated computer-based methods are essential for the analysis and interpretation of these complex datasets. We present a computational method that models how human microbial ecosystems respond over time to perturbations, such as when subjects in a study are treated with a drug. When applied to a large publicly available dataset, our method yields new insights into the diversity of dynamic responses to antibiotics among microbes in the human body. We find that within an individual, sub-populations of microbes that share certain physiological roles also share coordinated responses. Moreover, we find that these responses are similar across different people. We use this information to improve the experimental design of the previously conducted study, and to develop strategies for optimal design of future studies. Our work provides an integrated computer-based method for automatically discovering patterns of change over time in the microbiota, and for designing future experiments to identify changes that impact human health and disease.

The human gut harbors a dense and complex microbial ecosystem. Our ability to extensively characterize the microbiota has greatly increased in the last several years, due to lower costs and technical improvements in both DNA sequencing

Longitudinal studies of the microbiota are particularly important for further advancing the field

To date, longitudinal studies of the microbiota have largely employed static analysis techniques that do not adequately capture the dynamic nature of the data. The most common types of analyses employed involve either computation of diversity measures, such as the Shannon-Weaver diversity index

We developed a probabilistic model and inference algorithm, called Microbial Counts Trajectories Infinite Mixture Model Engine (MC-TIMME), which provides a unified framework for analyzing the dynamic behavior of the microbiota captured via high-throughput sequencing data. Our framework models time-varying counts of microbial taxausing exponential

MC-TIMME enables several new types of analysis. The first type, termed Signature Diversity (SD) analysis, measures the variety of time-dependent microbial responses to perturbations to the host ecosystem(s). SD utilizes time-varying information, and is thus distinct from traditional static measures of ecological diversity

MC-TIMME has some similarities to previously published methods for analyzing other types of high-throughput data. Several studies have employed continuous-time models

To gain new understanding of dynamic changes in the human gut microbiota caused by antibiotic exposure, we applied MC-TIMME to data from a longitudinal study by Dethlefsen

The remainder of the manuscript is organized as follows. First, we provide additional background on the Dethlefsen

Dethlefsen

MC-TIMME uses a Bayesian nonparametric hierarchical generative probability model as depicted in

Observed data of time-series of sequencing counts for reference operational taxonomic units (refOTUs) are assumed to arise from a multi-level generative probabilistic mixture model.(_{i} and associated shaded bars represent prior probabilities for choosing among prototype signatures. (

MC-TIMME adaptively learns three levels of Signature Diversity (SD) as depicted in

The panels depict examples of simplified microbial ecosystems measured over time, to illustrate three levels of Signature Diversity (SD) scores computed by the Microbial Counts Trajectories Infinite Mixture Model Engine (MC-TIMME) framework. (

The MC-TIMME model is fully Bayesian, and we thus seek to infer the posterior probability distribution of the model variables given the data. However, the posterior distribution is not computable in closed form, making exact inference intractable. Instead, we approximate the posterior distribution using Markov Chain Monte Carlo (MCMC) methods, and then compute various summary statistics. Below, we provide further information on the MC-TIMME model and associated algorithms; see Protocol S1 for complete details.

Sample data, instructions, and GPLv3 licensed Matlab™ (MathWorks, Natick, MA) source code for MC-TIMME are available at

Prior longitudinal studies have qualitatively described several key dynamic properties of the gut microbiota

To model these phenomena for the Dethlefsen

Observed sequencing counts _{sot}_{sot}

Let each prototype signature _{k}_{sot}

The variable _{so}_{st}

For intervals (a), (b) and (d), we assume f(_{k}_{a}_{ka}_{b}_{kb}_{d}_{kd}

This process has initial value _{kb}_{kc}_{kc}

For interval (e), the period after the second antibiotic treatment, we also assume an exponential relaxation process:

For the NBD inverse shape parameter, we assume it is equal to the same value, ε_{1}, on intervals (a), (c) and (e), and equal to a different value, ε_{2}, on the antibiotic treatment intervals (b) and (d).

To capture behavior of the microbiota that spans multiple temporal intervals, we model dependencies between interval parameters using random walks. For instance, the equilibrium level on interval (c), _{kc}

Here, _{ka}_{ka→c}

To adapt the complexity of the dynamical models for prototype signatures, we introduce dimensionality changing variables, _{kμ}_{kλ}

We approximate the posterior distribution of the MC-TIMME model using Markov Chain Monte Carlo (MCMC) methods. The DirichletProcess aspects of the model are handled with Gibbs sampling steps

We define the Signature Diversity type 1 equilibrium level score, SD1_{μ}, as the expected fraction of refOTUs with greater than one equilibrium level. We similarly define the SD1 relaxation time score, SD1_{λ}, as the expected fraction of refOTUs with greater than one relaxation time constant. The SD1 scores are given by:

Here, I(•) denotes the indicator function, _{sk}^{(j)}_{s}

We define the Signature Diversity type 2 (SD2) score as the expected equivalent number of prototype signatures per 100 refOTUs. Because assignment of refOTUs to prototype signatures may be non-uniform, we use a measure that standardizes for this effect. The SD2 score is given by:

Here, H_{s}_{s}^{(j)}_{s}_{s}^{(j)}

We define the Signature Diversity type 3 (SD3) score as a ratio of SD2 scores: SD2^{D}, which is an SD2 score computed on a hypothetical combined ecosystem, and SD2^{I}, which is the weighted average of independent SD2 scores computed on each ecosystem separately. These scores are given by:

Here, H(^{(j)}

To characterize Relaxation TimeDistributions, we estimated probability density functions for relaxation time constants of all refOTUs, using the

To characterize Consensus Signature Groups (CSGs), we used an agglomerative clustering method as described in

Here, ^{(j)}_{so,s′o′}

To test for enrichment of Consensus Signature Groups for particular taxonomic labels, we used the following procedure. For each CSG, we computed

Our approach is based on a Bayesian information theoretic formulation of the experimental design problem (see e.g.,

Here, H{

The objective of our automated experimental design algorithm is then to choose the sampling times

This is a high dimensional integral that is in general intractable. However, for a linear model with Gaussian noise, the integral can be written as

Here, IM denotes the Fisher information matrix, and |•| the determinant of the matrix. The integral can be approximated with a function g(^{(j)} from the priorp(Θ), yielding:

In the case of a Generalized Linear Model, a linear approximation can be calculated to yield a local Bayesian

We estimate samples from p(Θ), the prior probability distribution over model parameters for future experiments, using a model learned from previously observed data. Specifically, we use 500 MCMC samples obtained from the posterior distribution of the MC-TIMME model conditioned on a set of observed data. We then use a greedy optimization algorithm with the Bayesian

MC-TIMME analyzed the complete Dethlefsen et al. dataset, consisting of 3 subjects with 50+ time-points each, in approximately 12 hours on an Intel Xeon E5507 2.27 GHz core.

We also ran additional analyses to evaluate the sensitivity of our results to key model assumptions or features of the data. First, we tested the robustness of the model's dimensionality adaptation capability, which is a critical component of Signature Diversity scores. These tests showed no significant differences in our results when relevant model parameters were varied. Second, we tested the robustness of our results to noise. Because an equivalent gold standard experimental dataset does not exist, we generated simulated data for use in testing. For these simulations, we used all prototype signatures estimated by MC-TIMME from the full Dethlefsen et al. dataset as our gold standard, and then generated test datasets with varying amounts of added noise. When the amount of noise equaled that in the original dataset (coefficient of variation of ≈60% for counts), MC-TIMME recovered Signature Diversity scores with <≈10% error, and relaxation time constant estimates with ≈25% error for the first post-antibiotic exposure interval, and ≈40% error for the second interval; measures of consistency of assignment of refOTUs to prototype signatures showed ≈20% reduction in quality. Third and finally, we tested the sensitivity of our results to exclusion of each experimental subject. These tests showed error rates comparable to those from our simulations when noise levels were equal to those in the original dataset. See Protocol S1 for complete details. Overall, our model performance tests demonstrate that our results are robust to changes in relevant parameter settings, noise, and exclusion of experimental subjects.

To characterize the diversity of responses of the microbiota to repeated antibiotic treatments, we calculated three types of Signature Diversity (SD) scores. As shown in

The intra-signature diversity (SD1) scores for all three subjects in the Dethlefsen _{μ}, which measures the expected fraction of refOTUs with changes in equilibrium levels between pre-treatment and at least one post-antibiotic treatment interval, and (2) SD1_{λ}, which measures the expected fraction of refOTUs with changes in relaxation time constants between the two antibiotic treatment intervals. The intra-ecosystem signature diversity (SD2) score was ≈8–20 expected equivalent signatures per 100 refOTUs (

(_{μ}), which measure the expected fraction of reference operational taxonomic units (refOTUs) that change equilibrium levels in response to one or more of the antibiotic treatments. (_{λ}), which measure the expected fraction of refOTUs that exhibit different relaxation time constants after the antibiotic treatments. (^{D}to the SD2^{I} score. The SD2^{D}score is computed on a hypothetical combined ecosystem, in which refOTUs from different subjects probabilistically share prototype signatures. The SD2^{I} score is a weighted average of SD2 scores computed on each subject separately.

These analyses indicated that subject E's gut microbiota exhibited fewer long-term shifts in abundance levels and responded overall more uniformly to the antibiotic exposures. That is, subject E had significantly lower intra-signature and intra-ecosystem Signature Diversity scores, with an SD1_{μ}score of 50% and SD2 score of 10, as compared with the other two subjects with SD1_{μ} scores >70% and SD2 scores ≈20. This differential behavior of subject E's microbiota was not discernible in the original analysis performed by Dethlefsen

The inter-ecosystem signature diversity (SD3) score for the 3 subjects was 48%(^{−6}using a permutation test with null hypothesis of independent ecosystems), indicating that there were substantial similarities in the time-dependent responses of the subjects' microbiota to the antibiotic treatments. As shown in ^{D}, which is computed on a hypothetical combined ecosystem, in which refOTUs from different subjects probabilistically share prototype signatures, and (2) SD2^{I}, which is a weighted average of independent SD2 scores computed separately on each subject. The SD3 score of 48% indicates that approximately as many prototype signatures were shared among the subjects as were unique to each subject. Thus, although subjects' microbiota did exhibit varied responses to the antibiotic treatments, as reported in the Dethlefsen

We generated Relaxation Time Distribution (RTD)plots using data from all three subjects, to investigate common trends in the rates at which the microbiota attained equilibrium levels after repeated antibiotic exposures (

Each relaxation time constant characterizes the time for a reference operational taxonomic unit (refOTU) to reach an equilibrium relative abundance level in the ecosystem after an antibiotic pulse. Probability density functions were estimated for either the first post-antibiotic exposure interval (solid blue line, “1^{st} relaxation time”) or the second post-antibiotic exposure interval (dashed red line, “2^{nd} relaxation time”). A smoothing kernel algorithm was used to estimate probability density functions, using relaxation time constants from refOTUs from all subjects (756 time constants for each post-antibiotic exposure interval).

To further our understanding of the differential responses of microbial sub-communities to antibiotic exposures, we next generated Consensus Signature Groups (CSGs), which represent groups of refOTUs that consistently covary in terms of relative abundances over time. Combining data from all subjects, MC-TIMME identified 125 CSGs. Interestingly, many of the CSGs contained refOTUs that are phylogenetically related or are common to all subjects. To assess the phylogentic relationships among refOTUs within each CSG, we calculated an enrichment

We created a time-line of the largest and best taxonomically defined Consensus Signature Groups (

Each panel (

Among Consensus Signature Groups showing decreases in relative abundance during the first antibiotic pulse, those containing refOTUs in the genus

MC-TIMME also identified another quickly equilibrating sub-community that contained refOTUs belonging to acetate _{2} and CO_{2} through the acetyl-CoA pathway

Several Consensus Signature Groups contained refOTUs belonging to the family Ruminococcaceae (

MC-TIMME also discovered a number of Consensus Signature Groups containing refOTUs from the family Lachnospiraceae (

Application of metagenomic techniques to diagnostic medicine will require human clinical trials across many subjects to ascertain time-dependent effects and responses of the microbiota relative to a defined perturbation or clinical course of disease. The complicated logistics and expense of such trials highlight the need for computational techniques to optimize sampling across subjects.

We developed an algorithm for automated experimental design, and applied it to the Dethlefsen

Each panel (

To assess the predictive accuracy of our experimental design algorithm, we evaluated its ability to find a set of experiments to best estimate a model to predict held-out data (

The two experimental design strategies (sequential and cross-subject)that use prior information improved on the uninformative dispersed strategy by an average of 13%, as measured by reduction in prediction accuracy (RMSE). Of the two informative strategies, neither consistently dominated the other. However, the cross-subject strategy did substantially outperform the sequential strategy for subject D. This subject exhibited the highest Signature Diversity equilibrium level (SD1_{μ}) score, meaning that many refOTUs in this subject changed equilibrium levels subsequent to one or both antibiotic exposures. Consequently, equilibrium levels for refOTUs in subject D were harder to predict from prior equilibrium levels. Thus, the sequential design strategy, which uses only partial time-series data as input to the design algorithm, suffered in performance. In contrast, the cross-subject strategy that uses complete data from another subject, performed particularly well for subject D, because it leveraged prototype signatures predicted from subject E or F that were substantially similar to those in subject D.

We presented MC-TIMME, a unified computational framework for inferring dynamic signatures of the microbiota from high-throughput sequencing time-series datasets, and applied our framework to discover new features of the

Our results on automated experimental design strategies have implications for how future longitudinal studies of the microbiota should be designed. An automated cross-subject design strategy generally performed comparably to or better than a sequential design strategy. A cross-subject design strategy uses all data from one subject to predict a future experimental design for a second subject. In contrast, a sequential design strategy uses limited samples from one subject to predict a future experimental design for the same subject. In the past, when the costs of experimentally interrogating samples were high, strategies using automated design were advocated in which samples would be over-collected, frozen, and then sequential design methods would be used to select the next samples to interrogate

Analysis of host microbial ecosystems solely by 16S phylotyping has inherent limitations. Sequencing based methods suffer from various biases, due to factors such as the DNA extraction method and sequencing platform utilized

MC-TIMME can be extended with alternate models of dynamics for analyzing other time-series datasets. The key components of the model, including the infinite mixture model for prototype signatures and the noise model for counts data, employ general-purpose inference techniques that would not need to be modified to accommodate different models of dynamics. However, the Reversible Jump MCMC techniques we used for inference of intra-signature dimensionality changes require model-specific moves; in future work, more general techniques such as sparse priors

(TIF)

_{c}_{e}_{a}_{c}_{e}

(TIF)

(TIF)

(PDF)

We would like to thank Neil Herring for critical reading of the manuscript and Wayne Lencer for helpful discussions.