ConStrains identifies microbial strains in metagenomic datasets

Journal name:
Nature Biotechnology
Volume:
33,
Pages:
1045–1052
Year published:
DOI:
doi:10.1038/nbt.3319
Received
Accepted
Published online

Abstract

An important fraction of microbial diversity is harbored in strain individuality, so identification of conspecific bacterial strains is imperative for improved understanding of microbial community functions. Limitations in bioinformatics and sequencing technologies have to date precluded strain identification owing to difficulties in phasing short reads to faithfully recover the original strain-level genotypes, which have highly similar sequences. We present ConStrains, an open-source algorithm that identifies conspecific strains from metagenomic sequence data and reconstructs the phylogeny of these strains in microbial communities. The algorithm uses single-nucleotide polymorphism (SNP) patterns in a set of universal genes to infer within-species structures that represent strains. Applying ConStrains to simulated and host-derived datasets provides insights into microbial community dynamics.

At a glance

Figures

  1. Overview of the ConStrains algorithm: from raw metagenomic data to strain profiles and uniGcodes.
    Figure 1: Overview of the ConStrains algorithm: from raw metagenomic data to strain profiles and uniGcodes.

    (a) ConStrains requires raw metagenomic reads from a single or series of metagenomic samples as input. (b) To select species that satisfy a predefined sequencing depth cutoff, the algorithm starts by determining the species composition with MetaPhlAn1. (c) Next, Bowtie2 (ref. 24) is used to recruit all reads to a reference database of species-specific marker genes23. (d) SNPs are called on these recruited reads after quality filtering, removal of reference gene sequence and reference-free read realignment. (e) Resulting SNPs are used by an SNP-flow algorithm to infer all possible SNP types for each of the samples. (f) Such SNP types across samples are clustered using a tree structure based on their distances to represent candidate strain models; the internal distance cutoff, Δd, is varied to exhaust all possible SNP-type clusterings. (g) The Metropolis-Hastings Monte-Carlo method is then carried out to infer relative abundances per sample and per species for every candidate strain model. (h) These models are then evaluated by corrected AICc, and the model with minimum AICc is selected as the optimal model. (i) Finally, the associated strains' relative abundances across samples and their uniGcodes are generated for every species.

  2. ConStrains correctly predicts the strain composition of in silico-simulated datasets in a comparison of true and predicted strain composition profiles of in silico-simulated multistrain mixtures.
    Figure 2: ConStrains correctly predicts the strain composition of in silico–simulated datasets in a comparison of true and predicted strain composition profiles of in silico–simulated multistrain mixtures.

    (a) An increasing number of multistrain mixtures (n = 2–7; rows) analyzed with ConStrains either containing only the target strains (pure) or in the context of a metagenome of low, medium and high complexity (+LC, +MC and +HC, respectively). Colors represent different strains that were mixed in six different ratios (relative abundance) with a Shannon index increasing from top to bottom. In the resulting 144 admixtures, all strains were correctly identified. (b) JSD between predicted composition and the true composition to compare the predictions in abundance for each strain. Blue dashed lines mark the expected errors from random guesses. Boxes mark the interquartile range, red bars mark the interquartile median, whiskers represent the top and the bottom 25% data range, and outliers are marked by crosses. Good performance was obtained for all compositions, with minimal difference in the accuracy of results between pure mixtures and metagenomic mixtures. (c) ConStrains' capacity to correctly infer intraspecific structure as a function of the number of strains contained in a sample. Shown is a typical case with the species' relative abundance ranging from 1% to 5% and a sequencing depth of 100 million paired-end reads. The ConStrains' prediction JSD errors (blue dashed line and boxes) were below 1% of null informative prediction errors (random guess; red dashed line) when the number of strains within a species was less than ten. (d) For comparison, three metagenomic samples were randomly chosen from seven different niches, ranging from adult gut microbiome to a marine planktonic community. More than 95% of the species from these metagenomic samples possessed fewer than ten strains (dashed horizontal line). Dashed lines and whiskers mark the interquartile range; plusses mark the outliers.

  3. ConStrains scales to large time series and accurately predicts strain dynamics.
    Figure 3: ConStrains scales to large time series and accurately predicts strain dynamics.

    (ac) In the absence of existing large time series metagenomic datasets, a simulated set with 322 samples was created. Shown are the strain predictions within the Bacteroides fragilis species. The true (a) and ConStrains-predicted (b) relative abundance of B. fragilis strains (stream ribbon width, with different colors representing different strains) in different samples sorted in longitudinal order (sample index) are illustrated. Insets 1–3 in a indicate periods with different dominant strains. Prediction errors (red line) in each sample measured between the true and predicted profiles using JSD (c). For comparison, random guess error (blue line) is shown to indicate a lower performance boundary. Spikes in error rates above 0.1 JSD are mostly related to time points in which the species average coverage drops below 10×, preventing reliable SNP profiling (Supplementary Fig. 7b).

  4. High-sensitivity identification of strain phylogeny using ConStrains in a reanalysis of data from a published study on the genetic variation of B. dolosa populations within cystic fibrosis patients.
    Figure 4: High-sensitivity identification of strain phylogeny using ConStrains in a reanalysis of data from a published study on the genetic variation of B. dolosa populations within cystic fibrosis patients30.

    (a) Six B. dolosa strains (pop-I to pop-VI) were predicted with an abundance of >0.1% of the species (diameter of green circles proportional to relative abundance). An unrooted neighbor-joining tree on the alignments of the unweighted concatenated SNP profiles for the predicted strains (green circles) and the corresponding genomic data for the 29 cultured isolates (red circles; gray bar indicates the tree distance scale). These results show that the original study retrieved numerous isolates for the two most dominant strains within the population, but could not isolate the lower-abundance strains. Distance between predicted strains and isolates fall within the prediction sensitivity of the ConStrains algorithm (same strain individuals differ with no more than 5% of all SNPs). (b) To demonstrate the sensitivity of the algorithm for differentiating strains, the color-coded allelic difference for each of the predicted strains is shown in reference to the most dominant strain, pop-I. Sites with the same allele as reference (pop-I) were not marked.

  5. ConStrains analysis revealed species longitudinal dynamics and functional shifts within an infant gut development cohort.
    Figure 5: ConStrains analysis revealed species longitudinal dynamics and functional shifts within an infant gut development cohort.

    A cohort of nine infants that were sampled throughout the first three years of life, and for which metagenomic data were available for up to nine time points, was analyzed with ConStrains. For 75 species, the depth was sufficient to interpret the underlying strains. The circular tree was constructed using a representative sequence for each species, with the colored outer rings indicating the number of strains observed for each of the nine subjects. Open boxes show the longitudinal dynamics of strains in four selected species; the phylogeny tree inset shows all strains including the available reference genome of B. longum.

  6. Functional differences in B. longum strains at different time points during infant gut microbiome development.
    Figure 6: Functional differences in B. longum strains at different time points during infant gut microbiome development.

    (a) Two subjects experienced dominant strain switches within the species B. longum (flanking panels, periods marked by numbered gray shadows). Each track in the middle shows the corresponding sample's coverage over the B. longum reference genome. Time points (days after birth) are marked by red triangles. Windows I–IV capture gene content differences before and after dominant strain switches, reflected by the reference genome. (b) The four highlighted regions (I–IV in a) indicate strain-specific functional cohesion that is also strongly associated with B. longum relative abundance in gut microbiome development.

  7. Minimum requirements for sequencing depth and species/' relative abundance for ConStrains analysis based on 10x coverage cutoff
    Supplementary Fig. 1: Minimum requirements for sequencing depth and species’ relative abundance for ConStrains analysis based on 10x coverage cutoff

    Gray lines mark the boundaries for associated genome size; the qualified space is the upper right hand side of the boundary. The boundaries are calculated as the sequencing throughput (in Gbp), S, needed for a 10-fold coverage over a species with relative abundance, r%, and average genome size of g Mbp as S = glr. Note that a sequence depth across the whole genome is correlated with depth of the marker genes such that the larger the genome size, the more sequencing will be required to result in a 10x coverage in these marker genes (and overall genome), when keeping other factors (including relative abundance) constant.

  8. ConStrains/' intra-species phylogenetic sensitivity in detecting strains.
    Supplementary Fig. 2: ConStrains’ intra-species phylogenetic sensitivity in detecting strains.

    (a) A neighbor-joining (NJ) tree is shown based on average nucleotide identity (ANI) of the 62 complete E. coli genomes from NCBI used in assessing ConStrains’ sensitivity towards genome relatedness. (b) The ANI distribution of all genome pairs among the 62 genomes (n = c2 = 1,891) covers the typical intra-species ANI range, 97%-100%. Representative 62 genome pairs were randomly selected to synthesize Illumina reads of strain mixtures as described in online methods. For simplicity, all in silico-synthesized Illumina read sets followed a 3:1 strains mixing ratio. (c) Though the number of informative SNP sites and the genome relatedness are strongly negatively correlated, ConStrains captured sufficient (>10) informative SNPs in 99.5% of all sets. (d) Among the 99.5% of all analyzable sets, ConStrains robustly recovered strain profiles with high precision (low JSD error rate). (e) At each divergence level (highlighted by red solid line along the tree shown in a), we show the three E. coli strains drawn to represent the branch (branches identified by blue circles, selected strains identified by red circles next to strain names in a) along with the corresponding predicted composition and JSD errors in comparison to the true composition.

  9. In silico test sets simulated by mixing ART-generated Illumina paired-end reads of E. coli strains at different depths with corresponding ConStrains performance.
    Supplementary Fig. 3: In silico test sets simulated by mixing ART-generated Illumina paired-end reads of E. coli strains at different depths with corresponding ConStrains performance.

    (a) Unrooted tree on the left was constructed from concatenated nucleotide sequences of core genes shared between these ten E. coli strains; the heatmap on the right shows the coverage of each strain (rows) in each data set (columns), separated by the number of strains it contains, and ranked by its diversity measured by Shannon entropy (top panel). (b) Corresponding ConStrains performance is shown; graphs show the same data as Figure 2b with different y-axis values to increase readability. No significant differences in accuracy were observed between +LC, +MC, or +HC and pure predictions (two-tailed P = 0.536, 0.319, and 0.48 for +LC, +MC, and +HC, respectively, paired t-test; Supplementary Note 2).

  10. Comparisons between the predictions by ConStrains and Sigma over in silico E. coli data sets.
    Supplementary Fig. 4: Comparisons between the predictions by ConStrains and Sigma over in silico E. coli data sets.

    The grid represents the same strain admixtures as described in Figure 2. ConStrains’ predictions were based on a single E. coli reference genome (1-Ref.). Sigma’s predictions are shown based on one reference genome (1-Ref.), three reference genomes (3-Ref.), and all ten E. coli genomes used to simulate the admixtures (10-Ref.).

  11. Prediction of strain composition according to the number of core gene SNPs recombined between strains
    Supplementary Fig. 5: Prediction of strain composition according to the number of core gene SNPs recombined between strains

    Numbers next to circle mark the exact number of SNPs recombined in silico.

  12. The predicted Staphylococcus epidermidis strain profile from time-series metagenomes reported by Sharon et al, with comparison to the original relative abundance of strains inferred from de novo-assembled strain genome scaffolds with manual curation.
    Supplementary Fig. 6: The predicted Staphylococcus epidermidis strain profile from time-series metagenomes reported by Sharon et al, with comparison to the original relative abundance of strains inferred from de novo-assembled strain genome scaffolds with manual curation.

    N/A.

  13. Factors that affect the accuracy of ConStrains analysis in the year-long simulation.
    Supplementary Fig. 7: Factors that affect the accuracy of ConStrains analysis in the year-long simulation.

    (a) The green reference strain is significantly more divergent than the other four reference strains (one-tailed P = 3.5 × 10-12, t-test). (b-d) Relationships between prediction accuracy measured by JSD (y-axis of panels b-c) and the complexity of samples (Shannon index, x-axis; panel b) and the coverage of samples (x-axis; panel c). In c, the 10x cutoff for coverage is marked by the vertical dashed green line. A significant (P = 0.452, Pearson’s correlation) negative correlation between JSD and sample Shannon index was observed (b and d).

  14. Overview of times-series metagenomes from the infant gut development study.
    Supplementary Fig. 8: Overview of times-series metagenomes from the infant gut development study.

    Nine subjects (horizontal lines) were chosen and the associated sampling points (solid circles) are sorted along the longitudinal axis (with time on the x-axis).

  15. Overview of strains inferred by ConStrains for the infant gut microbiome development cohort.
    Supplementary Fig. 9: Overview of strains inferred by ConStrains for the infant gut microbiome development cohort.

    (a) The uncollapsed tree shows strain-level resolution of the same tree shown in Figure 5a. (b) The average number of strains per species per subject is shown.

  16. Examples of potential linkage (FDR < 0.5) between intra- specific alpha diversity and the corresponding species/' relative abundance in the community.
    Supplementary Fig. 10: Examples of potential linkage (FDR < 0.5) between intra- specific alpha diversity and the corresponding species’ relative abundance in the community.

    N/A

  17. ConStrains analysis reveals associations only observable at the strain level in the infant gut development cohort.
    Supplementary Fig. 11: ConStrains analysis reveals associations only observable at the strain level in the infant gut development cohort.

    For each subject, significant association networks between strains were identified, whereas no species-level significant associations (FDR < 0.05) were observed. In network diagrams, each node represents a species, and the edges connecting nodes represent strains of the corresponding species that were significantly associated. The width of the edges is proportional to the number of pairs of associated strains, and the color of the edges is color-coded for the direction of associations. Below the network is the corresponding heatmap, whose upper right triangle represents the number of positively associated strains and the lower left triangle represents the number of negatively associated strains. The blue dashed oval captures the relationship between R. torques and S. wadsworthensis detailed in Supplementary Figure 12.

  18. Examples between R. toques and S. wadsworthensis of subject 8 as highlighted in Supplementary Figure 11.
    Supplementary Fig. 12: Examples between R. toques and S. wadsworthensis of subject 8 as highlighted in Supplementary Figure 11.

    At strain level (left panels), a significant positive association was found between the two highlighted strains of the two species. In contrast, no significant associations were found at the species level (right panels).

