Original code from P. Dirksen

medium time bacteria ID type DNA_batch lms
CB4856:6 0h : 2 cembio:17 116-Cembio: 1 Lawn : 3 Min. :1 116-Cembio: 1
Lawn :3 120h:15 117-Cembio: 1 Seed : 2 1st Qu.:1 117-Cembio: 1
N2 :6 22-Cembio : 1 worms:12 Median :1 22-Cembio : 1
Seed :2 23-Cembio : 1 Mean :1 23-Cembio : 1
24-Cembio : 1 3rd Qu.:1 24-Cembio : 1
4-Cembio : 1 Max. :1 4-Cembio : 1
(Other) :11 (Other) :11

Check for obvious contaminants

Figure S3: Taxonomic composition of all samples on class level. Taxonomic composition is Gamma-, Alphaproteobacteria, and Bacteroidia, which is what we would expect based on the CeMBio strains. Few samples contain the remaining detected classes, which are most likely reagent contaminations. Sample 27 contains also Bacilli reads, which were not among the experimental strains, but among the mock community.

Identifying unresolved ASVs representing the CeMBio community

The total number of ASVs in the whole dataset is 195. However, only 16 ASVs are needed to account for 99.9% of all reads:

Figure S4: Cumulative proportion of reads. In total 16 ASVs account for 99.87% of all reads.

Merging ASVs belonging to the same CeMBio strain

Out of these 16 ASVs, 12 were identical in sequence to CeMBio 16S sequences, while 4 could not be resolved to strain level, likely due to sequencing artifacts despite denoising with dada2.

No Family Genus Species
1 Xanthomonadaceae Stenotrophomonas
2 Moraxellaceae Acinetobacter
3 Sphingobacteriaceae Sphingobacterium
4 Erwiniaceae
5 Enterobacteriaceae
6 Rhizobiaceae Brucella
7 Comamonadaceae Limnohabitans
8 Weeksellaceae Chryseobacterium
9 Pseudomonadaceae Pseudomonas
10 Pseudomonadaceae Pseudomonas
11

In order to resolve these ambigous ASVs, BLAST analysis was performed against the genome-derived 16S sequences of the CeMBio strains. As a result, the ambigous ASV were assigned the following identities:

query acc.ver subject acc.ver % identity bit score evalue
ASV001-Xanthomonadaceae-Stenotrophomonas- JUb19 100 462 0
ASV002-Moraxellaceae-Acinetobacter- MYb10 100 462 0
ASV003-Sphingobacteriaceae-Sphingobacterium- BIGb0170 100 462 0
ASV004-Erwiniaceae– BIGb0393 100 462 0
ASV005-Enterobacteriaceae– CeEnt1 100 462 0
ASV006-Rhizobiaceae-Brucella- MYb71 100 462 0
ASV007-Comamonadaceae-Limnohabitans- BIGb0172 100 462 0
ASV008-Weeksellaceae-Chryseobacterium- JUb44 100 462 0
ASV009-Pseudomonadaceae-Pseudomonas- MSPm1 100 462 0
ASV010-Pseudomonadaceae-Pseudomonas- MYb11 100 462 0
ASV011— JUb134 100 462 0

Finally, the ASV belonging to the same organism were merged, leading to the following final ASVs:

No Family Genus Species ASV
1 Xanthomonadaceae Stenotrophomonas JUb19 ASV001
2 Moraxellaceae Acinetobacter BIGb0170 ASV002
3 Sphingobacteriaceae Sphingobacterium MYb10 ASV003
4 Erwiniaceae MYb71 ASV004
5 Enterobacteriaceae CEnt1, JUb66 ASV005
6 Rhizobiaceae Brucella JUb44 ASV006
7 Comamonadaceae Limnohabitans BIGb0172 ASV007
8 Weeksellaceae Chryseobacterium BIGb0393 ASV008
9 Pseudomonadaceae Pseudomonas MYb11 ASV009
10 Pseudomonadaceae Pseudomonas MSPm1 ASV010
11 JUb134 ASV011

Adjusting counts by rRNA copy number

We have all the genomes and information on rRNA gene number per strain. This data can be used to adjust the raw reads counts by gene copy number to enhance the estimate of relative cell counts.

BIGb0170 BIGb0172 BIGb0393 CEnt1, JUb66 JUb19 JUb44
7 6 7 15 4 7
JUb134 MYb10 MYb11 MYb71 MSPm1 NA
3 7 5 4 4

