# The Community Simulator: A Python package for microbial ecology

**Authors:** Robert Marsland III, Wenping Cui, Joshua Goldford, Pankaj, Mehta

arXiv: 1904.09367 · 2020-07-01

## TL;DR

The Community Simulator is an open-source Python package that enables scalable, reproducible simulations of microbial community dynamics, incorporating advanced algorithms for equilibrium finding and supporting complex ecological modeling.

## Contribution

It introduces a comprehensive Python toolkit with novel EM algorithms for efficient equilibrium computation and flexible modeling features for microbial ecology simulations.

## Key findings

- EM algorithm improves performance by 10-100x over direct integration
- Supports large-scale, reproducible microbial community simulations
- Facilitates analysis of microbiome data and ecological dynamics

## Abstract

Natural microbial communities contain hundreds to thousands of interacting species. For this reason, computational simulations are playing an increasingly important role in microbial ecology. In this manuscript, we present a new open-source, freely available Python package called Community Simulator for simulating microbial population dynamics in a reproducible, transparent and scalable way. The Community Simulator includes five major elements: tools for preparing the initial states and environmental conditions for a set of samples, automatic generation of dynamical equations based on a dictionary of modeling assumptions, random parameter sampling with tunable levels of metabolic and taxonomic structure, parallel integration of the dynamical equations, and support for metacommunity dynamics with migration between samples. To significantly speed up simulations using Community Simulator, our Python package implements a new Expectation-Maximization (EM) algorithm for finding equilibrium states of community dynamics that exploits a recently discovered duality between ecological dynamics and convex optimization. We present data showing that this EM algorithm improves performance by between one and two orders compared to direct numerical integration of the corresponding ordinary differential equations. We conclude by listing several recent applications of the Community Simulator to problems in microbial ecology, and discussing possible extensions of the package for directly analyzing microbiome compositional data.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1904.09367/full.md

## Figures

6 figures with captions in the complete paper: https://tomesphere.com/paper/1904.09367/full.md

## References

37 references — full list in the complete paper: https://tomesphere.com/paper/1904.09367/full.md

---
Source: https://tomesphere.com/paper/1904.09367