Introduction

Understanding how individual organisms coexist within a microbial community is crucial to understanding community functions. For example, the study of microbial community dynamics is important in human health, including how to maintain or restore a healthy human microbiome. Metagenomics has revolutionized microbiology by addressing some of these issues in a culture-independent manner. However, state-of-the-art metagenomics approaches are often limited to the species level1, 2, 3 or to partially assembled population consensus genomes4, 5, 6. Evidence that the unit of microbial action can fall below the species level comes from multiple sources, including culturing7, single-cell genomics8, redundant sequencing of the bacterial gene encoding 16S rRNA9, sequencing of internal transcribed spacers10, multilocus sequence typing11 and high-resolution analyses of genomic variation12. Therefore methods that enable strain resolution from metagenomics datasets are desirable.

Most existing culture-free approaches to identify bacterial strains in communities have drawbacks, which has limited wide adoption of these approaches. For example, single-cell sequencing requires expensive and laborious efforts in cell sorting and suspension, and thus this approach is not used to analyze large communities. Similarly, Hi-C, a sequencing-based approach13, requires extra steps and budget for cross-linking, library construction and sequencing. Strain typing methods that leverage strain-level gene copy number variations14 or strain-level phylogenetic marker SNPs such as canSNPs15, PathoScope16 and Sigma17 rely on the availability of complete reference strain genomes and, with current limitations on these resources, face challenges in studies of the broader diversity found using metagenomic sequencing approaches. An assembly-based approach is dependent on several factors, including genome structure and intraspecies divergence. With rare exceptions, assemblers usually fail to produce individual strain assemblies, instead creating either highly fragmented contigs or contigs that only represent population consensus sequences18, 19; a recent effort in using variation-aware contig graphs for strain identification20 relies on manual inspection, and hence its accuracy is subject to users' experience. In all of these approaches, only a relatively small fraction of strain genomes have been successfully analyzed, and their distribution is usually biased21. On the other hand, methods based on single marker genes such as the gene encoding 16S rRNA often lack the resolution to reliably capture intraspecific genomic differences22.