Table S1: Taxonomic composition of worms raised on NGM and PFM agar plates.

Medium Species Mean prop. Cum. prop.
CB4856 JUb19 0.6966873 0.6966873
CB4856 BIGb0172 0.0574088 0.7540961
CB4856 MYb71 0.0570642 0.8111603
CB4856 JUb44 0.0549970 0.8661572
CB4856 MYb10 0.0526645 0.9188217
CB4856 BIGb0170 0.0334835 0.9523053
CB4856 BIGb0393 0.0184223 0.9707276
CB4856 MYb11 0.0146180 0.9853456
CB4856 CEnt1, JUb66 0.0119321 0.9972777
CB4856 MSPm1 0.0026627 0.9999404
CB4856 JUb134 0.0000596 1.0000000
Medium Species Mean prop. Cum. prop.
N2 JUb19 0.7057277 0.7057277
N2 MYb71 0.1089697 0.8146974
N2 MYb10 0.0542124 0.8689098
N2 BIGb0170 0.0421213 0.9110312
N2 BIGb0172 0.0321742 0.9432053
N2 JUb44 0.0321201 0.9753254
N2 BIGb0393 0.0128013 0.9881267
N2 MYb11 0.0077619 0.9958887
N2 CEnt1, JUb66 0.0031181 0.9990067
N2 MSPm1 0.0008590 0.9998658
N2 JUb134 0.0001342 1.0000000
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  estimate_richness(ps_exp)$InvSimpson and paste(sample_data(ps_exp)$med_type, sample_data(ps_exp)$time) 
## 
##                CB4856 worms 120h Lawn Lawn 120h N2 worms 120h
## Lawn Lawn 120h 0.0112            -              -            
## N2 worms 120h  0.7972            0.0093         -            
## Seed Seed 0h   3.2e-09           8.3e-08        3.2e-09      
## 
## P value adjustment method: fdr

Figure 1: Taxonomic composition of colonized C. elegans nematodes and plate lawns. (A) Proportion of CeMBio reads in the initial community assembly used as inoculum for the lawns. (B) Proportion of CeMBio reads in N2 and CB4856 nematodes and lawn samples. (C) Alpha diversity measures of mean observed no. of species (top) and Inverse Simpson Index (bottom) with standard deviation indicating richness and diversity of the communities.

Correlation of bacterial composition and load

Figure 2: Bacterial load of C. elegans nematodes colonized by the CeMBio community (A) Estimated CFU count in single nematodes. (B) Principle coordinate analysis of Bray Curtis distances. CFU-load, overlayed as a smooth response surface, is a significant predictor of the ordination result (Generalized additive model, df = 15, F = 2.523, p < 10^-5, R-square = 0.57)

## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## y ~ poly(x1, 1) + poly(x2, 1)
## 
## Parametric coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  4.17214    0.07678  54.337 1.37e-05 ***
## poly(x1, 1)  0.04209    0.18808   0.224   0.8373    
## poly(x2, 1) -0.44397    0.18808  -2.361   0.0994 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## R-sq.(adj) =   0.42   Deviance explained = 65.2%
## -ML = -3.5912  Scale est. = 0.035374  n = 6

Differential abundance of bacteria between worms and lawns

Beta diversity

Figure: Effect of medium and developmental time on microbiome diversity. A Differential abundance of the CeMBio strains in C. elegans nematodes compared to the plate lawns. Positive fold change indicates increased abundance in worms compared to lawns. Data was normalized and analysed using DESeq2. Filled points indicate fold changes significantly different from 0 for with a p < 0.01. B PCoA with Bray-Curtis distance. Ellipses denote lawn and worm samples, respectively.

Figure 2

Session information

