Skip to content

segrelab/EnvironmentalComplexity

 
 

Repository files navigation

CODE SUMMARY:

This directory contains two executable MATLAB scripts used to generate the main data figures:

1. analyzeYield.m: processes OD600 growth data from 'com3', 'com4', and 'com13' experiments to analyze and plot biomass yields according to environmental complexity.

2. analyzeTaxonomy.m: processes 16s read data from 'com13' experiment to analyze and plot taxonomic diversity metrics.

Both scripts use experimental data from the 'dataExperimental' directory as inputs, as well as simulated data from the 'dataComsumerResource' for epistasis comparisons.
	
	Experimental data files: 
		- dataExperimental/com3_4_13_OD_288h.xlsx. An .xlsx file containing plate reader spectrophotometer OD600 growth data for com3, com4, and com13.
		- dataExperimental/level-7_Taxonomy.xlsx. An .xlsx file containing processed 16s sequencing read data for the com13 community experiment.

	Simulated data files:
		- dataConsumerResource/epistasisS13_N32_G0_RS50_nSM10.mat
		- dataConsumerResource/epistasisS13_N32_GV_RS50_nSM10.mat
		- dataConsumerResource/epistasis_serialDilution_S13_N32_G0_RS50_nSM10.mat
		- dataConsumerResource/epistasis_serialDilution_S13_N32_GV_RS50_nSM10.mat

		All are .mat files containing consumer resource model data generated by the 'solveCRMGeneric.m' script with or without a serial dilution regime. The first and third contain data for a consumer resource model in which no organisms are generalists (CRM-A), and the second and fourth contains data for a model in which the generalist-specialist balance of organisms are based on the organisms used in the com13 experiment (CRM-B).

	Scripts for running consumer resource simulations are located in the 'scriptsConsumerResource' directory. Please refer to the 'readme.txt' file within this directory for more details.

SYSTEM REQUIREMENTS:
	Software: MATLAB R2020a or newer.
	Tested on: Mac OS X Mojave, Catalina, and Big Sur; Windows 10
	Non-standard hardware requirements: None

INSTALLATION GUIDE:
	Instructions: Please refer to the MATLAB installation guide at www.mathworks.com/help/install/install-products.html for detailed instructions and for typical installation times.

DEMO:
	Instructions: Both 'analyzeYield.m' and 'analyzeTaxonomy.m' are designed to run as standalone functions within the root directory.
	Expected outputs:
		- For analyzeYield.m: Three figures corresponding to Figure 2 and Supplementary Figure 7a in the manuscript, which show the biomass yields and yield epistasis metrics of com3, com4, and com13, as well as a comparison to CRM data.
		- For analyzeTaxonomy.m: 10 figures reproducing key results pertaining to the taxonomic distributions observed in the com13 experiment and compared to CRM results. These figures correspond to Figure 3a,c,d,f-h in the main text, as well as Supplementary Figures 10a,c and 11a.
	Expected run time: ~10-20 seconds for each script.

INSTRUCTIONS FOR USE:
	Please refer to 'DEMO' section above for instruction on reproducing results in the manuscript, as well as the header of each script for more specific details on data inputs.

LICENSE:
	This project is licensed under the terms of the MIT license.

About

Scripts for analyzing multispecies microbial community yields and taxonomic composition as functions of environmental complexity. Includes code to run and analyze consumer resource model simulations.

Resources

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • MATLAB 100.0%