To overcome this difficulty and increase the utility of metagenome dataset, we developed Conspecific Strains (ConStrains), an algorithm that exploits the polymorphism patterns in a set of universal bacterial and archaeal genes to infer strain-level structures in species populations. Using both in silico and previously published host-derived datasets, we found that ConStrains recovers intraspecific strain profiles and phylogeny with high accuracy, and captures important features of community dynamics including dominant strain switches and rare strains. The simulated datasets address performance in the context of different within-population diversities, different numbers of strains, the interference from other species within the same community, as well as the scalability of the method using a large in silico cohort with 322 samples. Predicted within-species structures as well as the strain genotypes were highly accurate across these simulated datasets. Applying this method to an infant gut development metagenomic dataset revealed new insights of strain dynamics with functional relevance. ConStrains is implemented in Python, and the source code is available as Supplementary Code and is freely available together with full documentation at https://bitbucket.org/luo-chengwei/constrains.

Results

The ConStrains algorithm

Guided by reference species, the ConStrains algorithm compares raw metagenomic reads to reference genomes and identifies patterns in SNPs as the basis for differentiation and quantification of conspecific strains. This approach is fundamentally different from other reference-dependent methods such as Sigma and PathoScope16, 17 that rely on availability of a comprehensive reference strain collection because, unlike those methods, ConStrains can provide reliable predictions for species with only one genome (complete or draft). For confident SNP calling, a species requires a minimum of tenfold coverage (Supplementary Fig. 1) within or across all samples considered, which is obtained for all species with a relative abundance of >1% at typical sequencing depths of 5 Gbp. When applied to multiple samples, for example, a longitudinal time series or otherwise related samples, strain identities can be traced across the different samples. The algorithm achieves this in two operations: (i) identifying species for which SNPs are detected and quantified, and (ii) transforming individual SNPs into SNP profiles that represent individual strains.

The first operation is a two-step process. Because the algorithm identifies strains only for those species with sufficient sequencing depth (≥10-fold coverage in at least one sample; Supplementary Fig. 1), the first step uses MetaPhlAn1 for rapid species composition profiling. For those species with sufficient sequencing depth, a custom database of marker genes is created from the comprehensive PhyloPhlAn marker set23, against which the raw reads are mapped using Bowtie2 (ref. 24). This targeted approach allows for optimized time and computational efficiency. Resulting marker gene alignments are processed with SAMtools25 to generate a table of coverage by base position from which SNPs are identified. It is important to note that in this process the reference sequences are removed, and SNPs are identified de novo to minimize reference dependency (Fig. 1a–d and Online Methods). We verified that such a SNP selection procedure is sufficiently accurate and uniquely sensitive to disentangle intraspecific diversity (Supplementary Note 1 and Supplementary Fig. 2).

Figure 1: Overview of the ConStrains algorithm: from raw metagenomic data to strain profiles and uniGcodes.
Overview of the ConStrains algorithm: from raw metagenomic data to strain profiles and uniGcodes.

(a) ConStrains requires raw metagenomic reads from a single or series of metagenomic samples as input. (b) To select species that satisfy a predefined sequencing depth cutoff, the algorithm starts by determining the species composition with MetaPhlAn1. (c) Next, Bowtie2 (ref. 24) is used to recruit all reads to a reference database of species-specific marker genes23. (d) SNPs are called on these recruited reads after quality filtering, removal of reference gene sequence and reference-free read realignment. (e) Resulting SNPs are used by an SNP-flow algorithm to infer all possible SNP types for each of the samples. (f) Such SNP types across samples are clustered using a tree structure based on their distances to represent candidate strain models; the internal distance cutoff, Δd, is varied to exhaust all possible SNP-type clusterings. (g) The Metropolis-Hastings Monte-Carlo method is then carried out to infer relative abundances per sample and per species for every candidate strain model. (h) These models are then evaluated by corrected AICc, and the model with minimum AICc is selected as the optimal model. (i) Finally, the associated strains' relative abundances across samples and their uniGcodes are generated for every species.

In the second operation, individual SNPs are combined into unique SNP profiles from which strains are identified. Previous methods have approached the challenge of identifying individual organisms from microbial communities using SNPs (for example, oligotyping26 and minimum entropy decomposition27), but were limited to SNPs within the span of a sequence read length. ConStrains overcomes this read-length limitation and represents each strain by a barcode-like string of concatenated SNPs spanning hundreds of genes, referred to as the 'uniGcode'. To derive the strain's uniGcodes in a dataset, ConStrains constructs candidate models of strain combinations using a combination of SNP-flow and SNP-type clustering algorithms. The relative abundance of strains in each candidate model across the cohort is estimated sequentially using a Metropolis-Hastings Markov chain Monte-Carlo approach (Fig. 1e–g and Online Methods). Finally, to choose the optimal model with the principle of balancing model fitness and complexity, corrected Akaike information criterion (AICc) is used (Fig. 1h and Online Methods). ConStrains repeats these steps for each species with sufficient coverage, then outputs the number of strains and their respective uniGcodes and relative abundances (Fig. 1i). The uniGcode allows downstream analysis such as cross-sample comparisons and evolutionary studies.

ConStrains identifies strains in large datasets

To validate the performance of ConStrains for strain profiling, we used in silico and host-derived datasets. We generated 36 different sets of k-strain mixtures using in silico genome-based Illumina paired-end read simulation based on ten different Escherichia coli strains whose complete genomes are publicly available, representing real-life scenarios of strain admixtures (k = 2–7; Fig. 2a,b, Supplementary Fig. 3a and Supplementary Table 1). We profiled these 36 sets of reads by ConStrains using default settings, and compared the predicted results with the 'true' strain compositions using Jensen-Shannon divergence (JSD; Fig. 2b and Supplementary Fig. 3b). ConStrains successfully predicted the underlying intraspecies compositions in all 36 datasets (P < 1 × 10−5; two group t-test against random guesses; Fig. 2b), demonstrating a substantial advantage (Supplementary Fig. 4) over reference-based approaches, with an improvement of 0.191 JSD on average (Supplementary Note 1 and Supplementary Fig. 5). In 34 of the 36 sets of reads (94.44%), the numbers of strains inferred exactly matched the ground truth (Fig. 2a), with the remaining two sets of reads having an additional chimeric strain predicted at an extremely low level (<0.1%). We therefore set the recommended detection limit at 0.1% to reduce such errors computationally. As this is a relative abundance threshold, one can still target low-abundance organisms by increasing sequence depth. In similar simulations with up to 30 E. coli strains, ConStrains predicted the strain composition with high confidence when the strain number was less than ten (Fig. 2c), which represents the intraspecific upper bound for more than 95% of metagenomic species (Fig. 2d and Supplementary Note 1). To assess the impact of intraspecies recombination on performance, we generated both real sequencing reads from highly recombined Burkholderia pseudomallei strains28 and in silico–simulated recombinant strain–derived reads, and identified no significant adverse impact (Supplementary Note 1). We also tested the performance in a more realistic metagenomic scenario by embedding E. coli strains in communities with various levels of complexity and found that our approach remained robust (Online Methods, Supplementary Note 2 and Supplementary Table 2). We also found no significant correlation between admixture compositions' alpha diversity and prediction accuracy. These results collectively suggested good algorithm performance (Supplementary Note 1).

Figure 2: ConStrains correctly predicts the strain composition of in silico–simulated datasets in a comparison of true and predicted strain composition profiles of in silico–simulated multistrain mixtures.
ConStrains correctly predicts the strain composition of in silico-simulated datasets in a comparison of true and predicted strain composition profiles of in silico-simulated multistrain mixtures.