## R version 3.5.3 (2019-03-11)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS Mojave 10.14.6
## 
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
##  [1] grid      stats4    parallel  stats     graphics  grDevices utils    
##  [8] datasets  methods   base     
## 
## other attached packages:
##  [1] vegan_2.5-6                 lattice_0.20-41            
##  [3] permute_0.9-5               forcats_0.5.0              
##  [5] stringr_1.4.0               dplyr_0.8.5                
##  [7] purrr_0.3.3                 readr_1.3.1                
##  [9] tidyr_1.0.2                 tibble_3.0.0               
## [11] tidyverse_1.3.0             qgraph_1.6.5               
## [13] RColorBrewer_1.1-2          png_0.1-7                  
## [15] phyloseq_1.26.1             ggthemes_4.2.0             
## [17] ggpubr_0.2.5                magrittr_1.5               
## [19] ggplot2_3.3.0               ggnewscale_0.4.1           
## [21] gridExtra_2.3               DESeq2_1.22.2              
## [23] SummarizedExperiment_1.12.0 DelayedArray_0.8.0         
## [25] BiocParallel_1.16.6         matrixStats_0.56.0         
## [27] Biobase_2.42.0              GenomicRanges_1.34.0       
## [29] GenomeInfoDb_1.18.2         DECIPHER_2.10.2            
## [31] RSQLite_2.2.0               Biostrings_2.50.2          
## [33] XVector_0.22.0              IRanges_2.16.0             
## [35] S4Vectors_0.20.1            BiocGenerics_0.28.0        
## 
## loaded via a namespace (and not attached):
##   [1] readxl_1.3.1           backports_1.1.6        Hmisc_4.4-0           
##   [4] BDgraph_2.62           plyr_1.8.6             igraph_1.2.5          
##   [7] splines_3.5.3          digest_0.6.25          foreach_1.5.0         
##  [10] htmltools_0.4.0        fansi_0.4.1            checkmate_2.0.0       
##  [13] memoise_1.1.0          cluster_2.1.0          annotate_1.60.1       
##  [16] modelr_0.1.6           jpeg_0.1-8.1           colorspace_1.4-1      
##  [19] rvest_0.3.5            blob_1.2.1             haven_2.2.0           
##  [22] xfun_0.13              crayon_1.3.4           RCurl_1.98-1.1        
##  [25] jsonlite_1.6.1         genefilter_1.64.0      survival_3.1-12       
##  [28] iterators_1.0.12       ape_5.3                glue_1.4.0            
##  [31] gtable_0.3.0           zlibbioc_1.28.0        Rhdf5lib_1.4.3        
##  [34] abind_1.4-5            scales_1.1.0           DBI_1.1.0             
##  [37] Rcpp_1.0.4.6           isoband_0.2.1          viridisLite_0.3.0     
##  [40] xtable_1.8-4           htmlTable_1.13.3       foreign_0.8-76        
##  [43] bit_1.1-15.2           Formula_1.2-3          httr_1.4.1            
##  [46] htmlwidgets_1.5.1      lavaan_0.6-5           acepack_1.4.1         
##  [49] ellipsis_0.3.0         farver_2.0.3           pkgconfig_2.0.3       
##  [52] XML_3.99-0.3           nnet_7.3-13            dbplyr_1.4.2          
##  [55] locfit_1.5-9.4         labeling_0.3           tidyselect_1.0.0      
##  [58] rlang_0.4.5            reshape2_1.4.4         AnnotationDbi_1.44.0  
##  [61] cellranger_1.1.0       munsell_0.5.0          tools_3.5.3           
##  [64] cli_2.0.2              generics_0.0.2         ade4_1.7-15           
##  [67] broom_0.5.5            fdrtool_1.2.15         evaluate_0.14         
##  [70] biomformat_1.10.1      yaml_2.2.1             fs_1.4.1              
##  [73] knitr_1.28             bit64_0.9-7            glasso_1.11           
##  [76] pbapply_1.4-2          nlme_3.1-147           whisker_0.4           
##  [79] xml2_1.3.1             compiler_3.5.3         rstudioapi_0.11       
##  [82] ggsignif_0.6.0         reprex_0.3.0           huge_1.3.4.1          
##  [85] geneplotter_1.60.0     pbivnorm_0.6.0         stringi_1.4.6         
##  [88] highr_0.8              Matrix_1.2-18          psych_1.9.12.31       
##  [91] multtest_2.38.0        vctrs_0.2.4            pillar_1.4.3          
##  [94] lifecycle_0.2.0        cowplot_1.0.0          data.table_1.12.8     
##  [97] bitops_1.0-6           corpcor_1.6.9          R6_2.4.1              
## [100] latticeExtra_0.6-28    codetools_0.2-16       MASS_7.3-51.5         
## [103] gtools_3.8.2           assertthat_0.2.1       rhdf5_2.26.2          
## [106] rjson_0.2.20           withr_2.1.2            mnormt_1.5-6          
## [109] GenomeInfoDbData_1.2.0 hms_0.5.3              mgcv_1.8-31           
## [112] rpart_4.1-15           rmarkdown_2.1          d3Network_0.5.2.1     
## [115] lubridate_1.7.8        base64enc_0.1-3