Variance in C. elegans gut bacterial load suggests complex host-microbe dynamics
Data files
Abstract
Variation in bacterial composition inside a host is a result of complex dynamics of microbial community assembly, but little is known about these dynamics. To deconstruct the factors that contribute to this variation, we used a combination of experimental and modeling approaches. We found that demographic stochasticity and stationary heterogeneity in the host carrying capacity or bacterial growth rate are insufficient to explain quantitatively the variation observed in our empirical data. Instead, we found that the data can be understood if the host-bacteria system can be viewed as stochastically switching between high and low growth rates phenotypes. This suggests the dynamics significantly more complex than logistic growth used in canonical models of microbiome assembly. We develop mathematical models of this process that can explain various aspects of our data. We highlight the limitations of snapshot data in describing variation in host-associated communities and the importance of using time-series data along with mathematical models to understand microbial dynamics within a host.
All the data required to generate the figures are assumed to be in a subfolder named "Data" and all the corresponding code is assumed to be in a subfolder named "code". These folders are provided as "Data.zip" and "code.zip". Output Numpy data files (.npy) for Maximum likelihood estimation (Figure 3) are also in the subfolder "code".
"GreenBeadFeed1219.csv" is derived from a Biosorter output data file, in which each row is one event detected by the machine. In Biosorter data, NAs appear when a label is irrelevant and where a channel summary statistic was not calculated. Files include machine-reported columns:
- "Id" - Unique index of each event within the run
- "Time" - Time of event relative to start of run
- "Plate", "Row", and "Column" - IFF objects were sorted into a multi-well plate from this run, the plate number, row, and column of the destination for the event
- "SourceWell" - IFF samples were taken out of a multi-well plate, the row + column of the well associated with the event
- "Clog" - Binary variable indicating whether the machine clogged on this event
- "Sorted" - Code indicating sort status of the event. "0" if not sorted; "6" if sorted as a clean, single event.
- "InRegions" - Binary string indicating the gates into which an event fell, from right to left. The number of digits is equal to the total number of gates defined during a run. The right-most position is gate R1 (all acquired events) and will be 1 for all saved events. In the standard setup used for these experiments, the second position from right (gate R2) is defined on extinction and time of flight (TOF) to include adult-sized worms. Subsequent gates are typically defined in part on fluorescence.
- "TOF" - Time of flight. Time required for the object to pass through the detector.
- "Extinction" - Roughly, the amount of light (here, using 488 nm laser) blocked by the object, integrated over time of flight. Similar to absorbance.
- "Green","Yellow", and "Red" - Integrated emitted signal intensity over the total length of the object, in arbitrary units. Not all channels may have been recorded/reported, in which case values appear as NA.
- "PHExtinction","PWExtinction","PCExtinction" - Peak height (PH), peak width (PW), and peak integrated volume (PC) for the dominant peak in the extinction channel. Any statistics not calculated appear as NA.
- "PHGreen","PWGreen","PCGreen" - Same peak statistics for green fluorescence channel.
- "PHYellow","PWYellow","PCYellow" - Same peak statistics for yellow fluorescence channel.
- "PHRed","PWRed","PCRed" - Same peak statistics for red fluorescence channel.
In data file "GreenBeadFeed1219.csv", each row therefore represents one individual worm. Columns are as described above for Biosorter standard files, plus:
- "Host" - Genotype of the worm host
- "Concentration" and "Rep" - Unused fields
- "Bact" - Bacterial food provided in addition to inert beads ("none" or "HKOP50", the latter indicating heat-killed E. coli OP50)
- "SourceRow" and "SourceColumn" - IFF samples were taken out of a multi-well plate, the row + column of the well associated with the event, as separate colums
- "Beads" - Relative concentration of inert fluorescent beads to which worms were exposed, as described in Methods
Data files "CFU Mapping.csv", "LowInh24.csv", and "Inhibition_compiled.csv" were derived by merging Biosorter data with corresponding plating data. Each row represents one individual adult worm. Columns are:
- Condition - Treatment condition. Chloramphenicol-treated worms are labeled as "CMXX", where "XX" is the concentration of antibiotic in ug/mL
- Time - Time on antibiotic, in hours (string)
- timefit - Time after sorting, in hours (numeric)
- Row and Column - Biosorter data columns, as described above
- Gate - Fluorescence gate associated with each worm, translated from the original binary string
- TOF, Extinction, and Green - Biosorter data columns, as described above
- logGreen - log10-transformed total green fluorescence (Green)
- CFU/worm and logCFU - CFU count-derived data columns, as described above
Data files "Migration_Compiled.csv", "Migration_run2_Compiled.csv", and "Migration_T0_fill.csv" were extracted from Biosorter data and used for model fitting.
- Time - Time since sorting of pre-colonized adult worms, in hours (string)
- timefit - As "Time" (numeric)
- Row, Column, Sorted, InRegions - Biosorter data columns, as described above
- Condition - Type of worm sorted (high/mid/low fluorescence) and treatment (+/- re-feeding with live fluorescent bacteria)
- Gate - Fluorescence gate associated with each worm, translated from the original binary string
- TOF, Extinction, and Green - Biosorter data columns, as described above
- logGreen - log10-transformed total green fluorescence (Green)
In data file "WormShedCFU.csv", each row represents one individual worm. Columns are:
- "Bact" - Abbreviation used for bacterial genus +species
- "Run" - Unique index of the replicate run from which these data were taken
- "Date" - Date of the experiment, as YYYYMMDD
- "Row" and "Column" - Destination well into which the worm was sorted, if sorted as single worms
- "Time" - Time after sorting, in hours (string)
- "InfectTime" - Duration of exposure to the infecting bacteria
- "Bin" - Coarse fluorescence bin from which each worm was sorted (low, mid. high)
- "ID" - Unique index of each worm within run
- "Count" - Number of colonies counted after serial dilution and plating of worm digest
- "D" - 10-fold dilution at which colonies were counted
- "CFU" and "logCFU" - Raw and log10-transformed CFU/worm calculated from plating data
In files containing colony forming unit (CFU) data for worm native microbiome members (MYb27.csv, MYb45.csv, MYb53.csv, MYb71.csv, MYb120.csv, MYb238.csv, MYbSpecies.csv), each row represents one individual worm. Empty rows containing NA values for CFU and logCFU were added as placeholders when needed to achieve a rectangular data structure for plotting. Files include columns:
- MYbSp - Species ID of the bacteria
- Time - Time (in hours)
- CFU - Colony forming units (CFUs) in the intestine, as determined by serial dilution and plating
- logCFU - Log10-transformed CFU data. When CFU count was 0, logCFU is also assigned a value of 0 for plotting.
Files "MYb71 CD.csv" and "MYb120 CD.csv" contain CFU data from experiments where worms were exposed to different densities of bacteria during colonization.
- Density - Bacterial density, in CFU/mL
- Time - Time in hours over which worms were exposed to colonizing bacteria (numeric)
- CFU - Colony forming units (CFUs) in the intestine, as determined by serial dilution and plating
- logCFU - Log10-transformed CFU data. When CFU count was 0, logCFU is also assigned a value of 0 for plotting.
File "invitro_082819.csv" contains plate reader data from an experiment in which optical density at 600 nm (OD600) was read over time as a proxy for microbial growth.
- "T_hours" and "T_mins" indicate the time since the start of run, in hours and minutes respectively
- "Blank" - OD600 data in the blank well (media only)
- "BactSpecies_Replicate" - All remaining columns are named in this format and contain OD600 data for the indicated replicate well of the indicated bacterial species
Sharing/access information
Link to other publically accessible source of the data and code:
Code/software
Analysis notebooks are independent and can be run in any order.
Analyses were done with the following package versions:
- python: 3.11.4
- matplotlib: 3.7.1
- scikit-learn: 1.3.0
- pandas: 1.5.3
- numpy: 1.24.3
- scipy: 1.10.1
- seaborn: 0.12.2
Figure 1
Figure 1 in the main text is generated in notebook "WormMatters_Fig1.ipynb" using data files:
- MYbSpecies.csv - datafile with bacterial loads inside worms for all the bacterial species
- invitro_082819.csv - datafile with bacterial growth outside the worm
- MYb71.csv - datafile with bacterial loads for the species MYb71
- MYb120.csv - datafile with bacterial loads for the species MYb120
Figure 2
Figure 2 in the main text is generated in notebook "HetCarryingCap_fig2.ipynb" using data files:
- MYb71 CD.csv - datafile with bacterial loads for the species MYb71 at different colonization densities
- MYb120 CD.csv - datafile with bacterial loads for the species MYb120 at different colonization densities
Figure 3
Figure 3 in the main text is generated in notebook "HetGrowthCol_Fig3.ipynb" using data files:
- MYb71.csv - datafile with bacterial loads for the species MYb71
- MYb120.csv - datafile with bacterial loads for the species MYb120
Bacteria-specific MLE parameters for the logistic growth model are generated in notebooks "MLE Gridsearch for MYb71.ipynb" and "MLE Gridsearch for MYb120.ipynb" using the same data files. The resulting likelihood values are saved as Numpy files "likelihoodvals_MYb71.npy" and "likelihoodvals_MYb120.npy", and parameters are saved as "allparameters_MYb71.npy" and "allparameters_MYb120.npy".
Figure 4
Figure 4 in the main text is generated in notebook "Inhibition_Fig4.ipynb" using data file:
- Inhibition_compiled.csv - datafile with bacterial loads for MYb14 under varying levels of chloramphenicol inhibition (25-500 ug/mL) and over time
Figure 5
Figure 5 in the main text is generated in notebook "Migration_Fig5.ipynb" using data files:
- Migration_compiled.csv - datafile with Biosorter data for worms colonized with MYb14-GFP, 24 and 48 hours after being sorted into "low" and "high" GFP gates
- Migration_T0_fill.csv - datafile with Biosorter data for the initial population of MYb14-GFP colonized worms, from which the initial low/high sort was carried out
Figure 6, 8, and 9
Figures 6, 8, and 9 in the main text are generated in notebook "MultistabilityModelSimulations_Fig6.ipynb". No data files are called.
Figure 7
The GFP to CFU mapping in Figure 7 is generated in notebook "MappingGFPtoCFU.ipynb" using data files:
- CFU Mapping.csv - datafile with bacterial loads for the species MYb14 and the corresponding GFP reads in the experiment shown in Figure 6 in SI.
- LowInhT24.csv - datafile with bacterial loads for the species MYb14 and the corresponding GFP reads in the lowest-inhibition condition (chloramphenicol 25 ug/mL, no inhibition of bacterial growth inside worms) also shown in Figure 4
SI Text
Figure A in SI Text. Bacterial load in individual worms over time.
Figure A is generated in notebook "SI_Monocolonization.ipynb" and calls data files:
- MYb27.csv
- MYb45.csv
- MYb53.csv
- MYb238.csv
each of which contains data for bacterial loads of the indicated species in individual worms, in the same format as used in Figure 1.
Figure B in SI Text. Fluorescent bead accumulation in adult worms
Figure B is generated in R script "SI_GreenBeadAccumulationN2.R" and calls data file:
- GreenBeadFeed1219.csv - datafile with Biosorter data for N2 worms allowed to ingest green fluorescent beads
Figure C in SI Text. Bacterial load distributions under additional levels of inhibition of growth within hosts.
Figure C is generated in notebook "SI_Inhibition.ipynb" using data file:
- Inhibition_compiled.csv - datafile with bacterial loads for MYb14 under varying levels of chloramphenicol inhibition (25-500 ug/mL) and over time. Also used in Figure 4.
Figure D in SI Text. Bacterial load switching between modes in an additional experimental run
Figure D is generated in notebook "SI_Migration.ipynb" using data file:
- Migration_run2_Compiled.csv - datafile with Biosorter data for worms colonized with MYb14-GFP as in Figure 5, but representing an independent run of the experiment
Figure E. State switching in N2 adults colonized with Salmonella enterica LT2
Figure E is generated in R script "SI_SEStateSwitch.R" using data file:
- WormShedCFU.csv - datafile containing bacterial load data from a separate set of experiments, including colonization (bacterial load) data for individual worms exposed to GFP-labeled Salmonella enterica and sorted into low- and high-GFP bins
Figure F. Probability distributions of GFP and CFU data
Figure F is generated in notebook "MappingGFPtoCFU.ipynb" using data files as in Figure 7.
Figure G (Predictions of dynamics in the 6th order polynomial potential (5th order force) model) and H (Predictions of dynamics in the state switching model)
Figures G and H are generated in notebook "MultistabilityModelSimulations_Fig6.ipynb". No data files are called.