(a) An increasing number of multistrain mixtures (n = 2–7; rows) analyzed with ConStrains either containing only the target strains (pure) or in the context of a metagenome of low, medium and high complexity (+LC, +MC and +HC, respectively). Colors represent different strains that were mixed in six different ratios (relative abundance) with a Shannon index increasing from top to bottom. In the resulting 144 admixtures, all strains were correctly identified. (b) JSD between predicted composition and the true composition to compare the predictions in abundance for each strain. Blue dashed lines mark the expected errors from random guesses. Boxes mark the interquartile range, red bars mark the interquartile median, whiskers represent the top and the bottom 25% data range, and outliers are marked by crosses. Good performance was obtained for all compositions, with minimal difference in the accuracy of results between pure mixtures and metagenomic mixtures. (c) ConStrains' capacity to correctly infer intraspecific structure as a function of the number of strains contained in a sample. Shown is a typical case with the species' relative abundance ranging from 1% to 5% and a sequencing depth of 100 million paired-end reads. The ConStrains' prediction JSD errors (blue dashed line and boxes) were below 1% of null informative prediction errors (random guess; red dashed line) when the number of strains within a species was less than ten. (d) For comparison, three metagenomic samples were randomly chosen from seven different niches, ranging from adult gut microbiome to a marine planktonic community. More than 95% of the species from these metagenomic samples possessed fewer than ten strains (dashed horizontal line). Dashed lines and whiskers mark the interquartile range; plusses mark the outliers.

We then tested ConStrains using a host-derived metagenomic dataset that had previously been analyzed using a manually curated strain-identification approach. Using manual strain curation, the authors had for the first time described the changes in an infant gut microbiome during the first 24 d of life4. All three manually curated Staphylococcus epidermidis strains reported in this study were successfully predicted by ConStrains in a fully automated manner, with the predicted relative abundances of each strain over time having highly similar values to the original compositions quantified from the scaffold coverage (JSD average = 0.024, s.d. = 0.021; Supplementary Fig. 6). Because the performance of ConStrains' fully automated approach matched well with the manually curated, semiautomated approach described previously4, but required far less machine and manual resources (ConStrains completed the infant gut dataset in 8.5 CPU hours with RAM peak footprint of <2 GB on a Linux server with Xeon 2.6 GHz processors, in contrast to days to weeks of manual curation after assembly), we next applied ConStrains to a very large dataset for which a manual effort would not be feasible (for detailed resource usage, see Supplementary Note 5 and Supplementary Table 3).

In the absence of the existence of such a large dataset (especially one where true results were known), we used a simulated shotgun dataset with intraspecific structure mimicking the natural relative abundance of taxa informed by a recent gut microbiome collection effort for which samples were collected daily over the course of one year29 (Fig. 3a, Online Methods and Supplementary Note 3). ConStrains analyzed 91 species with sufficient depth in the 322 in silico samples. In total, ConStrains analyzed 3.2 terabases of paired-end reads containing 1,361 strains from 320 species, with minimal runtime and infrastructure requirements (Supplementary Note 3). ConStrains achieved high accuracy for individual samples, and also captured crucial information such as dominant strain type changes, for example in Bacteroides fragilis (Fig. 3a–c, Supplementary Table 4 and Supplementary Note 3). This large cohort also enabled us to test factors that might affect the performance of ConStrains, including population complexity, coverage and relatedness. We found that 10× coverage was necessary for accurate profiling and that strain relatedness could also affect performance (Supplementary Fig. 7 and Supplementary Note 3). With this thorough benchmarking, we next applied ConStrains to two previously published clinical datasets to illustrate the biological insights strain-level analyses can provide.

Figure 3: ConStrains scales to large time series and accurately predicts strain dynamics.
ConStrains scales to large time series and accurately predicts strain dynamics.

(ac) In the absence of existing large time series metagenomic datasets, a simulated set with 322 samples was created. Shown are the strain predictions within the Bacteroides fragilis species. The true (a) and ConStrains-predicted (b) relative abundance of B. fragilis strains (stream ribbon width, with different colors representing different strains) in different samples sorted in longitudinal order (sample index) are illustrated. Insets 1–3 in a indicate periods with different dominant strains. Prediction errors (red line) in each sample measured between the true and predicted profiles using JSD (c). For comparison, random guess error (blue line) is shown to indicate a lower performance boundary. Spikes in error rates above 0.1 JSD are mostly related to time points in which the species average coverage drops below 10×, preventing reliable SNP profiling (Supplementary Fig. 7b).

ConStrains reconstructs strain phylogeny

In a published report on the genetic variation of Burkholderia dolosa in cystic fibrosis patients, a selective culturing step had been combined with a deep population sequencing approach30. We reanalyzed that dataset using our ConStrains algorithm and predicted a total of six B. dolosa strains in the population (strains abbreviated as pop-I to pop-VI; Fig. 4a) with an abundance well above 0.1%. We compared the uniGcodes from the six strains inferred by ConStrains with the isolate genome sequence by building a phylogenetic tree, and found that all of the colony strains and two population strains (pop-I and pop-II) were closely related (Fig. 4a). Moreover, the combined relative abundance of pop-I and pop-II represented the majority of the population (51.3% and 27.9% for pop-I and pop-II, respectively). This finding corroborated observations based on the colony sequencing approach. In addition, the ConStrains algorithm identified four additional, less abundant strains (pop-III to pop-VI). None of these strains could be inferred by the colony sequencing approach alone, likely because of their low abundance (11.2%, 8.1%, 1.0% and 0.5%, respectively). To validate these additional predictions, we further examined the polymorphism patterns in these four strains, and compared them against pop-I and pop-II. We found patterns that are unlikely to have resulted from chimeric mixtures of SNPs from pop-I and pop-II (P < 0.01, permutation test; Fig. 4b). This analysis demonstrated that application of ConStrains to cross-sectional datasets, used in addition to a culture-based approach, allows for a comprehensive and efficient discovery of rare strains.

Figure 4: High-sensitivity identification of strain phylogeny using ConStrains in a reanalysis of data from a published study on the genetic variation of B. dolosa populations within cystic fibrosis patients30.
High-sensitivity identification of strain phylogeny using ConStrains in a reanalysis of data from a published study on the genetic variation of B. dolosa populations within cystic fibrosis patients.

(a) Six B. dolosa strains (pop-I to pop-VI) were predicted with an abundance of >0.1% of the species (diameter of green circles proportional to relative abundance). An unrooted neighbor-joining tree on the alignments of the unweighted concatenated SNP profiles for the predicted strains (green circles) and the corresponding genomic data for the 29 cultured isolates (red circles; gray bar indicates the tree distance scale). These results show that the original study retrieved numerous isolates for the two most dominant strains within the population, but could not isolate the lower-abundance strains. Distance between predicted strains and isolates fall within the prediction sensitivity of the ConStrains algorithm (same strain individuals differ with no more than 5% of all SNPs). (b) To demonstrate the sensitivity of the algorithm for differentiating strains, the color-coded allelic difference for each of the predicted strains is shown in reference to the most dominant strain, pop-I. Sites with the same allele as reference (pop-I) were not marked.

Uncovering strain dynamics in infant gut development

We next analyzed an infant gut development dataset containing 54 samples from 9 subjects (indexed subjects 1–9; Fig. 5) collected over the first three years of life (Online Methods and Supplementary Fig. 8) to further explore the ability of ConStrains to reveal strain dynamics. We ran a ConStrains analysis on 75 species that had sufficient sequencing depth for analysis (10×; Fig. 5). Because previously reported strain-detection algorithms had been limited to studying the population consensus sequences12, and ConStrains has the capability to untangle intraspecies diversity, we first examined the number of strains observed in each species. Nearly all species (94.66%) had more than two strains, with an average of 4.88 strains per subject (±1.54 s.d.; Supplementary Fig. 9). By tracking the uniGcode of each strain in separate individuals, we identified several unique strain-level longitudinal patterns. For instance, the population of Fecalibacterium prausnitzii usually comprised several strains that maintained a co-dominant profile, in which the strains maintained the same order of abundance; Ruminococcus gnavus had highly variable behaviors over time, with different strains dominating the intraspecies composition at different time points; in contrast, Bacteroides ovatus contained one dominant strain over time, keeping other strains relatively rare. Bifidobacterium bifidum strains demonstrated comparable dynamic patterns similar to F. prausnitzii; moreover, the strains reestablished the same intraspecific diversity even after the abundance of the species dropped below the detection limit (Fig. 5). We anticipate that the capability of generating better insights in intraspecies dynamics of such health-related species31, 32, 33 will shed light on the role of these organisms in human physiology.

