####################################### mgrowthctrl: Microbiome Growth Control ####################################### `mGrowthCtrl` is a software package for modeling, visualizing, and controlling microbiome growth dynamics. It provides tools to simulate microbial community behavior, fit predictive models to experimental data, and adjust community composition using control and optimization methods. The package can be connected via an API to `mGrowthDB`_, a curated database that provides microbiome growth data for model calibration, validation, and exploratory analysis. .. _mGrowthDB: https://mgrowthdb.gbiomed.kuleuven.be/ Example Usage ============= .. code-block:: python from mgrowthctrl.models import CRModel, CRModelParams from mgrowthctrl.models.base import ModelNames from mgrowthctrl.utils.data import Dataloader # Load experimental data, detecting names of consumer and resource columns: data = Dataloader() data.load_local_data( "examples/datasets/BT_WC_export.csv", x_selector="BT counts" ) print(data.names) # Initialize model parameters params = CRModelParams.from_shapes(n=len(data.X_names), m=len(data.S_names)) # Create and fit the model model = CRModel(names=data.names, params=params) model.fit(df=data.df, time_col=data.time_col) # Simulate trajectories and print the resulting data: sim = model.simulate(data.y0, data.t) print(sim) .. toctree:: :hidden: :maxdepth: 1 :caption: Get Started intro/installation intro/get_started .. toctree:: :hidden: :maxdepth: 1 :caption: Tutorials tutorials/simple_crm tutorials/advanced_open_loop_control_fitting tutorials/advanced_closed_loop_control_fitting .. toctree:: :hidden: :maxdepth: 1 :caption: Models models/consumer_resource_model models/diauxic_shift_model models/base_model .. toctree:: :hidden: :maxdepth: 1 :caption: Parameter Fitting fitting/lsq fitting/mcmc .. toctree:: :hidden: :maxdepth: 1 :caption: Control & Optimization control/introduction control/open_loop control/closed_loop control/base .. toctree:: :hidden: :maxdepth: 1 :caption: Utilities utilities/data_loader utilities/visualization utilities/saving