Figure 5: ConStrains analysis revealed species longitudinal dynamics and functional shifts within an infant gut development cohort.
ConStrains analysis revealed species longitudinal dynamics and functional shifts within an infant gut development cohort.

A cohort of nine infants that were sampled throughout the first three years of life, and for which metagenomic data were available for up to nine time points, was analyzed with ConStrains. For 75 species, the depth was sufficient to interpret the underlying strains. The circular tree was constructed using a representative sequence for each species, with the colored outer rings indicating the number of strains observed for each of the nine subjects. Open boxes show the longitudinal dynamics of strains in four selected species; the phylogeny tree inset shows all strains including the available reference genome of B. longum.

With this goal in mind, we pursued our findings in Bifidobacterium longum, an organism linked to human gut health and applied to prevention and treatment of several diseases33. We first observed that the phylogeny of B. longum strains strongly correlated with their host origins (Fig. 5), which indicated strong individuality of B. longum strains. Moreover, in subjects 4 and 6 (Fig. 6a), we observed switches in dominant strain types that were highly correlated with the overall relative abundance of the B. longum species. As previous work has shown that a single operon can affect the competitiveness of different Bacteroides fragilis strains34, we evaluated functional differences between different dominant strains. In both subjects, the different strains dominating during consecutive phases (period 2 in subject 4 and period 1 for subject 6; Fig. 6a) carried additional functions that might be crucial to B. longum's successful colonization of the host gut. In particular, the presence of the human milk oligosaccharide (HMO) utilization cluster has been shown to result from an adaptation to the human infant gut35 (Fig. 6b). Some additional functions might underlie formation of a B. longum bloom, including the presence of the fructose and L-fucose utilization gene clusters (Fig. 6b). Together, these findings might explain why strains with these functions were associated with higher relative abundance of B. longum in the infant gut microbiome. We also observed functions specific to strains that were dominant in periods when B. longum was less abundant (periods 1 and 3 in subject 4 and period 2 in subject 6; Fig. 6a), most notably that the capsular polysaccharide biosynthesis genes were absent from dominant strains when B. longum was more abundant (Fig. 6b). Taken together, strain-level insights provided by ConStrains, combined with functional analyses, could offer candidate targets and hypotheses for future studies.

Figure 6: Functional differences in B. longum strains at different time points during infant gut microbiome development.
Functional differences in B. longum strains at different time points during infant gut microbiome development.

(a) Two subjects experienced dominant strain switches within the species B. longum (flanking panels, periods marked by numbered gray shadows). Each track in the middle shows the corresponding sample's coverage over the B. longum reference genome. Time points (days after birth) are marked by red triangles. Windows I–IV capture gene content differences before and after dominant strain switches, reflected by the reference genome. (b) The four highlighted regions (I–IV in a) indicate strain-specific functional cohesion that is also strongly associated with B. longum relative abundance in gut microbiome development.

Discussion

We show that the ConStrains algorithm accurately predicts strain-level profiles in large cohorts of metagenomic samples, and that the inferred uniGcodes reconstruct strain phylogeny, within or across cohorts, allowing combined cohort studies. ConStrains is scalable and has minimal resource requirements. In contrast, other approaches14, 16, 17 are largely dependent on prior knowledge of reference strain genomes, with subspecies resolution being directly dependent on the number of available reference strains per species. This greatly limits the application of such methods on real metagenomic data, because for most of the human microbiome species only one reference genome is available14. Current databases are quickly gaining in intraspecies genome representation, but are still far from saturating natural diversity. With just one genome per species, ConStrains can resolve natural diversity occurring within that species, and is therefore agnostic to unknown strains. Future improvements for strain-level analysis include identification of strains in the absence of any reference genomes. It is conceivable that combining ConStrains with de novo genome assembly from metagenomic data could be an appropriate candidate to overcome this hurdle.

ConStrains is particularly effective for obtaining insights that were previously overlooked using species-level findings (Supplementary Note 4 and Supplementary Figs. 10–12), and will thus enable new types of studies. As we showed with the B. longum example, combining strain-level profiles with reference genome–based gene coverage analysis can reveal candidate genes for understanding strain-specific beneficial effects and the functions that might contribute to successful colonization in the human gut. ConStrains could also identify strains or genes associated with disease and link variable genomic regions to individual strains, a major challenge in shotgun metagenomics. Strain-level profiles, together with appropriate metadata, could link reference-based or de novo–assembled genes with individual strains and help interpret unknown strain-specific functions. Our study of the infant gut development cohort captured HMO utilization cluster enrichment shifts in different development periods, which is particularly important because products of the HMO utilization cluster are essential for B. longum to exert its probiotic effects36. Finally, strain phylogeny could be used across cohorts and add metagenomic means to test fundamental ecological hypotheses, including neutral theory and other adaptive and nonadaptive mechanisms for maintaining sympatric diversity among strains. Although we applied ConStrains to human microbiome datasets, it can also be applied to environmental samples to test fundamental hypotheses about the role of microbes in the environment that can only be addressed at the strain level.

Methods

ConStrains algorithm.

Extracting target species and informative SNPs. With raw reads from samples S1, S2, ..., Sn, ConStrains starts with profiling input metagenomes using MetaPhlAn1 (v1.7) with default settings, with the exception that alignment options are set to 'very-sensitive'; species with average coverage higher than a coverage cutoff (default: 10×) in at least one sample are selected for further strain analysis. For each of the selected species, the corresponding set of the universally conserved genes reported in ref. 1 are used as a database, and Bowtie2 (ref. 24) mapping with default setting is carried out to map reads against those reference genes. Only reads with proper pairing and orientation, no indels, >30 mapping quality, >90 length mapped (overhanging part at gene 5′ and 3′ ends is clipped off before calculation) and at least 95% nucleotide identity with the reference gene are used. These reads are then piled up onto their respective reference sequences using SAMtools25, and the reference gene coverage is subsequently calculated on a per-base basis. To filter out genes with spurious mappings due to hypervariable regions or conserved universal motifs, sites with less than default minimum coverage, as well as those outside of the 1.5 interquartile coverage range across the gene length, are masked. Any gene with more than 30% of its length masked is discarded from further analysis. SNPs are then counted across samples as those unmasked positions where the minor allele had at least two counts or more than 3% in relative abundance.

Strain typing by SNP-flow algorithm. With SNPs extracted, ConStrains first infers the strain composition and their SNP types using the 'SNP-flow' algorithm in per-species, per-sample fashion. In this algorithm, all SNP sites are first hierarchically clustered by the Euclidean distance between the frequencies of different alleles defined as

where a and b are the frequency vector of the four bases sorted in descending order of the respective SNPs. Clusters that contain less than 5% of the overall SNPs or fewer than ten SNPs are discarded. The centroid of each cluster is selected as representative. These SNP cluster centroids (SCCs) are then ranked in descending order based on their weight quantified as the number of SNPs they represent. Finally, a directed graph is constructed using these SCCs, in which nodes are alleles in these SCCs and each is assigned a 'capacity' defined by the allele frequency, and these alleles from neighboring SCCs are connected by edges (Fig. 1e).

In the directed graph constructed in the previous step, nodes are denoted from the same SCC as a layer. With m layers in the graph, SNP-flow will explore all possible combinations of paths from the first layer to the last. This way, every such path represents a strain genotype, and its relative abundance, c, is defined as the lowest node capacity among all nodes on the path. Once a path is visited, all nodes on this path would subtract their capacity by the path's relative abundance c (Fig. 1e). Such a pathfinding and visiting step is repeated until all nodes' capacities are zero, and the visited paths constitute one combination. ConStrains exhausts all possible SNP-type (strains) combinations β = {β1, β2, ..., βk} in each sample with the ith sample's SNP-type βi = bi1bi2...bih where bij is one of the four bases, A, C, G and T, and the associated strain profile αi = (αi1,αi2,...αih) with

For each sample, ConStrains picks the optimal combination that minimizes the fitting error, defined as the discrepancy between expected SNP frequencies and observed frequencies, ε, defined as:

where Eij is expected frequency of the ith base at the jth SNP locale; and similarly, Oij is the observed frequency of the ith base at the jth SNP locale in the pileup of aligned reads from the corresponding sample. For instance, C is the second base (i = 2), and if we observed two Cs and eight As at the fifth SNP locale (j = 5) in the pileup of aligned reads against reference, the frequency of C is 0.2 at that position and thus is referred to as O25 = 0.2. Eij is inferred using αi and βi such that

Inferring strain compositions. To unify these optimal SNP types into cohort-wide strains, ConStrains next constructs a neighbor-joining tree of the SNP types from different samples based on sequence percentage identity, and utilizes an internal parameter, Δd, defined as the distance between the tree-cutting point and the leaves, to cut the tree. Rather than using a preset value, the algorithm cuts this tree using all possible Δd. Each internal node created by such a cut could be viewed as the representative of all the children nodes (SNP types) on the tree. In doing so, it identifies all possible k clusters defined by the structure of the tree of SNP types (Fig. 1f), which we refer to as candidate strains.

With the proposed k strains from the previous step, in each sample, we need to find a composition, α*= (α*1, α*2, ..., α*k) with

to minimize the discrepancy between expected SNP frequencies and observed frequencies, ε, as defined previously. This is carried out by a Metropolis-Hasting Monte-Carlo method. ConStrains first generates a number of seeds (default: 1,000) at uniform random on k − 1 simplex. The top 50 seeds are then selected and each such seed's vicinity on the k − 1 simplex is iteratively searched. In iteration t, a new point, αtik, is picked within the 0.01 radius of the previous point, αt − 1ik; and it is accepted as the new point with probability min(1, q(αtik, αt − 1ik)), where q(αtik, αt − 1ik) = ε(αtik)/ε(αt − 1ik). It repeats the iteration until |1 − q(αtik, αt − 1ik)|is smaller than 0.001 or the maximum number of iterations (10,000) is reached. The composition yielding the lowest ε is selected as optimal α*ik. ConStrains repeats this step for all samples and all k, yielding solutions for each k, α*k = (α*1, α*2, ..., α*n), with corresponding error (Fig. 1g):

Selecting the optimal strain model. Corrected AICc is employed to select optimal k. The AICc of each k is calculated as:

where L = 1 − εk denotes the model likelihood. ConStrains selects the k with the lowest AICc and outputs the associated SNP types and compositions as final results (Fig. 1h). As noted previously, we suggest filtering strains with less than 0.1% in relative abundance as they present a high probability of being chimeric.

In silico datasets.

To simulate in silico single species datasets, 62 complete E. coli genome sequences were downloaded from an NCBI database. Ten genomes were selected and their relatedness was shown by a maximum likelihood tree (Supplementary Fig. 3a) constructed from concatenated nucleotide sequences of core genes among the 10 strains using a method similar to ref. 19. 1,000 random compositions were sampled on a gamma distribution with k = 1 and θ = 0.5 for each number of strains (N = 2–7). In each set of these 1,000 compositions, Shannon entropy was calculated and based on which these compositions were ranked. The compositions on the 15th, 30th,..., 90th percentiles were picked to form a gradient of intraspecific diversity for each N. ART simulator37 was employed to simulate 100× coverage of 100-bp paired-end Illumina reads using these compositions with default settings for Illumina and library settings as “-m 350 -s 50” (Supplementary Fig. 3a). These samples were further grouped together to simulate single strain series samples (Supplementary Table 1).

These simulated E. coli reads were then spiked into in silico–constructed metagenomes to measure the impact from other species. Three human microbiome-like metagenomes with low, medium, and high complexity level (referred as LC, MC and HC, respectively) were simulated based on an aggregated MetaPhlAn1 profile over all 690 Human Microbiome Project (HMP) samples38. E. coli and Shigella were excluded from the profile, and the rest of the species were ranked based on their average abundance in the HMP cohort. The top 20, 50, and 100 most abundant species were selected for LC, MC and HC, respectively. The species composition in each in silico metagenome was calculated as their relative abundance in the HMP cohort, normalized by their total sum. Genomes of these species were downloaded from NCBI, and a representative strain was selected at random if multiple strains of the same species were present. A total of 100 million 100-bp paired-end Illumina reads were simulated for each set by ART simulator37 with the same settings as mentioned previously. Additional datasets for testing the sensitivity and the performance on different numbers of strains and recombined strains were generated in a similar fashion using ART (Supplementary Note 1).

The year-long shotgun metagenome cohort with 322 samples was simulated based on donor A's 16S rRNA amplicon profiles reported in ref. 29. The operational taxonomy unit (OTU) table was used as a guide for community composition in human microbiomes. To allow simulation at the strain level, however, taxonomy in the OTU table was shifted down by one level. For instance, species composition in the original OTU table was shifted to be the strain composition. NCBI draft and complete genomes were used to match as closely as possible the phylogeny of the original OTUs. Reads were then simulated by ART simulator as previously described. The coverage was set to be 1× per 25 read counts in the 16S OTU table.

Biological datasets.

The two infant gut development longitudinal metagenomic datasets used in this study were from a previous study4 and from our recent effort in tracking nine subjects in a three-year period since birth. For the former set, all metagenomic samples were downloaded from NCBI SRA under accession number SRA052203, and the corresponding assembled S. epidermidis strains and phage genomes were downloaded from ggKBase as described4. For the latter set, 54 stool samples were collected from nine infant subjects between September 2008 and August 2010 in Finland. Samples were first collected by the subjects' parents and stored in the household freezer before being transferred on dry ice to a laboratory −80 °C freezer. Samples were then shipped to the Broad Institute for DNA extraction, in which QIAamp DNA Stool Mini Kit (Qiagen, Inc.) was used as described previously39. Library construction was carried out following Human Microbiome Project's standard protocol (http://hmpdacc.org/resources/tools_protocols.php), and 101-bp paired-end reads were produced on an Illumina HiSeq 2000 platform. The raw sequences of these samples are available at SRA under BioProject accession number PRJNA269305, and the corresponding sample information is available in Supplementary Table 5.

Prediction accuracy measurement.

To measure how close the predicted composition, P, is from the true composition, Q, we applied Jenson-Shannon divergence with minor modifications. As it is possible that P and Q are of different dimensions, we first padded the one with lower dimension with zeros to match the one with the higher dimension, and then defined a composition M based on sorted P and Q, P′ and Q′, as:

Therefore the Jenson-Shannon divergence is:

where D(X||Y) is the Kullback-Leibler divergence defined as:

We calculated the SNP typing accuracy as the distance between the inferred SNP tree of strains, kTp, and the true strain tree constructed from concatenated core genes, Tq. First, a distance similar to the symmetric difference introduced by Robinson and Foulds40 was applied to calculate the distance, d, between these two trees. We then normalized d to the expected basal distance from a random tree with the same leaves. The expected basal distance, d, is the mean distance between Tq and 1,000 randomly generated trees with the same leaves.

Accession codes

Referenced accessions

BioProject

Sequence Read Archive

References

  1. Segata, N. et al. Metagenomic microbial community profiling using unique clade-specific marker genes. Nat. Methods 9, 811814 (2012).
  2. Sunagawa, S. et al. Metagenomic species profiling using universal phylogenetic marker genes. Nat. Methods 10, 11961199 (2013).
  3. Darling, A.E. et al. PhyloSift: phylogenetic analysis of genomes and metagenomes. PeerJ 2, e243 (2014).
  4. Sharon, I. et al. Time series community genomics analysis reveals rapid shifts in bacterial species, strains, and phage during infant gut colonization. Genome Res. 23, 111120 (2013).
  5. Nielsen, H.B. et al. Identification and assembly of genomes and genetic elements in complex metagenomic samples without using reference genomes. Nat. Biotechnol. 32, 822828 (2014).
  6. Imelfort, M. et al. GroopM: an automated tool for the recovery of population genomes from related metagenomes. PeerJ 2, e603 (2014).
  7. Luo, C. et al. Genome sequencing of environmental Escherichia coli expands understanding of the ecology and speciation of the model bacterial species. Proc. Natl. Acad. Sci. USA 108, 72007205 (2011).
  8. Kashtan, N. et al. Single-cell genomics reveals hundreds of coexisting subpopulations in wild Prochlorococcus. Science 344, 416420 (2014).
  9. Faith, J.J. et al. The long-term stability of the human gut microbiota. Science 341, 1237439 (2013).
  10. Maslunka, C., Gifford, B., Tucci, J., Gurtler, V. & Seviour, R.J. Insertions or deletions (Indels) in the rrn 16S–23S rRNA gene internal transcribed spacer region (ITS) compromise the typing and identification of strains within the Acinetobacter calcoaceticus-baumannii (Acb) complex and closely related members. PLoS ONE 9, e105390 (2014).
  11. Han, D. et al. Population structure of clinical Vibrio parahaemolyticus from 17 coastal countries, determined through multilocus sequence analysis. PLoS ONE 9, e107371 (2014).
  12. Schloissnig, S. et al. Genomic variation landscape of the human gut microbiome. Nature 493, 4550 (2013).
  13. Beitel, C.W. et al. Strain- and plasmid-level deconvolution of a synthetic metagenome by sequencing proximity ligation products. PeerJ 2, e415 (2014).
  14. Greenblum, S., Carr, R. & Borenstein, E. Extensive strain-level copy-number variation across human gut microbiome species. Cell 160, 583594 (2015).
  15. Karlsson, E. et al. Eight new genomes and synthetic controls increase the accessibility of rapid melt-MAMA SNP typing of Coxiella burnetii. PLoS ONE 9, e85417 (2014).
  16. Hong, C. et al. PathoScope 2.0: a complete computational framework for strain identification in environmental or clinical sequencing samples. Microbiome 2, 33 (2014).
  17. Ahn, T.H., Chai, J. & Pan, C. Sigma: strain-level inference of genomes from metagenomic analysis for biosurveillance. Bioinformatics 31, 170177 (2015).
  18. Miller, J.R., Koren, S. & Sutton, G. Assembly algorithms for next-generation sequencing data. Genomics 95, 315327 (2010).
  19. Luo, C., Tsementzi, D., Kyrpides, N.C. & Konstantinidis, K.T. Individual genome assembly from complex community short-read metagenomic datasets. ISME J. 6, 898901 (2012).
  20. Nijkamp, J.F., Pop, M., Reinders, M.J. & de Ridder, D. Exploring variation-aware contig graphs for (comparative) metagenomics using MaryGold. Bioinformatics 29, 28262834 (2013).
  21. Lasken, R.S. & McLean, J.S. Recent advances in genomic DNA sequencing of microbial species from single cells. Nat. Rev. Genet. 15, 577584 (2014).
  22. Ivanova, N. et al. Genome sequence of Bacillus cereus and comparative analysis with Bacillus anthracis. Nature 423, 8791 (2003).
  23. Segata, N., Bornigen, D., Morgan, X.C. & Huttenhower, C. PhyloPhlAn is a new method for improved phylogenetic and taxonomic placement of microbes. Nat. Commun. 4, 2304 (2013).
  24. Langmead, B. & Salzberg, S.L. Fast gapped-read alignment with Bowtie 2. Nat. Methods 9, 357359 (2012).
  25. Li, H. et al. The Sequence Alignment/Map format and SAMtools. Bioinformatics 25, 20782079 (2009).
  26. Eren, A.M. et al. Oligotyping: Differentiating between closely related microbial taxa using 16S rRNA gene data. Methods Ecol. Evol. 4, 11111119 (2013).
  27. Eren, A.M. et al. Minimum entropy decomposition: unsupervised oligotyping for sensitive partitioning of high-throughput marker gene sequences. ISME J. 9, 968979 (2014).
  28. Nandi, T. et al. Burkholderia pseudomallei sequencing identifies genomic clades with distinct recombination, accessory, and epigenetic profiles. Genome Res. 25, 129141 (2015).
  29. David, L.A. et al. Host lifestyle affects human microbiota on daily timescales. Genome Biol. 15, R89 (2014).
  30. Lieberman, T.D. et al. Genetic variation of a bacterial pathogen within individuals with cystic fibrosis provides a record of selective pressures. Nat. Genet. 46, 8287 (2014).
  31. Sokol, H. et al. Faecalibacterium prausnitzii is an anti-inflammatory commensal bacterium identified by gut microbiota analysis of Crohn disease patients. Proc. Natl. Acad. Sci. USA 105, 1673116736 (2008).
  32. Crost, E.H. et al. Utilisation of mucin glycans by the human gut symbiont Ruminococcus gnavus is strain-dependent. PLoS ONE 8, e76341 (2013).
  33. Di Gioia, D., Aloisio, I., Mazzola, G. & Biavati, B. Bifidobacteria: their impact on gut microbiota composition and their applications as probiotics in infants. Appl. Microbiol. Biotechnol. 98, 563577 (2014).
  34. Lee, S.M. et al. Bacterial colonization factors control specificity and stability of the gut microbiota. Nature 501, 426429 (2013).
  35. Schell, M.A. et al. The genome sequence of Bifidobacterium longum reflects its adaptation to the human gastrointestinal tract. Proc. Natl. Acad. Sci. USA 99, 1442214427 (2002).
  36. Sela, D.A. et al. The genome sequence of Bifidobacterium longum subsp. infantis reveals adaptations for milk utilization within the infant microbiome. Proc. Natl. Acad. Sci. USA 105, 1896418969 (2008).
  37. Huang, W., Li, L., Myers, J.R. & Marth, G.T. ART: a next-generation sequencing read simulator. Bioinformatics 28, 593594 (2012).
  38. Human Microbiome Project Consortium. Structure, function and diversity of the healthy human microbiome. Nature 486, 207214 (2012).
  39. Morgan, X.C. et al. Dysfunction of the intestinal microbiome in inflammatory bowel disease and treatment. Genome Biol. 13, R79 (2012).
  40. Robinson, D.F. & Foulds, L.R. Comparison of phylogenetic trees. Math. Biosci. 53, 131147 (1981).

Download references

Acknowledgments

We thank N. Nedelsky for editorial support. This work was supported in part by the Crohn's and Colitis Foundation of America, the Leona M. and Harry B. Helmsley Charitable Trust, US National Institutes of Health grants U54 DK102557 (R.J.X.) and R01 DK092405 (R.J.X.)., the Howard Hughes Medical Institute (R.K.) and the Finnish Centre of Excellence in Molecular Systems Immunology and Physiology Research 2012-17 (Academy of Finland, Decision No. 250114; M.K.).

Author information

  1. Present addresses: Departments of Pediatrics and Computer Science and Engineering, University of California San Diego, La Jolla, California, USA (R.K.) and Janssen Human Microbiome Institute, Janssen Research and Development, Cambridge, Massachusetts, USA (D.G.).

    • Rob Knight &
    • Dirk Gevers

Affiliations

  1. Broad Institute of Massachusetts Institute of Technology (MIT) and Harvard, Cambridge, Massachusetts, USA.

    • Chengwei Luo,
    • Ramnik J Xavier &
    • Dirk Gevers
  2. Gastrointestinal Unit and Center for the Study of Inflammatory Bowel Disease, Massachusetts General Hospital and Harvard Medical School, Boston, Massachusetts, USA.

    • Chengwei Luo &
    • Ramnik J Xavier
  3. Center for Computational and Integrative Biology, Massachusetts General Hospital and Harvard Medical School, Boston, Massachusetts, USA.

    • Chengwei Luo &
    • Ramnik J Xavier
  4. Department of Chemistry and Biochemistry, University of Colorado at Boulder, Boulder, Colorado, USA.

    • Rob Knight
  5. Howard Hughes Medical Institute, Boulder, Colorado, USA.

    • Rob Knight
  6. Children's Hospital, University of Helsinki and Helsinki University Hospital, Helsinki, Finland.

    • Heli Siljander &
    • Mikael Knip
  7. Research Programs Unit, Diabetes and Obesity, University of Helsinki, Helsinki, Finland.

    • Heli Siljander &
    • Mikael Knip
  8. Folkhälsan Research Center, Helsinki, Finland.

    • Mikael Knip
  9. Department of Pediatrics, Tampere University Hospital, Tampere, Finland.

    • Mikael Knip
  10. Center for Microbiome Informatics and Therapeutics, Massachusetts Institute of Technology, Cambridge, Massachusetts, USA.

    • Ramnik J Xavier

Contributions

C.L. and D.G. conceived the project, C.L. designed and implemented the algorithm, C.L., D.G. and R.J.X. designed the experiments, and C.L. performed the analysis. M.K., H.S., D.G. and R.J.X. collected and sequenced the samples. C.L., R.K., R.J.X. and D.G. wrote the paper.

Competing financial interests

The authors declare no competing financial interests.

Corresponding authors

Correspondence to:

Author details

Supplementary information

Supplementary Figures

  1. Supplementary Figure 1: Minimum requirements for sequencing depth and species’ relative abundance for ConStrains analysis based on 10x coverage cutoff (95 KB)

    Gray lines mark the boundaries for associated genome size; the qualified space is the upper right hand side of the boundary. The boundaries are calculated as the sequencing throughput (in Gbp), S, needed for a 10-fold coverage over a species with relative abundance, r%, and average genome size of g Mbp as S = glr. Note that a sequence depth across the whole genome is correlated with depth of the marker genes such that the larger the genome size, the more sequencing will be required to result in a 10x coverage in these marker genes (and overall genome), when keeping other factors (including relative abundance) constant.

  2. Supplementary Figure 2: ConStrains’ intra-species phylogenetic sensitivity in detecting strains. (249 KB)

    (a) A neighbor-joining (NJ) tree is shown based on average nucleotide identity (ANI) of the 62 complete E. coli genomes from NCBI used in assessing ConStrains’ sensitivity towards genome relatedness. (b) The ANI distribution of all genome pairs among the 62 genomes (n = c2 = 1,891) covers the typical intra-species ANI range, 97%-100%. Representative 62 genome pairs were randomly selected to synthesize Illumina reads of strain mixtures as described in online methods. For simplicity, all in silico-synthesized Illumina read sets followed a 3:1 strains mixing ratio. (c) Though the number of informative SNP sites and the genome relatedness are strongly negatively correlated, ConStrains captured sufficient (>10) informative SNPs in 99.5% of all sets. (d) Among the 99.5% of all analyzable sets, ConStrains robustly recovered strain profiles with high precision (low JSD error rate). (e) At each divergence level (highlighted by red solid line along the tree shown in a), we show the three E. coli strains drawn to represent the branch (branches identified by blue circles, selected strains identified by red circles next to strain names in a) along with the corresponding predicted composition and JSD errors in comparison to the true composition.

  3. Supplementary Figure 3: In silico test sets simulated by mixing ART-generated Illumina paired-end reads of E. coli strains at different depths with corresponding ConStrains performance. (94 KB)

    (a) Unrooted tree on the left was constructed from concatenated nucleotide sequences of core genes shared between these ten E. coli strains; the heatmap on the right shows the coverage of each strain (rows) in each data set (columns), separated by the number of strains it contains, and ranked by its diversity measured by Shannon entropy (top panel). (b) Corresponding ConStrains performance is shown; graphs show the same data as Figure 2b with different y-axis values to increase readability. No significant differences in accuracy were observed between +LC, +MC, or +HC and pure predictions (two-tailed P = 0.536, 0.319, and 0.48 for +LC, +MC, and +HC, respectively, paired t-test; Supplementary Note 2).

  4. Supplementary Figure 4: Comparisons between the predictions by ConStrains and Sigma over in silico E. coli data sets. (138 KB)

    The grid represents the same strain admixtures as described in Figure 2. ConStrains’ predictions were based on a single E. coli reference genome (1-Ref.). Sigma’s predictions are shown based on one reference genome (1-Ref.), three reference genomes (3-Ref.), and all ten E. coli genomes used to simulate the admixtures (10-Ref.).

  5. Supplementary Figure 5: Prediction of strain composition according to the number of core gene SNPs recombined between strains (53 KB)

    Numbers next to circle mark the exact number of SNPs recombined in silico.

  6. Supplementary Figure 6: The predicted Staphylococcus epidermidis strain profile from time-series metagenomes reported by Sharon et al, with comparison to the original relative abundance of strains inferred from de novo-assembled strain genome scaffolds with manual curation. (118 KB)

    N/A.

  7. Supplementary Figure 7: Factors that affect the accuracy of ConStrains analysis in the year-long simulation. (163 KB)

    (a) The green reference strain is significantly more divergent than the other four reference strains (one-tailed P = 3.5 × 10-12, t-test). (b-d) Relationships between prediction accuracy measured by JSD (y-axis of panels b-c) and the complexity of samples (Shannon index, x-axis; panel b) and the coverage of samples (x-axis; panel c). In c, the 10x cutoff for coverage is marked by the vertical dashed green line. A significant (P = 0.452, Pearson’s correlation) negative correlation between JSD and sample Shannon index was observed (b and d).

  8. Supplementary Figure 8: Overview of times-series metagenomes from the infant gut development study. (55 KB)

    Nine subjects (horizontal lines) were chosen and the associated sampling points (solid circles) are sorted along the longitudinal axis (with time on the x-axis).

  9. Supplementary Figure 9: Overview of strains inferred by ConStrains for the infant gut microbiome development cohort. (170 KB)

    (a) The uncollapsed tree shows strain-level resolution of the same tree shown in Figure 5a. (b) The average number of strains per species per subject is shown.

  10. Supplementary Figure 10: Examples of potential linkage (FDR < 0.5) between intra- specific alpha diversity and the corresponding species’ relative abundance in the community. (187 KB)

    N/A

  11. Supplementary Figure 11: ConStrains analysis reveals associations only observable at the strain level in the infant gut development cohort. (274 KB)

    For each subject, significant association networks between strains were identified, whereas no species-level significant associations (FDR < 0.05) were observed. In network diagrams, each node represents a species, and the edges connecting nodes represent strains of the corresponding species that were significantly associated. The width of the edges is proportional to the number of pairs of associated strains, and the color of the edges is color-coded for the direction of associations. Below the network is the corresponding heatmap, whose upper right triangle represents the number of positively associated strains and the lower left triangle represents the number of negatively associated strains. The blue dashed oval captures the relationship between R. torques and S. wadsworthensis detailed in Supplementary Figure 12.

  12. Supplementary Figure 12: Examples between R. toques and S. wadsworthensis of subject 8 as highlighted in Supplementary Figure 11. (55 KB)

    At strain level (left panels), a significant positive association was found between the two highlighted strains of the two species. In contrast, no significant associations were found at the species level (right panels).

PDF files

  1. Supplementary Text and Figures (1,052 KB)

    Supplementary Figures 1–12

  2. Supplementary Notes (247 KB)

Excel files

  1. Supplementary Table 1 (13 KB)
  2. Supplementary Table 2 (14 KB)
  3. Supplementary Table 3 (11 KB)
  4. Supplementary Table 4 (63 KB)
  5. Supplementary Table 5 (14 KB)

Zip files

  1. Supplementary Code (40 KB)

Additional data