├── #index.rst# ├── .gitattributes ├── .github └── workflows │ └── publish_docs.yml ├── .readthedocs.yaml ├── CODE_OF_CONDUCT.md ├── LICENSE ├── MANIFEST ├── Makefile ├── README.md ├── __pycache__ └── comets.cpython-35.pyc ├── build └── lib │ └── cometspy │ ├── __init__.py │ ├── comets.py │ ├── layout.py │ ├── model.py │ ├── params.py │ └── utils.py ├── cometspy.egg-info ├── PKG-INFO ├── SOURCES.txt ├── dependency_links.txt ├── requires.txt └── top_level.txt ├── cometspy ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-36.pyc │ ├── __init__.cpython-38.pyc │ ├── __init__.cpython-39.pyc │ ├── comets.cpython-36.pyc │ ├── comets.cpython-38.pyc │ ├── comets.cpython-39.pyc │ ├── layout.cpython-36.pyc │ ├── layout.cpython-38.pyc │ ├── layout.cpython-39.pyc │ ├── model.cpython-36.pyc │ ├── model.cpython-38.pyc │ ├── model.cpython-39.pyc │ ├── params.cpython-36.pyc │ ├── params.cpython-38.pyc │ ├── params.cpython-39.pyc │ ├── utils.cpython-38.pyc │ └── utils.cpython-39.pyc ├── comets.py ├── layout.py ├── model.py ├── params.py └── utils.py ├── dist ├── cometspy-0.5.2-py3-none-any.whl └── cometspy-0.5.2.tar.gz ├── docs ├── Makefile ├── build │ ├── .buildinfo │ ├── .doctrees │ │ ├── cometspy.doctree │ │ ├── environment.pickle │ │ ├── index.doctree │ │ ├── install.doctree │ │ └── modules.doctree │ ├── _images │ │ ├── comets_results.png │ │ └── cometspy_workflow.png │ ├── _static │ │ ├── _sphinx_javascript_frameworks_compat.js │ │ ├── basic.css │ │ ├── cometspy_logo.png │ │ ├── cometspy_logo_white_bkgd.png │ │ ├── css │ │ │ ├── badge_only.css │ │ │ ├── fonts │ │ │ │ ├── Roboto-Slab-Bold.woff │ │ │ │ ├── Roboto-Slab-Bold.woff2 │ │ │ │ ├── Roboto-Slab-Regular.woff │ │ │ │ ├── Roboto-Slab-Regular.woff2 │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ ├── lato-bold-italic.woff │ │ │ │ ├── lato-bold-italic.woff2 │ │ │ │ ├── lato-bold.woff │ │ │ │ ├── lato-bold.woff2 │ │ │ │ ├── lato-normal-italic.woff │ │ │ │ ├── lato-normal-italic.woff2 │ │ │ │ ├── lato-normal.woff │ │ │ │ └── lato-normal.woff2 │ │ │ └── theme.css │ │ ├── doctools.js │ │ ├── documentation_options.js │ │ ├── file.png │ │ ├── jquery.js │ │ ├── js │ │ │ ├── badge_only.js │ │ │ ├── html5shiv-printshiv.min.js │ │ │ ├── html5shiv.min.js │ │ │ └── theme.js │ │ ├── language_data.js │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ └── sphinx_highlight.js │ ├── cometspy.html │ ├── doctrees │ │ ├── README.doctree │ │ ├── branching_colony.doctree │ │ ├── capabilities.doctree │ │ ├── chemostat.doctree │ │ ├── circular_colony.doctree │ │ ├── citrate.doctree │ │ ├── cometspy.doctree │ │ ├── competition_assay.doctree │ │ ├── demographic_noise_two_strains.doctree │ │ ├── environment.pickle │ │ ├── evolution.doctree │ │ ├── getting_started.doctree │ │ ├── index.doctree │ │ ├── install.doctree │ │ ├── installation.doctree │ │ ├── intro.doctree │ │ ├── modules.doctree │ │ ├── multispeciesgrowthexchange.doctree │ │ ├── petri_dish.doctree │ │ ├── soil.doctree │ │ └── test_tube.doctree │ ├── genindex.html │ ├── html │ │ ├── .buildinfo │ │ ├── README.html │ │ ├── _images │ │ │ ├── branching_colony_1.png │ │ │ ├── branching_colony_2.png │ │ │ ├── chemostat_1.png │ │ │ ├── chemostat_2.png │ │ │ ├── chemostat_3.png │ │ │ ├── circular_colony_1.png │ │ │ ├── circular_colony_2.png │ │ │ ├── citrate_1.png │ │ │ ├── comets_results.png │ │ │ ├── cometspy_workflow.png │ │ │ ├── comp_1.png │ │ │ ├── comp_2.png │ │ │ ├── demographic_noise_two_strains.png │ │ │ ├── evolution_1.png │ │ │ ├── petri_dish_1.png │ │ │ ├── petri_dish_2.png │ │ │ ├── petri_dish_3.png │ │ │ ├── petri_dish_4.png │ │ │ ├── soil_1.png │ │ │ ├── soil_2.png │ │ │ ├── soil_3.png │ │ │ ├── soil_4.png │ │ │ ├── soil_5.png │ │ │ ├── test_tube_1.png │ │ │ └── test_tube_2.png │ │ ├── _sources │ │ │ ├── README.md.txt │ │ │ ├── branching_colony.md.txt │ │ │ ├── capabilities.md.txt │ │ │ ├── chemostat.md.txt │ │ │ ├── chemostat.rst.txt │ │ │ ├── circular_colony.md.txt │ │ │ ├── citrate.md.txt │ │ │ ├── cometspy.rst.txt │ │ │ ├── competition_assay.md.txt │ │ │ ├── demographic_noise_two_strains.md.txt │ │ │ ├── evolution.md.txt │ │ │ ├── getting_started.md.txt │ │ │ ├── getting_started.rst.txt │ │ │ ├── index.md.txt │ │ │ ├── index.rst.txt │ │ │ ├── install.rst.txt │ │ │ ├── installation.md.txt │ │ │ ├── intro.rst.txt │ │ │ ├── modules.rst.txt │ │ │ ├── multispeciesgrowthexchange.md.txt │ │ │ ├── petri_dish.md.txt │ │ │ ├── soil.md.txt │ │ │ └── test_tube.md.txt │ │ ├── _static │ │ │ ├── _sphinx_javascript_frameworks_compat.js │ │ │ ├── basic.css │ │ │ ├── cometspy_logo.png │ │ │ ├── cometspy_logo_white_bkgd.png │ │ │ ├── css │ │ │ │ ├── badge_only.css │ │ │ │ ├── fonts │ │ │ │ │ ├── Roboto-Slab-Bold.woff │ │ │ │ │ ├── Roboto-Slab-Bold.woff2 │ │ │ │ │ ├── Roboto-Slab-Regular.woff │ │ │ │ │ ├── Roboto-Slab-Regular.woff2 │ │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ │ ├── lato-bold-italic.woff │ │ │ │ │ ├── lato-bold-italic.woff2 │ │ │ │ │ ├── lato-bold.woff │ │ │ │ │ ├── lato-bold.woff2 │ │ │ │ │ ├── lato-normal-italic.woff │ │ │ │ │ ├── lato-normal-italic.woff2 │ │ │ │ │ ├── lato-normal.woff │ │ │ │ │ └── lato-normal.woff2 │ │ │ │ └── theme.css │ │ │ ├── doctools.js │ │ │ ├── documentation_options.js │ │ │ ├── file.png │ │ │ ├── jquery-3.6.0.js │ │ │ ├── jquery.js │ │ │ ├── js │ │ │ │ ├── badge_only.js │ │ │ │ ├── html5shiv-printshiv.min.js │ │ │ │ ├── html5shiv.min.js │ │ │ │ └── theme.js │ │ │ ├── language_data.js │ │ │ ├── minus.png │ │ │ ├── plus.png │ │ │ ├── pygments.css │ │ │ ├── searchtools.js │ │ │ ├── sphinx_highlight.js │ │ │ ├── underscore-1.13.1.js │ │ │ └── underscore.js │ │ ├── branching_colony.html │ │ ├── capabilities.html │ │ ├── chemostat.html │ │ ├── circular_colony.html │ │ ├── citrate.html │ │ ├── cometspy.html │ │ ├── competition_assay.html │ │ ├── demographic_noise_two_strains.html │ │ ├── evolution.html │ │ ├── genindex.html │ │ ├── getting_started.html │ │ ├── index.html │ │ ├── install.html │ │ ├── installation.html │ │ ├── intro.html │ │ ├── modules.html │ │ ├── multispeciesgrowthexchange.html │ │ ├── objects.inv │ │ ├── petri_dish.html │ │ ├── py-modindex.html │ │ ├── search.html │ │ ├── searchindex.js │ │ ├── soil.html │ │ └── test_tube.html │ ├── index.html │ ├── install.html │ ├── modules.html │ ├── objects.inv │ ├── py-modindex.html │ ├── search.html │ └── searchindex.js ├── make.bat ├── requirements.txt └── source │ ├── #index.rst# │ ├── README.md │ ├── _static │ └── cometspy_logo.png │ ├── branching_colony.md │ ├── capabilities.md │ ├── chemostat.md │ ├── circular_colony.md │ ├── citrate.md │ ├── cometspy.rst │ ├── competition_assay.md │ ├── conf.py │ ├── demographic_noise_two_strains.md │ ├── evolution.md │ ├── getting_started.md │ ├── img │ ├── branching_colony_1.png │ ├── branching_colony_2.png │ ├── chemostat_1.png │ ├── chemostat_2.png │ ├── chemostat_3.png │ ├── circular_1.png │ ├── circular_2.png │ ├── circular_colony_1.png │ ├── circular_colony_2.png │ ├── citrate_1.png │ ├── comets_results.png │ ├── cometspy_logo.png │ ├── cometspy_logo_white_bkgd.png │ ├── cometspy_workflow.png │ ├── comp_1.png │ ├── comp_2.png │ ├── demographic_noise_two_strains.png │ ├── evolution_1.png │ ├── multispecies_1.png │ ├── petri_dish_1.png │ ├── petri_dish_2.png │ ├── petri_dish_3.png │ ├── petri_dish_4.png │ ├── soil_1.png │ ├── soil_2.png │ ├── soil_3.png │ ├── soil_4.png │ ├── soil_5.png │ ├── soul_1.png │ ├── test_tube_1.png │ └── test_tube_2.png │ ├── index.rst │ ├── installation.md │ ├── intro.rst │ ├── petri_dish.md │ ├── soil.md │ └── test_tube.md ├── ipynb_to_docs.sh ├── make.bat ├── setup.cfg └── setup.py /#index.rst#: -------------------------------------------------------------------------------- 1 | 11;rgb:3f3f/3f3f/3f3f 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * linguist-vendored 2 | *.py linguist-vendored=false 3 | -------------------------------------------------------------------------------- /.github/workflows/publish_docs.yml: -------------------------------------------------------------------------------- 1 | # Simple workflow for deploying static content to GitHub Pages 2 | name: Build and Publish Documentation 3 | 4 | on: 5 | # Runs on pushes targeting the default branch 6 | push: 7 | branches: ["master"] 8 | 9 | # Allows you to run this workflow manually from the Actions tab 10 | workflow_dispatch: 11 | 12 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 13 | permissions: 14 | contents: read 15 | pages: write 16 | id-token: write 17 | 18 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 19 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 20 | concurrency: 21 | group: "pages" 22 | cancel-in-progress: false 23 | 24 | jobs: 25 | build: 26 | runs-on: ubuntu-latest 27 | 28 | steps: 29 | - name: Checkout Repository 30 | uses: actions/checkout@v2 31 | 32 | - name: Set up Python 33 | uses: actions/setup-python@v2 34 | with: 35 | python-version: 3.x # Adjust to your Python version 36 | 37 | - name: Install Dependencies 38 | run: | 39 | pip install sphinx sphinx-autodoc-typehints sphinx_rtd_theme pandas cobra 40 | 41 | - name: Generate Documentation 42 | run: | 43 | sphinx-apidoc -o docs/source/ cometspy/ 44 | 45 | - name: Build Documentation 46 | run: | 47 | sphinx-build -b html docs/source _site 48 | 49 | - name: Upload artifact 50 | uses: actions/upload-pages-artifact@v2 51 | 52 | # Deployment job 53 | deploy: 54 | environment: 55 | name: github-pages 56 | url: ${{ steps.deployment.outputs.page_url }} 57 | runs-on: ubuntu-latest 58 | needs: build 59 | steps: 60 | - name: Deploy to GitHub Pages 61 | id: deployment 62 | uses: actions/deploy-pages@v2 63 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # Read the Docs configuration file for Sphinx projects 2 | 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | 6 | # Required 7 | 8 | version: 2 9 | 10 | 11 | # Set the OS, Python version and other tools you might need 12 | 13 | build: 14 | 15 | os: ubuntu-22.04 16 | 17 | tools: 18 | 19 | python: "3.9" 20 | 21 | # You can also specify other tool versions: 22 | 23 | # nodejs: "20" 24 | 25 | # rust: "1.70" 26 | 27 | # golang: "1.20" 28 | 29 | 30 | # Build documentation in the "docs/" directory with Sphinx 31 | 32 | sphinx: 33 | 34 | configuration: docs/source/conf.py 35 | 36 | # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs 37 | 38 | # builder: "dirhtml" 39 | 40 | # Fail on all warnings to avoid broken references 41 | 42 | # fail_on_warning: true 43 | 44 | 45 | # Optionally build your docs in additional formats such as PDF and ePub 46 | 47 | # formats: 48 | 49 | # - pdf 50 | 51 | # - epub 52 | 53 | 54 | # Optional but recommended, declare the Python requirements required 55 | 56 | # to build your documentation 57 | 58 | # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html 59 | 60 | python: 61 | install: 62 | - requirements: docs/requirements.txt -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at ilija.dukovski@gmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /MANIFEST: -------------------------------------------------------------------------------- 1 | # file GENERATED by distutils, do NOT edit 2 | setup.cfg 3 | setup.py 4 | cometspy/__init__.py 5 | cometspy/comets.py 6 | cometspy/layout.py 7 | cometspy/model.py 8 | cometspy/params.py 9 | cometspy/utils.py 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | [![Current PyPI version](https://img.shields.io/pypi/v/cometspy.svg)](https://pypi.org/project/cometspy/) 3 | [![Supported Python Versions](https://img.shields.io/pypi/pyversions/cometspy.svg)](https://pypi.org/project/cometspy/) 4 | [![GitHub release](https://img.shields.io/github/release/segrelab/cometspy/all.svg)](https://GitHub.com/segrelab/cometspy/releases/) 5 | 6 | # COMETSPy - The Python Interface for COMETS 7 | COMETSPY is the Python interface for running [COMETS](https://GitHub.com/segrelab/comets) simulations. COMETS is built and maintained by the COMETSPy Core Team. 8 | 9 | COMETSPy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 10 | 11 | CometsPy is developed with non-commercial use in mind and is presented as-is. To inquire about collaborations or commercial usage and development, please contact us at . 12 | 13 | # Documentation 14 | Documentation on how to use COMETS with COMETSPy can be found at [https://cometspy.readthedocs.io/en/latest/](https://segrelab.github.io/cometspy/). 15 | 16 | # Installation 17 | Use pip to install COMETSPy from PyPI: 18 | 19 | ```py 20 | pip3 install cometspy 21 | ``` 22 | 23 | # Cite us 24 | 25 | # Contributing 26 | Contributions are welcome and appreciated. Questions and discussions can be raised on [Gitter](https://gitter.im/segrelab/comets). Issues should be discussed in this forum before they are raised on GitHub. For other questions contact us on email comets@bu.edu. 27 | -------------------------------------------------------------------------------- /__pycache__/comets.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/__pycache__/comets.cpython-35.pyc -------------------------------------------------------------------------------- /build/lib/cometspy/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | *a python package for making and running COMETS simulations.* 3 | 4 | cometspy is a straight-forward python interface to the COMETS program. 5 | Use for dynamic flux-balance analysis, with multiple models, heterogenous 6 | spatio-temporal environments, and evolution. 7 | 8 | **To use this package, you must also have the actual COMETS program installed.** 9 | 10 | * For more information on COMETS, see https://runcomets.org 11 | 12 | * For COMETS development, see https://github.com/segrelab/comets 13 | 14 | * For development of this package, see http://github.com/segrelab/cometspy 15 | 16 | **cometspy workflow:** 17 | 18 | models -> layout, layout + params -> comets, comets.run() 19 | 20 | **cometspy hello.world** 21 | 22 | >>> import cobra.test 23 | >>> import cometspy as c 24 | >>> # make a model from a cobra model, open exchange reactions, and give a pop 25 | >>> tb = cobra.test.create_test_model("textbook") 26 | >>> m = c.model(tb) 27 | >>> m.initial_pop = [0, 0, 1.e-4] 28 | >>> m.open_exchanges() 29 | >>> # make a layout with the model, and give it three nutrients 30 | >>> l = c.layout([m]) 31 | >>> l.set_specific_metabolite("glc__D_e", 0.01) 32 | >>> l.set_specific_metabolite("nh4_e", 1000, static = True) 33 | >>> l.set_specific_metabolite("pi_e", 1000, static = True) 34 | >>> # make params and change one default 35 | >>> p = c.params() 36 | >>> p.set_param("maxCycles", 100) 37 | >>> # make a simulation and run it! 38 | >>> sim = c.comets(l, p) 39 | >>> sim.run() 40 | >>> print(sim.total_biomass) 41 | >>> # saved data objects are pandas.DataFrames, and therefore can be plotted 42 | >>> # sim.total_biomass.plot(x = "cycle") 43 | 44 | """ 45 | from cometspy.comets import comets 46 | from cometspy.model import model 47 | from cometspy.layout import layout 48 | from cometspy.params import params 49 | -------------------------------------------------------------------------------- /cometspy.egg-info/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 2.1 2 | Name: cometspy 3 | Version: 0.5.2 4 | Summary: The Python interface to COMETS 5 | Home-page: https://github.com/segrelab/cometspy 6 | Download-URL: https://github.com/segrelab/cometspy/archive/v0.5.1.tar.gz 7 | Author: The COMETSPy Core Team 8 | Author-email: djordje.bajic@yale.edu 9 | License: GPL 10 | Keywords: metabolism,dynamic,flux,balance,analysis,spatial,evolution 11 | Platform: UNKNOWN 12 | Classifier: Development Status :: 4 - Beta 13 | Classifier: Intended Audience :: Science/Research 14 | Classifier: License :: OSI Approved :: MIT License 15 | Classifier: Programming Language :: Python :: 3.6 16 | Classifier: Programming Language :: Python :: 3.7 17 | Classifier: Programming Language :: Python :: 3.8 18 | License-File: LICENSE 19 | 20 | UNKNOWN 21 | 22 | -------------------------------------------------------------------------------- /cometspy.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | LICENSE 2 | README.md 3 | setup.cfg 4 | setup.py 5 | cometspy/__init__.py 6 | cometspy/comets.py 7 | cometspy/layout.py 8 | cometspy/model.py 9 | cometspy/params.py 10 | cometspy/utils.py 11 | cometspy.egg-info/PKG-INFO 12 | cometspy.egg-info/SOURCES.txt 13 | cometspy.egg-info/dependency_links.txt 14 | cometspy.egg-info/requires.txt 15 | cometspy.egg-info/top_level.txt -------------------------------------------------------------------------------- /cometspy.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cometspy.egg-info/requires.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | cobra 3 | pandas>=1.0.0 4 | -------------------------------------------------------------------------------- /cometspy.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | cometspy 2 | -------------------------------------------------------------------------------- /cometspy/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | *a python package for making and running COMETS simulations.* 3 | 4 | cometspy is a straight-forward python interface to the COMETS program. 5 | Use for dynamic flux-balance analysis, with multiple models, heterogenous 6 | spatio-temporal environments, and evolution. 7 | 8 | **To use this package, you must also have the actual COMETS program installed.** 9 | 10 | * For more information on COMETS, see https://runcomets.org 11 | 12 | * For COMETS development, see https://github.com/segrelab/comets 13 | 14 | * For development of this package, see http://github.com/segrelab/cometspy 15 | 16 | **cometspy workflow:** 17 | 18 | models -> layout, layout + params -> comets, comets.run() 19 | 20 | **cometspy hello.world** 21 | 22 | >>> import cobra.test 23 | >>> import cometspy as c 24 | >>> # make a model from a cobra model, open exchange reactions, and give a pop 25 | >>> tb = cobra.test.create_test_model("textbook") 26 | >>> m = c.model(tb) 27 | >>> m.initial_pop = [0, 0, 1.e-4] 28 | >>> m.open_exchanges() 29 | >>> # make a layout with the model, and give it three nutrients 30 | >>> l = c.layout([m]) 31 | >>> l.set_specific_metabolite("glc__D_e", 0.01) 32 | >>> l.set_specific_metabolite("nh4_e", 1000, static = True) 33 | >>> l.set_specific_metabolite("pi_e", 1000, static = True) 34 | >>> # make params and change one default 35 | >>> p = c.params() 36 | >>> p.set_param("maxCycles", 100) 37 | >>> # make a simulation and run it! 38 | >>> sim = c.comets(l, p) 39 | >>> sim.run() 40 | >>> print(sim.total_biomass) 41 | >>> # saved data objects are pandas.DataFrames, and therefore can be plotted 42 | >>> # sim.total_biomass.plot(x = "cycle") 43 | 44 | """ 45 | from cometspy.comets import comets 46 | from cometspy.model import model 47 | from cometspy.layout import layout 48 | from cometspy.params import params 49 | -------------------------------------------------------------------------------- /cometspy/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/comets.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/comets.cpython-36.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/comets.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/comets.cpython-38.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/comets.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/comets.cpython-39.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/layout.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/layout.cpython-36.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/layout.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/layout.cpython-38.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/layout.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/layout.cpython-39.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/model.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/model.cpython-36.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/model.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/model.cpython-38.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/model.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/model.cpython-39.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/params.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/params.cpython-36.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/params.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/params.cpython-38.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/params.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/params.cpython-39.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/utils.cpython-38.pyc -------------------------------------------------------------------------------- /cometspy/__pycache__/utils.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/cometspy/__pycache__/utils.cpython-39.pyc -------------------------------------------------------------------------------- /dist/cometspy-0.5.2-py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/dist/cometspy-0.5.2-py3-none-any.whl -------------------------------------------------------------------------------- /dist/cometspy-0.5.2.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/dist/cometspy-0.5.2.tar.gz -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/build/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 683ed239e83aeb31a6d829fb79ba53e5 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/build/.doctrees/cometspy.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/.doctrees/cometspy.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/.doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/build/.doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/.doctrees/index.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/install.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/.doctrees/install.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/modules.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/.doctrees/modules.doctree -------------------------------------------------------------------------------- /docs/build/_images/comets_results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_images/comets_results.png -------------------------------------------------------------------------------- /docs/build/_images/cometspy_workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_images/cometspy_workflow.png -------------------------------------------------------------------------------- /docs/build/_static/_sphinx_javascript_frameworks_compat.js: -------------------------------------------------------------------------------- 1 | /* Compatability shim for jQuery and underscores.js. 2 | * 3 | * Copyright Sphinx contributors 4 | * Released under the two clause BSD licence 5 | */ 6 | 7 | /** 8 | * small helper function to urldecode strings 9 | * 10 | * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL 11 | */ 12 | jQuery.urldecode = function(x) { 13 | if (!x) { 14 | return x 15 | } 16 | return decodeURIComponent(x.replace(/\+/g, ' ')); 17 | }; 18 | 19 | /** 20 | * small helper function to urlencode strings 21 | */ 22 | jQuery.urlencode = encodeURIComponent; 23 | 24 | /** 25 | * This function returns the parsed url parameters of the 26 | * current request. Multiple values per key are supported, 27 | * it will always return arrays of strings for the value parts. 28 | */ 29 | jQuery.getQueryParameters = function(s) { 30 | if (typeof s === 'undefined') 31 | s = document.location.search; 32 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 33 | var result = {}; 34 | for (var i = 0; i < parts.length; i++) { 35 | var tmp = parts[i].split('=', 2); 36 | var key = jQuery.urldecode(tmp[0]); 37 | var value = jQuery.urldecode(tmp[1]); 38 | if (key in result) 39 | result[key].push(value); 40 | else 41 | result[key] = [value]; 42 | } 43 | return result; 44 | }; 45 | 46 | /** 47 | * highlight a given string on a jquery object by wrapping it in 48 | * span elements with the given class name. 49 | */ 50 | jQuery.fn.highlightText = function(text, className) { 51 | function highlight(node, addItems) { 52 | if (node.nodeType === 3) { 53 | var val = node.nodeValue; 54 | var pos = val.toLowerCase().indexOf(text); 55 | if (pos >= 0 && 56 | !jQuery(node.parentNode).hasClass(className) && 57 | !jQuery(node.parentNode).hasClass("nohighlight")) { 58 | var span; 59 | var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); 60 | if (isInSVG) { 61 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 62 | } else { 63 | span = document.createElement("span"); 64 | span.className = className; 65 | } 66 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 67 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 68 | document.createTextNode(val.substr(pos + text.length)), 69 | node.nextSibling)); 70 | node.nodeValue = val.substr(0, pos); 71 | if (isInSVG) { 72 | var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 73 | var bbox = node.parentElement.getBBox(); 74 | rect.x.baseVal.value = bbox.x; 75 | rect.y.baseVal.value = bbox.y; 76 | rect.width.baseVal.value = bbox.width; 77 | rect.height.baseVal.value = bbox.height; 78 | rect.setAttribute('class', className); 79 | addItems.push({ 80 | "parent": node.parentNode, 81 | "target": rect}); 82 | } 83 | } 84 | } 85 | else if (!jQuery(node).is("button, select, textarea")) { 86 | jQuery.each(node.childNodes, function() { 87 | highlight(this, addItems); 88 | }); 89 | } 90 | } 91 | var addItems = []; 92 | var result = this.each(function() { 93 | highlight(this, addItems); 94 | }); 95 | for (var i = 0; i < addItems.length; ++i) { 96 | jQuery(addItems[i].parent).before(addItems[i].target); 97 | } 98 | return result; 99 | }; 100 | 101 | /* 102 | * backward compatibility for jQuery.browser 103 | * This will be supported until firefox bug is fixed. 104 | */ 105 | if (!jQuery.browser) { 106 | jQuery.uaMatch = function(ua) { 107 | ua = ua.toLowerCase(); 108 | 109 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 110 | /(webkit)[ \/]([\w.]+)/.exec(ua) || 111 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 112 | /(msie) ([\w.]+)/.exec(ua) || 113 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || 114 | []; 115 | 116 | return { 117 | browser: match[ 1 ] || "", 118 | version: match[ 2 ] || "0" 119 | }; 120 | }; 121 | jQuery.browser = {}; 122 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; 123 | } 124 | -------------------------------------------------------------------------------- /docs/build/_static/cometspy_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/cometspy_logo.png -------------------------------------------------------------------------------- /docs/build/_static/cometspy_logo_white_bkgd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/cometspy_logo_white_bkgd.png -------------------------------------------------------------------------------- /docs/build/_static/css/badge_only.css: -------------------------------------------------------------------------------- 1 | .clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/lato-bold.woff -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/lato-normal.woff -------------------------------------------------------------------------------- /docs/build/_static/css/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/css/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /docs/build/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Base JavaScript utilities for all Sphinx HTML documentation. 6 | * 7 | * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | "use strict"; 12 | 13 | const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ 14 | "TEXTAREA", 15 | "INPUT", 16 | "SELECT", 17 | "BUTTON", 18 | ]); 19 | 20 | const _ready = (callback) => { 21 | if (document.readyState !== "loading") { 22 | callback(); 23 | } else { 24 | document.addEventListener("DOMContentLoaded", callback); 25 | } 26 | }; 27 | 28 | /** 29 | * Small JavaScript module for the documentation. 30 | */ 31 | const Documentation = { 32 | init: () => { 33 | Documentation.initDomainIndexTable(); 34 | Documentation.initOnKeyListeners(); 35 | }, 36 | 37 | /** 38 | * i18n support 39 | */ 40 | TRANSLATIONS: {}, 41 | PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), 42 | LOCALE: "unknown", 43 | 44 | // gettext and ngettext don't access this so that the functions 45 | // can safely bound to a different name (_ = Documentation.gettext) 46 | gettext: (string) => { 47 | const translated = Documentation.TRANSLATIONS[string]; 48 | switch (typeof translated) { 49 | case "undefined": 50 | return string; // no translation 51 | case "string": 52 | return translated; // translation exists 53 | default: 54 | return translated[0]; // (singular, plural) translation tuple exists 55 | } 56 | }, 57 | 58 | ngettext: (singular, plural, n) => { 59 | const translated = Documentation.TRANSLATIONS[singular]; 60 | if (typeof translated !== "undefined") 61 | return translated[Documentation.PLURAL_EXPR(n)]; 62 | return n === 1 ? singular : plural; 63 | }, 64 | 65 | addTranslations: (catalog) => { 66 | Object.assign(Documentation.TRANSLATIONS, catalog.messages); 67 | Documentation.PLURAL_EXPR = new Function( 68 | "n", 69 | `return (${catalog.plural_expr})` 70 | ); 71 | Documentation.LOCALE = catalog.locale; 72 | }, 73 | 74 | /** 75 | * helper function to focus on search bar 76 | */ 77 | focusSearchBar: () => { 78 | document.querySelectorAll("input[name=q]")[0]?.focus(); 79 | }, 80 | 81 | /** 82 | * Initialise the domain index toggle buttons 83 | */ 84 | initDomainIndexTable: () => { 85 | const toggler = (el) => { 86 | const idNumber = el.id.substr(7); 87 | const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); 88 | if (el.src.substr(-9) === "minus.png") { 89 | el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; 90 | toggledRows.forEach((el) => (el.style.display = "none")); 91 | } else { 92 | el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; 93 | toggledRows.forEach((el) => (el.style.display = "")); 94 | } 95 | }; 96 | 97 | const togglerElements = document.querySelectorAll("img.toggler"); 98 | togglerElements.forEach((el) => 99 | el.addEventListener("click", (event) => toggler(event.currentTarget)) 100 | ); 101 | togglerElements.forEach((el) => (el.style.display = "")); 102 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); 103 | }, 104 | 105 | initOnKeyListeners: () => { 106 | // only install a listener if it is really needed 107 | if ( 108 | !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && 109 | !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS 110 | ) 111 | return; 112 | 113 | document.addEventListener("keydown", (event) => { 114 | // bail for input elements 115 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 116 | // bail with special keys 117 | if (event.altKey || event.ctrlKey || event.metaKey) return; 118 | 119 | if (!event.shiftKey) { 120 | switch (event.key) { 121 | case "ArrowLeft": 122 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 123 | 124 | const prevLink = document.querySelector('link[rel="prev"]'); 125 | if (prevLink && prevLink.href) { 126 | window.location.href = prevLink.href; 127 | event.preventDefault(); 128 | } 129 | break; 130 | case "ArrowRight": 131 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 132 | 133 | const nextLink = document.querySelector('link[rel="next"]'); 134 | if (nextLink && nextLink.href) { 135 | window.location.href = nextLink.href; 136 | event.preventDefault(); 137 | } 138 | break; 139 | } 140 | } 141 | 142 | // some keyboard layouts may need Shift to get / 143 | switch (event.key) { 144 | case "/": 145 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; 146 | Documentation.focusSearchBar(); 147 | event.preventDefault(); 148 | } 149 | }); 150 | }, 151 | }; 152 | 153 | // quick alias for translations 154 | const _ = Documentation.gettext; 155 | 156 | _ready(Documentation.init); 157 | -------------------------------------------------------------------------------- /docs/build/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '', 4 | LANGUAGE: 'en', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: false, 12 | SHOW_SEARCH_SUMMARY: true, 13 | ENABLE_SEARCH_SHORTCUTS: true, 14 | }; -------------------------------------------------------------------------------- /docs/build/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/file.png -------------------------------------------------------------------------------- /docs/build/_static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /docs/build/_static/js/html5shiv-printshiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/build/_static/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/build/_static/js/theme.js: -------------------------------------------------------------------------------- 1 | !function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t0 63 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 64 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 65 | var s_v = "^(" + C + ")?" + v; // vowel in stem 66 | 67 | this.stemWord = function (w) { 68 | var stem; 69 | var suffix; 70 | var firstch; 71 | var origword = w; 72 | 73 | if (w.length < 3) 74 | return w; 75 | 76 | var re; 77 | var re2; 78 | var re3; 79 | var re4; 80 | 81 | firstch = w.substr(0,1); 82 | if (firstch == "y") 83 | w = firstch.toUpperCase() + w.substr(1); 84 | 85 | // Step 1a 86 | re = /^(.+?)(ss|i)es$/; 87 | re2 = /^(.+?)([^s])s$/; 88 | 89 | if (re.test(w)) 90 | w = w.replace(re,"$1$2"); 91 | else if (re2.test(w)) 92 | w = w.replace(re2,"$1$2"); 93 | 94 | // Step 1b 95 | re = /^(.+?)eed$/; 96 | re2 = /^(.+?)(ed|ing)$/; 97 | if (re.test(w)) { 98 | var fp = re.exec(w); 99 | re = new RegExp(mgr0); 100 | if (re.test(fp[1])) { 101 | re = /.$/; 102 | w = w.replace(re,""); 103 | } 104 | } 105 | else if (re2.test(w)) { 106 | var fp = re2.exec(w); 107 | stem = fp[1]; 108 | re2 = new RegExp(s_v); 109 | if (re2.test(stem)) { 110 | w = stem; 111 | re2 = /(at|bl|iz)$/; 112 | re3 = new RegExp("([^aeiouylsz])\\1$"); 113 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 114 | if (re2.test(w)) 115 | w = w + "e"; 116 | else if (re3.test(w)) { 117 | re = /.$/; 118 | w = w.replace(re,""); 119 | } 120 | else if (re4.test(w)) 121 | w = w + "e"; 122 | } 123 | } 124 | 125 | // Step 1c 126 | re = /^(.+?)y$/; 127 | if (re.test(w)) { 128 | var fp = re.exec(w); 129 | stem = fp[1]; 130 | re = new RegExp(s_v); 131 | if (re.test(stem)) 132 | w = stem + "i"; 133 | } 134 | 135 | // Step 2 136 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 137 | if (re.test(w)) { 138 | var fp = re.exec(w); 139 | stem = fp[1]; 140 | suffix = fp[2]; 141 | re = new RegExp(mgr0); 142 | if (re.test(stem)) 143 | w = stem + step2list[suffix]; 144 | } 145 | 146 | // Step 3 147 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 148 | if (re.test(w)) { 149 | var fp = re.exec(w); 150 | stem = fp[1]; 151 | suffix = fp[2]; 152 | re = new RegExp(mgr0); 153 | if (re.test(stem)) 154 | w = stem + step3list[suffix]; 155 | } 156 | 157 | // Step 4 158 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 159 | re2 = /^(.+?)(s|t)(ion)$/; 160 | if (re.test(w)) { 161 | var fp = re.exec(w); 162 | stem = fp[1]; 163 | re = new RegExp(mgr1); 164 | if (re.test(stem)) 165 | w = stem; 166 | } 167 | else if (re2.test(w)) { 168 | var fp = re2.exec(w); 169 | stem = fp[1] + fp[2]; 170 | re2 = new RegExp(mgr1); 171 | if (re2.test(stem)) 172 | w = stem; 173 | } 174 | 175 | // Step 5 176 | re = /^(.+?)e$/; 177 | if (re.test(w)) { 178 | var fp = re.exec(w); 179 | stem = fp[1]; 180 | re = new RegExp(mgr1); 181 | re2 = new RegExp(meq1); 182 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 183 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 184 | w = stem; 185 | } 186 | re = /ll$/; 187 | re2 = new RegExp(mgr1); 188 | if (re.test(w) && re2.test(w)) { 189 | re = /.$/; 190 | w = w.replace(re,""); 191 | } 192 | 193 | // and turn initial Y back to y 194 | if (firstch == "y") 195 | w = firstch.toLowerCase() + w.substr(1); 196 | return w; 197 | } 198 | } 199 | 200 | -------------------------------------------------------------------------------- /docs/build/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/minus.png -------------------------------------------------------------------------------- /docs/build/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/_static/plus.png -------------------------------------------------------------------------------- /docs/build/_static/pygments.css: -------------------------------------------------------------------------------- 1 | pre { line-height: 125%; } 2 | td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 3 | span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 4 | td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 5 | span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 6 | .highlight .hll { background-color: #ffffcc } 7 | .highlight { background: #f8f8f8; } 8 | .highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ 9 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 10 | .highlight .k { color: #008000; font-weight: bold } /* Keyword */ 11 | .highlight .o { color: #666666 } /* Operator */ 12 | .highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ 13 | .highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ 14 | .highlight .cp { color: #9C6500 } /* Comment.Preproc */ 15 | .highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ 16 | .highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ 17 | .highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ 18 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 19 | .highlight .ge { font-style: italic } /* Generic.Emph */ 20 | .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ 21 | .highlight .gr { color: #E40000 } /* Generic.Error */ 22 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 23 | .highlight .gi { color: #008400 } /* Generic.Inserted */ 24 | .highlight .go { color: #717171 } /* Generic.Output */ 25 | .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ 26 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 27 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 28 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 29 | .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ 30 | .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ 31 | .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ 32 | .highlight .kp { color: #008000 } /* Keyword.Pseudo */ 33 | .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ 34 | .highlight .kt { color: #B00040 } /* Keyword.Type */ 35 | .highlight .m { color: #666666 } /* Literal.Number */ 36 | .highlight .s { color: #BA2121 } /* Literal.String */ 37 | .highlight .na { color: #687822 } /* Name.Attribute */ 38 | .highlight .nb { color: #008000 } /* Name.Builtin */ 39 | .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ 40 | .highlight .no { color: #880000 } /* Name.Constant */ 41 | .highlight .nd { color: #AA22FF } /* Name.Decorator */ 42 | .highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ 43 | .highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ 44 | .highlight .nf { color: #0000FF } /* Name.Function */ 45 | .highlight .nl { color: #767600 } /* Name.Label */ 46 | .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ 47 | .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ 48 | .highlight .nv { color: #19177C } /* Name.Variable */ 49 | .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ 50 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 51 | .highlight .mb { color: #666666 } /* Literal.Number.Bin */ 52 | .highlight .mf { color: #666666 } /* Literal.Number.Float */ 53 | .highlight .mh { color: #666666 } /* Literal.Number.Hex */ 54 | .highlight .mi { color: #666666 } /* Literal.Number.Integer */ 55 | .highlight .mo { color: #666666 } /* Literal.Number.Oct */ 56 | .highlight .sa { color: #BA2121 } /* Literal.String.Affix */ 57 | .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ 58 | .highlight .sc { color: #BA2121 } /* Literal.String.Char */ 59 | .highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ 60 | .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ 61 | .highlight .s2 { color: #BA2121 } /* Literal.String.Double */ 62 | .highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ 63 | .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ 64 | .highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ 65 | .highlight .sx { color: #008000 } /* Literal.String.Other */ 66 | .highlight .sr { color: #A45A77 } /* Literal.String.Regex */ 67 | .highlight .s1 { color: #BA2121 } /* Literal.String.Single */ 68 | .highlight .ss { color: #19177C } /* Literal.String.Symbol */ 69 | .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ 70 | .highlight .fm { color: #0000FF } /* Name.Function.Magic */ 71 | .highlight .vc { color: #19177C } /* Name.Variable.Class */ 72 | .highlight .vg { color: #19177C } /* Name.Variable.Global */ 73 | .highlight .vi { color: #19177C } /* Name.Variable.Instance */ 74 | .highlight .vm { color: #19177C } /* Name.Variable.Magic */ 75 | .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/build/_static/sphinx_highlight.js: -------------------------------------------------------------------------------- 1 | /* Highlighting utilities for Sphinx HTML documentation. */ 2 | "use strict"; 3 | 4 | const SPHINX_HIGHLIGHT_ENABLED = true 5 | 6 | /** 7 | * highlight a given string on a node by wrapping it in 8 | * span elements with the given class name. 9 | */ 10 | const _highlight = (node, addItems, text, className) => { 11 | if (node.nodeType === Node.TEXT_NODE) { 12 | const val = node.nodeValue; 13 | const parent = node.parentNode; 14 | const pos = val.toLowerCase().indexOf(text); 15 | if ( 16 | pos >= 0 && 17 | !parent.classList.contains(className) && 18 | !parent.classList.contains("nohighlight") 19 | ) { 20 | let span; 21 | 22 | const closestNode = parent.closest("body, svg, foreignObject"); 23 | const isInSVG = closestNode && closestNode.matches("svg"); 24 | if (isInSVG) { 25 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 26 | } else { 27 | span = document.createElement("span"); 28 | span.classList.add(className); 29 | } 30 | 31 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 32 | parent.insertBefore( 33 | span, 34 | parent.insertBefore( 35 | document.createTextNode(val.substr(pos + text.length)), 36 | node.nextSibling 37 | ) 38 | ); 39 | node.nodeValue = val.substr(0, pos); 40 | 41 | if (isInSVG) { 42 | const rect = document.createElementNS( 43 | "http://www.w3.org/2000/svg", 44 | "rect" 45 | ); 46 | const bbox = parent.getBBox(); 47 | rect.x.baseVal.value = bbox.x; 48 | rect.y.baseVal.value = bbox.y; 49 | rect.width.baseVal.value = bbox.width; 50 | rect.height.baseVal.value = bbox.height; 51 | rect.setAttribute("class", className); 52 | addItems.push({ parent: parent, target: rect }); 53 | } 54 | } 55 | } else if (node.matches && !node.matches("button, select, textarea")) { 56 | node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); 57 | } 58 | }; 59 | const _highlightText = (thisNode, text, className) => { 60 | let addItems = []; 61 | _highlight(thisNode, addItems, text, className); 62 | addItems.forEach((obj) => 63 | obj.parent.insertAdjacentElement("beforebegin", obj.target) 64 | ); 65 | }; 66 | 67 | /** 68 | * Small JavaScript module for the documentation. 69 | */ 70 | const SphinxHighlight = { 71 | 72 | /** 73 | * highlight the search words provided in localstorage in the text 74 | */ 75 | highlightSearchWords: () => { 76 | if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight 77 | 78 | // get and clear terms from localstorage 79 | const url = new URL(window.location); 80 | const highlight = 81 | localStorage.getItem("sphinx_highlight_terms") 82 | || url.searchParams.get("highlight") 83 | || ""; 84 | localStorage.removeItem("sphinx_highlight_terms") 85 | url.searchParams.delete("highlight"); 86 | window.history.replaceState({}, "", url); 87 | 88 | // get individual terms from highlight string 89 | const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); 90 | if (terms.length === 0) return; // nothing to do 91 | 92 | // There should never be more than one element matching "div.body" 93 | const divBody = document.querySelectorAll("div.body"); 94 | const body = divBody.length ? divBody[0] : document.querySelector("body"); 95 | window.setTimeout(() => { 96 | terms.forEach((term) => _highlightText(body, term, "highlighted")); 97 | }, 10); 98 | 99 | const searchBox = document.getElementById("searchbox"); 100 | if (searchBox === null) return; 101 | searchBox.appendChild( 102 | document 103 | .createRange() 104 | .createContextualFragment( 105 | '" 109 | ) 110 | ); 111 | }, 112 | 113 | /** 114 | * helper function to hide the search marks again 115 | */ 116 | hideSearchWords: () => { 117 | document 118 | .querySelectorAll("#searchbox .highlight-link") 119 | .forEach((el) => el.remove()); 120 | document 121 | .querySelectorAll("span.highlighted") 122 | .forEach((el) => el.classList.remove("highlighted")); 123 | localStorage.removeItem("sphinx_highlight_terms") 124 | }, 125 | 126 | initEscapeListener: () => { 127 | // only install a listener if it is really needed 128 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; 129 | 130 | document.addEventListener("keydown", (event) => { 131 | // bail for input elements 132 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 133 | // bail with special keys 134 | if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; 135 | if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { 136 | SphinxHighlight.hideSearchWords(); 137 | event.preventDefault(); 138 | } 139 | }); 140 | }, 141 | }; 142 | 143 | _ready(SphinxHighlight.highlightSearchWords); 144 | _ready(SphinxHighlight.initEscapeListener); 145 | -------------------------------------------------------------------------------- /docs/build/doctrees/README.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/README.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/branching_colony.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/branching_colony.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/capabilities.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/capabilities.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/chemostat.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/chemostat.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/circular_colony.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/circular_colony.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/citrate.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/citrate.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/cometspy.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/cometspy.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/competition_assay.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/competition_assay.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/demographic_noise_two_strains.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/demographic_noise_two_strains.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/build/doctrees/evolution.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/evolution.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/getting_started.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/getting_started.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/index.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/install.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/install.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/installation.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/installation.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/intro.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/intro.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/modules.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/modules.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/multispeciesgrowthexchange.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/multispeciesgrowthexchange.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/petri_dish.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/petri_dish.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/soil.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/soil.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/test_tube.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/doctrees/test_tube.doctree -------------------------------------------------------------------------------- /docs/build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 83aa52d0aaba751e300f7fdea72fcecc 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/build/html/_images/branching_colony_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/branching_colony_1.png -------------------------------------------------------------------------------- /docs/build/html/_images/branching_colony_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/branching_colony_2.png -------------------------------------------------------------------------------- /docs/build/html/_images/chemostat_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/chemostat_1.png -------------------------------------------------------------------------------- /docs/build/html/_images/chemostat_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/chemostat_2.png -------------------------------------------------------------------------------- /docs/build/html/_images/chemostat_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/chemostat_3.png -------------------------------------------------------------------------------- /docs/build/html/_images/circular_colony_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/circular_colony_1.png -------------------------------------------------------------------------------- /docs/build/html/_images/circular_colony_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/circular_colony_2.png -------------------------------------------------------------------------------- /docs/build/html/_images/citrate_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/citrate_1.png -------------------------------------------------------------------------------- /docs/build/html/_images/comets_results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/comets_results.png -------------------------------------------------------------------------------- /docs/build/html/_images/cometspy_workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/cometspy_workflow.png -------------------------------------------------------------------------------- /docs/build/html/_images/comp_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/comp_1.png -------------------------------------------------------------------------------- /docs/build/html/_images/comp_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/comp_2.png -------------------------------------------------------------------------------- /docs/build/html/_images/demographic_noise_two_strains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/demographic_noise_two_strains.png -------------------------------------------------------------------------------- /docs/build/html/_images/evolution_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/evolution_1.png -------------------------------------------------------------------------------- /docs/build/html/_images/petri_dish_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/petri_dish_1.png -------------------------------------------------------------------------------- /docs/build/html/_images/petri_dish_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/petri_dish_2.png -------------------------------------------------------------------------------- /docs/build/html/_images/petri_dish_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/petri_dish_3.png -------------------------------------------------------------------------------- /docs/build/html/_images/petri_dish_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/petri_dish_4.png -------------------------------------------------------------------------------- /docs/build/html/_images/soil_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/soil_1.png -------------------------------------------------------------------------------- /docs/build/html/_images/soil_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/soil_2.png -------------------------------------------------------------------------------- /docs/build/html/_images/soil_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/soil_3.png -------------------------------------------------------------------------------- /docs/build/html/_images/soil_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/soil_4.png -------------------------------------------------------------------------------- /docs/build/html/_images/soil_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/soil_5.png -------------------------------------------------------------------------------- /docs/build/html/_images/test_tube_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/test_tube_1.png -------------------------------------------------------------------------------- /docs/build/html/_images/test_tube_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_images/test_tube_2.png -------------------------------------------------------------------------------- /docs/build/html/_sources/README.md.txt: -------------------------------------------------------------------------------- 1 | # COMETS Manual 2 | 3 | This is the repository for the COMETS (Computation Of Microbial Ecosystems in Time and Space) project documentation. 4 | 5 | These documents are rendered with [MkDocs](https://www.mkdocs.org/) and written in [Markdown](https://daringfireball.net/projects/markdown/). -------------------------------------------------------------------------------- /docs/build/html/_sources/capabilities.md.txt: -------------------------------------------------------------------------------- 1 | # COMETS Capabilities 2 | 3 | The core of COMETS is the simulation of the growth of microbial populations by maximizing an objective reaction, usually biomass production, in an iterative way. An initial amount of biomass of one or more species (defined by their metaboli models) is seeded in an environment containing a list of specified nutrients. In each iteration, both the amount of biomass and the environment are updated using FBA predictions. 4 | 5 | 6 | ## Capabilities in space 7 | 8 | COMETS is capable of simulating microbial growth in a spatially structured environment. This is achieved by partitioning the simulation space ("world") in a "grid" of smaller spaces. Inside each space, growth is considered to be well-mixed. Both nutrients and biomass can then propagate to contiguous spaces as simulation proceeds. 9 | 10 | - 2D and 3D simulation "worlds" 11 | 12 | In addition to well-mixed conditions, COMETS can simulate 2D and 3D spatially structured environments. This enables simulation of, for instance, growth of colonies on 2D surfaces such as a Petri dish, or 3D structures such as tumors, bacterial colonies in 3D matrix, etc. 13 | 14 | 15 | - Diffusive and convective propagation of biomass in space 16 | 17 | In simulations with spatial structure, different modes of biomass propagation are implemented. The diffusive mode simulates the propagation of free swimming motile bacteria, while the convective mode simulates the propagation of bacteria by mutual pushing. The two modes of propagation can be combined. 18 | 19 | 20 | - Substrate-dependent nutrient and biomass propagation 21 | 22 | The diffusivity of nutrients as well as the propagation properties of the biomass depend on the substrate properties such as agar density, cell substrate friction coefficient etc. 23 | 24 | 25 | - Boundary conditions 26 | 27 | Two types of boundary conditions are implemented. Fixed value and fixed source or sink rate. 28 | 29 | 30 | ## Biological capabilities 31 | 32 | COMETS features many interesting biological capabilities to refine and improve the predictions of stoichiometric models, as well as to simulate different types of biologically realistic conditions. 33 | 34 | - Lag-phases in microbial growth 35 | 36 | Lag-phases are modelled as simulated growth activation of the colonies. 37 | 38 | 39 | - Continuous (chemostat) and batch growth modes 40 | 41 | In chemostat mode, the user controls the rate of replenishment of the nutrient. In batch mode, the user controls dilution and frequency. 42 | 43 | 44 | * Simulation of multispecies communities 45 | 46 | Simulation of two or more species (up to hundreds) can be performed in both species overlapping or non-overlapping spatial distribution, or in well-mixed conditions. 47 | 48 | 49 | * Parsimonious dFBA 50 | 51 | Usually, any metabolic model has multiple optimal solutions. One way to choose among them is to assume that the cell will minimize the total flux through the metabolic network. To achieve this, parsimonious FBA first optimizes the objective function, e.g. growth. Then, it performs a second optimization by fixing growth at the previously obtained optimal level and minimizing the total flux through the network. 52 | 53 | 54 | * Cell death 55 | 56 | A simple model of cell death is implemented with each species assigned death rate. 57 | 58 | 59 | - Neutral population drift 60 | 61 | The presence of demographic noise can result in random variations in the abundance of different species in a simulation. This is especially useful in the batch-growth mode, where dilution bottlenecks can have a significant impact on growing populations. 62 | 63 | 64 | * Evolutionary processes 65 | 66 | Comets allows for evolutionary simulations, including random mutation and drift during simulations. Currently, the only mutations that are available are reaction deletions. 67 | 68 | 69 | ## Computational capabilities 70 | COMETS software is implemented in the JAVA language. Therefore, it is highly portable and independent on the operative system. COMETS offers the following simulation capabilities. 71 | 72 | - Graphical User Interface (GUI) 73 | 74 | In addition to the command line, COMETS simulations can be run using a graphical user interface that includes visualization tools. 75 | 76 | 77 | - Parallelized dFBA 78 | 79 | Runs in multi-CPU systems as multi-threaded process for greater computational performance. 80 | 81 | 82 | - MATLAB toolbox 83 | 84 | A toolbox in MATLAB for modifying the input files for COMETS in a programmatic way. 85 | 86 | 87 | - Python toolbox 88 | 89 | A toolbox in Python for modifying the input files for COMETS in a programmatic way. 90 | -------------------------------------------------------------------------------- /docs/build/html/_sources/cometspy.rst.txt: -------------------------------------------------------------------------------- 1 | cometspy package 2 | ================ 3 | 4 | cometspy.comets module 5 | ---------------------- 6 | 7 | .. automodule:: cometspy.comets 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | cometspy.layout module 13 | ---------------------- 14 | 15 | .. automodule:: cometspy.layout 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | 20 | cometspy.model module 21 | --------------------- 22 | 23 | .. automodule:: cometspy.model 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | 28 | cometspy.params module 29 | ---------------------- 30 | 31 | .. automodule:: cometspy.params 32 | :members: 33 | :undoc-members: 34 | :show-inheritance: 35 | 36 | cometspy.utils module 37 | --------------------- 38 | 39 | .. automodule:: cometspy.utils 40 | :members: 41 | :undoc-members: 42 | :show-inheritance: 43 | 44 | Module contents 45 | --------------- 46 | 47 | .. automodule:: cometspy 48 | :members: 49 | :undoc-members: 50 | :show-inheritance: 51 | -------------------------------------------------------------------------------- /docs/build/html/_sources/competition_assay.md.txt: -------------------------------------------------------------------------------- 1 | # Two-species competition assay 2 | Competition experiments are frequently performed in the laboratory to assay, for example, the fitness of a mutant in competition to the wild-type. Here, we simulate one such experiemnt involving E. coli and a nonessential but deleterious mutation involving the deletion of the triose phosphate isomerase reaction from glycolisis. 3 | 4 | ## Load models and create a mutant 5 | We first load our *E. coli* "core" model and create the mutant in triose phosphate isomerase by setting both upper and lower bounds to zero. We will add both models to our `test_tube` layout. 6 | 7 | 8 | ```python 9 | # Start by loading required packages, including the COMETS toolbox 10 | import cometspy as c 11 | import cobra.test 12 | import pandas as pd 13 | import matplotlib.pyplot as plt 14 | 15 | # load the models and perform the mutation 16 | wt = c.model(cobra.test.create_test_model("ecoli")) 17 | wt.id = 'wt' 18 | mut = c.model(cobra.test.create_test_model("ecoli")) 19 | mut.change_bounds('TPI', 0,0) 20 | mut.id = 'TPI_KO' 21 | 22 | # set its initial biomass, 5e-6 gr at coordinate [0,0] 23 | wt.initial_pop = [0, 0, 5e-8] 24 | mut.initial_pop = [0, 0, 5e-8] 25 | ``` 26 | 27 | Using license file /home/djordje/gurobi.lic 28 | Academic license - for non-commercial use only 29 | 30 | 31 | ## Create layout, add models and set up media composition 32 | We create an empty layout ("test_tube") and set the initial nutrient supply. 33 | 34 | 35 | ```python 36 | # create an empty layout 37 | test_tube = c.layout() 38 | 39 | # add the models to the test tube 40 | test_tube.add_model(wt) 41 | test_tube.add_model(mut) 42 | ``` 43 | 44 | building empty layout model 45 | models will need to be added with layout.add_model() 46 | 47 | 48 | Set the media composition by adding glucose and the inorganic nutrients required for this model (ammonia, phosphate) and oxygen. These inorganic nutrients will be considered as "static" by the simulation, with a value of 1000 that never depletes. Considering metabolites as "static" is the way COMETS has to simulate an unlimited supply of metabolites. 49 | 50 | 51 | ```python 52 | # Add glucose to the media 53 | test_tube.set_specific_metabolite('glc__D_e', 0.01) 54 | 55 | # Add typical trace metabolites and oxygen coli as static 56 | trace_metabolites = ['ca2_e', 'cl_e', 'cobalt2_e', 'cu2_e', 'fe2_e', 'fe3_e', 'h_e', 'k_e', 'h2o_e', 'mg2_e', 57 | 'mn2_e', 'mobd_e', 'na1_e', 'ni2_e', 'nh4_e', 'o2_e', 'pi_e', 'so4_e', 'zn2_e'] 58 | 59 | for i in trace_metabolites: 60 | test_tube.set_specific_metabolite(i, 1000) 61 | test_tube.set_specific_static(i, 1000) 62 | ``` 63 | 64 | ## Set up simulation parameters 65 | We next create a parameters object and modify needed parameters - in this case only the number of cycles the simulation runs. 66 | 67 | 68 | ```python 69 | comp_params = c.params() 70 | comp_params.set_param('maxCycles', 240) 71 | ``` 72 | 73 | ## Run the simulation 74 | 75 | Finally, we create the comets object using the above created layout and parameters, and run the competition assay. 76 | 77 | 78 | ```python 79 | comp_assay = c.comets(test_tube, comp_params) 80 | comp_assay.run() 81 | ``` 82 | 83 | Running COMETS simulation ... 84 | Done! 85 | 86 | 87 | We now plot the biomasses of these two genotypes in coculture. 88 | 89 | 90 | ```python 91 | biomass = comp_assay.total_biomass 92 | biomass['t'] = biomass['cycle'] * comp_assay.parameters.all_params['timeStep'] 93 | 94 | myplot = biomass.drop(columns=['cycle']).plot(x = 't') 95 | myplot.set_ylabel("Biomass (gr.)") 96 | ``` 97 | 98 | 99 | 100 | 101 | ![](img/comp_1.png) 102 | 103 | 104 | We can quantitatively analyze the results. For example, we can compute the competitive fitness of the mutant respect to the wild-type as the ratio of the biomass increase of the mutant divided by that of the wild-type: 105 | 106 | 107 | ```python 108 | cfit = (biomass.loc[biomass['t'] == 24, 'TPI_KO'].iloc[0]/biomass.loc[biomass['t'] == 0, 'TPI_KO'].iloc[0])/(biomass.loc[biomass['t'] == 24, 'wt'].iloc[0]/biomass.loc[biomass['t'] == 0, 'wt'].iloc[0]) 109 | cfit 110 | ``` 111 | 112 | 113 | 114 | 115 | 0.39378816074777145 116 | 117 | 118 | 119 | ## Simulating serial transfers 120 | Using `COMETS` we can also simulate a serial tranfer competition between these two mutants. We will just modify the parameters, increasing the total simulation time and including batch transfers of 1% every 24h, but we will use the same `test_tube` layout as before. 121 | 122 | 123 | ```python 124 | serial_params = c.params() 125 | serial_params.set_param('maxCycles', 240*25) # simulate 4 serial transfers of 24h each 126 | serial_params.set_param('batchDilution', True) 127 | serial_params.set_param('dilFactor', 0.01) 128 | serial_params.set_param('dilTime', 24) 129 | ``` 130 | 131 | We run the simulation 132 | 133 | 134 | ```python 135 | serial_expt = c.comets(test_tube, serial_params) 136 | serial_expt.JAVA_CLASSPATH = comp_assay.JAVA_CLASSPATH 137 | serial_expt.run() 138 | ``` 139 | 140 | Running COMETS simulation ... 141 | Done! 142 | 143 | 144 | Now plot the biomass of the two species during the experiment 145 | 146 | 147 | ```python 148 | biomass = serial_expt.total_biomass 149 | biomass['transfer'] = biomass['cycle'] * comp_assay.parameters.all_params['timeStep']/24 150 | 151 | myplot = biomass.drop(columns=['cycle']).plot(x = 'transfer') 152 | myplot.set_ylabel("Biomass (gr.)") 153 | ``` 154 | 155 | 156 | 157 | 158 | ![](img/comp_2.png) 159 | 160 | -------------------------------------------------------------------------------- /docs/build/html/_sources/demographic_noise_two_strains.md.txt: -------------------------------------------------------------------------------- 1 | # Growth and propagation of bacterial colonies on flat surfaces 2 | 3 | This protocol replicates the main text protocol that simulates demographic noise which causes spatial segregation of expanding, equally-fit colonies. 4 | 5 | 6 | ```python 7 | import cobra 8 | import cobra.test # for the ijo1366 model 9 | import sys 10 | import copy 11 | import numpy as np 12 | sys.path.append("/home/jeremy/Dropbox/work_related/harcombe_lab/segre/cometspy") # not necessary if you pip install cometspy 13 | import cometspy as c 14 | ``` 15 | 16 | We will use the E. coli core model. 17 | 18 | 19 | ```python 20 | ecoli = cobra.test.create_test_model("textbook") 21 | ``` 22 | 23 | We will now convert this into a COMETS model, and set two parameter options: the demographic noise parameter, which is called "neutral drift," and convection-based motion parameters. 24 | 25 | 26 | ```python 27 | grid_size = 40 28 | ecoli_comets = c.model(ecoli) 29 | ecoli_comets.reactions.loc[ecoli_comets.reactions.EXCH, "LB"] = -1000 30 | ecoli_comets.add_nonlinear_diffusion_parameters(convNonlinDiffZero = 0., 31 | convNonlinDiffN = 6.e-6, 32 | convNonlinDiffExponent = 1.0, 33 | convNonlinDiffHillN = 2., 34 | convNonlinDiffHillK = 0.001) 35 | ecoli_comets.add_neutral_drift_parameter(0.01) 36 | ``` 37 | 38 | Note: for non-linear diffusion parameters to function, 39 | params.all_params['biomassMotionStyle'] = 'ConvNonlin' Diffusion 2D' 40 | must also be set 41 | 42 | 43 | Let's make an exact copy of the ecoli comets model. 44 | 45 | 46 | ```python 47 | import random 48 | 49 | ecoli_comets2 = copy.copy(ecoli_comets) 50 | ecoli_comets2.id = "e_coli_core2" 51 | 52 | ecoli_comets.initial_pop = [[x, 0, np.random.normal(6.4e-5, 1e-6)] for x in range(grid_size)] 53 | ecoli_comets2.initial_pop = [[x, 0, np.random.normal(6.4e-5, 1e-6)] for x in range(grid_size)] 54 | 55 | ``` 56 | 57 | This simulation will be of a single, centered colony on a 100x100 grid. carbon will be spread homogenously, and be fixed at initial concentration along one end. 58 | 59 | 60 | ```python 61 | ly = c.layout([ecoli_comets, ecoli_comets2]) 62 | ly.grid = [grid_size, grid_size] 63 | ly.set_specific_metabolite("glc__D_e", 2.2e-3) 64 | ly.set_specific_metabolite("h2o_e", 1000) 65 | ly.set_specific_metabolite("nh4_e", 1000) 66 | ly.set_specific_metabolite("o2_e", 1000) 67 | ly.set_specific_metabolite("pi_e", 1000) 68 | ly.set_specific_metabolite("h_e", 1000) 69 | 70 | for x in range(grid_size): 71 | ly.set_specific_static_at_location("glc__D_e", (x, grid_size-1), 1.1e-3) 72 | 73 | ``` 74 | 75 | The main parameter we need to set is biomassmotionstyle, which must be set to "ConvNonlin Diffusion 2D". Then, to capture the spatial information, we'll also log biomass (instead of just total biomass). Finally, we'll also adjust a handful of other parameters. These are stored in the dictionary all_params. 76 | 77 | 78 | ```python 79 | p = c.params() 80 | 81 | cycles = 1000 82 | 83 | p.all_params["biomassMotionStyle"] = "ConvNonlin Diffusion 2D" 84 | p.all_params["writeBiomassLog"] = True 85 | p.all_params["BiomassLogRate"] = cycles 86 | p.all_params["maxCycles"] = cycles 87 | p.all_params["timeStep"] = 0.05 88 | p.all_params["spaceWidth"] = 0.01 89 | p.all_params["defaultDiffConst"] = 6.e-6 90 | p.all_params["maxSpaceBiomass"] = 1000000 91 | p.all_params["minSpaceBiomass"] = 1.0e-9 92 | p.all_params["allowCellOverlap"] = True 93 | p.all_params["growthDiffRate"] = 0 94 | p.all_params["defaultVmax"] = 18.5 95 | p.all_params["defaultKm"] = 0.000015 96 | p.all_params["defaultHill"] = 1 97 | p.all_params["exchangestyle"] = "Monod Style" 98 | ``` 99 | 100 | Now we make a simulation object and run it. This can take awhile. 101 | 102 | 103 | ```python 104 | sim = c.comets(ly, p) 105 | sim.run() 106 | ``` 107 | 108 | 109 | Running COMETS simulation ... 110 | Done! 111 | 112 | 113 | Now let's plot the results. We use the get_biomass_image helper function and then matplotlib to do the plotting. 114 | 115 | 116 | ```python 117 | im = sim.get_biomass_image('e_coli_core', cycles).astype(float) 118 | im = im / np.max(im) 119 | im2 = sim.get_biomass_image('e_coli_core2',cycles).astype(float) 120 | im2 = im2 / np.max(im2) 121 | final = np.zeros((grid_size,grid_size,3)) 122 | final[:,:,1] = im 123 | final[:,:,2] = im2 124 | from matplotlib import pyplot as plt 125 | plt.imshow(final) 126 | ``` 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | ![](img/demographic_noise_two_strains.png) 137 | 138 | 139 | 140 | ```python 141 | 142 | ``` 143 | -------------------------------------------------------------------------------- /docs/build/html/_sources/index.md.txt: -------------------------------------------------------------------------------- 1 | 2 | Welcome to the online dcumentation for COMETS - Computation Of Microbial Ecosystems in Time and Space. 3 | 4 | COMETS is a software platform for performing computer simulations of spatially structured microbial communities. It is based on stoichiometric modeling of the genome-scale metabolic network of individual microbial species using dynamic flux balance analysis, and on a discrete approximation of diffusion. For more information, see [Harcombe et al., Metabolic Resource Allocation in Individual Microbes Determines Ecosystem Interactions and Spatial Dynamics, Cell Reports, 2014](http://www.cell.com/cell-reports/abstract/S2211-1247(14)00280-0). 5 | 6 | COMETS is built and maintained by the [Daniel Segre Lab](http://www.bu.edu/segrelab/) at Boston University. 7 | 8 | COMETS is open-source software. If you are interested in contributing to the development of COMETS and would like to obtain a copy of the code, please contact us: [comets@bu.edu](mailto:comets@bu.edu?Subject=COMETS%20development) 9 | -------------------------------------------------------------------------------- /docs/build/html/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | .. COMETSpy documentation master file, written by Helen Scott, last 2 | updated on 2023-08-21. 3 | You can adapt this file completely to your liking, but it should at 4 | least contain the root `toctree` directive. 5 | 6 | .. The toctree directive controls what links are in the "Navigation" bar 7 | at the top of each page. The "maxdepth" argument determines how many 8 | levels deep the links are shown. The "caption" argument determines the 9 | title of the "Navigation" bar. 10 | 11 | .. toctree:: 12 | :caption: Package Documentation 13 | :maxdepth: 2 14 | :hidden: 15 | 16 | intro 17 | installation 18 | capabilities 19 | 20 | .. toctree:: 21 | :caption: Tutorials 22 | :maxdepth: 2 23 | :hidden: 24 | 25 | getting_started 26 | test_tube 27 | competition_assay 28 | citrate 29 | chemostat 30 | evolution 31 | circular_colony 32 | branching_colony 33 | demographic_noise_two_strains 34 | petri_dish 35 | soil 36 | 37 | .. toctree:: 38 | :caption: API 39 | :maxdepth: 2 40 | :hidden: 41 | 42 | cometspy 43 | 44 | 45 | 46 | Introduction 47 | ============ 48 | 49 | What is COMETSpy? 50 | ---------------------------- 51 | COMETS is a software platform for performing **computer simulations of 52 | metabolism in spatially structured microbial communities**. It is based on 53 | stoichiometric modeling of the genome-scale metabolic network of 54 | individual microbial species (using dynamic flux balance analysis), and 55 | on a discrete approximation of convection-diffusion equations. 56 | 57 | .. Images from COMETS imulations here, i.e. colony morpologies 58 | .. image:: img/comets_results.png 59 | :width: 800 60 | :alt: Results from COMETS simulations 61 | 62 | COMETSpy is a Python package that provides a user-friendly interface to 63 | COMETS. It allows users to easily set up and run simulations, and to 64 | analyze the results. COMETSpy is designed to be used in conjunction with 65 | COMETS. It is not a standalone package, and requires COMETS to be 66 | installed on the user's computer. 67 | 68 | .. Graphic showing the relationship between COMETS and COMETSpy 69 | .. image:: img/cometspy_workflow.png 70 | :width: 800 71 | :alt: The COMETSpy/COMETS workflow 72 | 73 | How to use this Documentation: 74 | ------------------------------ 75 | 76 | This documentation is meant to aide users in installing COMETSpy and 77 | using COMETSpy to run simulations and analyze the results. If you need 78 | help and do not easily find an answer in this documentation, ask your question 79 | in a `new issue on GitHub `_. 80 | **Any question that you have likely indicates a shortcoming in the documentation, 81 | which we will want to fix!** 82 | 83 | Find the module/class/function that you are interested in using in the 84 | table of contents on the left or in the following indices, click on the link to 85 | go to the appropriate documentation: 86 | 87 | * :ref:`modindex` 88 | * :ref:`genindex` 89 | 90 | For a class, the documentation will include a brief description of the class, 91 | the parameters that the class takes, and a list of all attributes, and examples 92 | of how to use the class. The documentation will also include a list of all 93 | the methods that are available for that class. 94 | 95 | For a function, including the methods for a class, the documentation will 96 | include a description of what the function does, a list of the parameters that 97 | the function takes and the objects that the function returns, and examples of 98 | how to use the function. 99 | 100 | Cite Us: 101 | -------- 102 | 103 | The newest version of COMETS, which was developed as a partnership between 104 | researchers at `Boston University `_, 105 | `Yale University `_ and the 106 | `University of Minnesota `_ is fully described 107 | in the following paper: 108 | 109 | `Dukovski, Bajić, Chacón, Quintin, et al.: A metabolic modeling platform for 110 | the computation of microbial ecosystems in time and space (COMETS), Nature 111 | Protocols (2021) https://doi.org/10.1038/s41596-021-00593-3. 112 | `_ 113 | -------------------------------------------------------------------------------- /docs/build/html/_sources/install.rst.txt: -------------------------------------------------------------------------------- 1 | .. Installation documentation page, written by Helen Scott, last 2 | updated on 2023-08-21. 3 | You can adapt this file completely to your liking, but it should at 4 | least contain the root `toctree` directive. 5 | 6 | .. The toctree directive controls what links are in the "Navigation" bar 7 | at the top of each page. The "maxdepth" argument determines how many 8 | levels deep the links are shown. The "caption" argument determines the 9 | title of the "Navigation" bar. 10 | Installation 11 | ============ 12 | 13 | How to Install: 14 | ---------------------------- 15 | pip it: 16 | 17 | pip install cometspy 18 | 19 | Warning! The current version will work only with Pandas version 1.5.0 or higer. 20 | Pandas changed the variable line_terminator to lineterminator in the 'csv' modules. 21 | More at: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.html 22 | "Changed in version 1.5.0: Previously was line_terminator, changed for consistency with read_csv and the standard library ‘csv’ module." 23 | 24 | If you get an error message about line_terminator, update your pandas package. 25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/build/html/_sources/installation.md.txt: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | 4 | The COMETS Python toolbox (cometspy) is available from the package manager PyPI cometspy using the pip command. To install, run: 5 | 6 | ``` 7 | pip install cometspy 8 | ``` 9 | 10 | Warning! The current version will work only with Pandas version 1.5.0 or higer. 11 | Pandas changed the variable line_terminator to lineterminator in the 'csv' modules. 12 | More at: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.html 13 | "Changed in version 1.5.0: Previously was line_terminator, changed for consistency with read_csv and the standard library ‘csv’ module." 14 | 15 | If you get an error message about line_terminator, update your pandas package. 16 | 17 | Of course, to use cometspy you first need to install COMETS on your computer. See section below. 18 | 19 | ## Installation of COMETS 20 | There are two ways to install COMETS: using the COMETS installer or by unpacking the .tar.gz file. The easiest is to use the installer, especially recommended for individual use on a laptop or desktop. The installer can be downloaded from: https://comets.bu.edu The users are required to register, after which they can obtain the installer appropriate for their system. The installer guides the user through a standard GUI installation procedure that includes accepting the license agreement, choosing the directory where COMETS will be installed (the default directory is recommended), the option to create a desktop shortcut etc. The installer is available for the Windows, MacOS and Linux systems. 21 | 22 | In addition to the GUI installer, we provide the comets_x.x.x.tar.gz file for custom installation, typically on a Linux system. The file should be unpacked in the directory were COMETS will be installed with: 23 | 24 | ``` 25 | $tar -xzvf comets_x.x.x.tar.gz ./ 26 | ``` 27 | 28 | This will create the comets installation directory. 29 | 30 | In Unix systems (Linux or MacOS) the user also needs to specify the COMETS_HOME environment variable, which has to point to the comets installation folder. In Linux systems, this is done by adding the following line to the .bashrc file located in the home folder: 31 | ``` 32 | export COMETS_HOME = "/your/comets/installation/folder" 33 | ``` 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /docs/build/html/_sources/intro.rst.txt: -------------------------------------------------------------------------------- 1 | Introduction 2 | ============ 3 | 4 | What is COMETSpy? 5 | ---------------------------- 6 | COMETS is a software platform for performing **computer simulations of 7 | metabolism in spatially structured microbial communities**. It is based on 8 | stoichiometric modeling of the genome-scale metabolic network of 9 | individual microbial species (using dynamic flux balance analysis), and 10 | on a discrete approximation of convection-diffusion equations. 11 | 12 | .. Images from COMETS simulations here, i.e. colony morpologies 13 | .. image:: img/comets_results.png 14 | :width: 800 15 | :alt: Results from COMETS simulations 16 | 17 | COMETSpy is a Python package that provides a user-friendly interface to 18 | COMETS. It allows users to easily set up and run simulations, and to 19 | analyze the results. COMETSpy is designed to be used in conjunction with 20 | COMETS. It is not a standalone package, and requires COMETS to be 21 | installed on the user's computer. 22 | 23 | .. Graphic showing the relationship between COMETS and COMETSpy 24 | .. image:: img/cometspy_workflow.png 25 | :width: 800 26 | :alt: The COMETSpy/COMETS workflow 27 | 28 | How to use this Documentation: 29 | ------------------------------ 30 | 31 | This documentation is meant to aide users in installing COMETSpy and 32 | using COMETSpy to run simulations and analyze the results. If you need 33 | help and do not easily find an answer in this documentation, ask your question 34 | in a `new issue on GitHub `_. 35 | **Any question that you have likely indicates a shortcoming in the documentation, 36 | which we will want to fix!** 37 | 38 | Find the module/class/function that you are interested in using in the 39 | table of contents on the left or in the following indices, click on the link to 40 | go to the appropriate documentation: 41 | 42 | * :ref:`modindex` 43 | * :ref:`genindex` 44 | 45 | For a class, the documentation will include a brief description of the class, 46 | the parameters that the class takes, and a list of all attributes, and examples 47 | of how to use the class. The documentation will also include a list of all 48 | the methods that are available for that class. 49 | 50 | For a function, including the methods for a class, the documentation will 51 | include a description of what the function does, a list of the parameters that 52 | the function takes and the objects that the function returns, and examples of 53 | how to use the function. 54 | 55 | Cite Us: 56 | -------- 57 | 58 | The newest version of COMETS, which was developed as a partnership between 59 | researchers at `Boston University `_, 60 | `Yale University `_ and the 61 | `University of Minnesota `_ is fully described 62 | in the following paper: 63 | 64 | `Dukovski, Bajić, Chacón, Quintin, et al.: A metabolic modeling platform for 65 | the computation of microbial ecosystems in time and space (COMETS), Nature 66 | Protocols (2021) https://doi.org/10.1038/s41596-021-00593-3. 67 | `_ 68 | -------------------------------------------------------------------------------- /docs/build/html/_sources/modules.rst.txt: -------------------------------------------------------------------------------- 1 | cometspy 2 | ======== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | cometspy 8 | -------------------------------------------------------------------------------- /docs/build/html/_static/_sphinx_javascript_frameworks_compat.js: -------------------------------------------------------------------------------- 1 | /* Compatability shim for jQuery and underscores.js. 2 | * 3 | * Copyright Sphinx contributors 4 | * Released under the two clause BSD licence 5 | */ 6 | 7 | /** 8 | * small helper function to urldecode strings 9 | * 10 | * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL 11 | */ 12 | jQuery.urldecode = function(x) { 13 | if (!x) { 14 | return x 15 | } 16 | return decodeURIComponent(x.replace(/\+/g, ' ')); 17 | }; 18 | 19 | /** 20 | * small helper function to urlencode strings 21 | */ 22 | jQuery.urlencode = encodeURIComponent; 23 | 24 | /** 25 | * This function returns the parsed url parameters of the 26 | * current request. Multiple values per key are supported, 27 | * it will always return arrays of strings for the value parts. 28 | */ 29 | jQuery.getQueryParameters = function(s) { 30 | if (typeof s === 'undefined') 31 | s = document.location.search; 32 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 33 | var result = {}; 34 | for (var i = 0; i < parts.length; i++) { 35 | var tmp = parts[i].split('=', 2); 36 | var key = jQuery.urldecode(tmp[0]); 37 | var value = jQuery.urldecode(tmp[1]); 38 | if (key in result) 39 | result[key].push(value); 40 | else 41 | result[key] = [value]; 42 | } 43 | return result; 44 | }; 45 | 46 | /** 47 | * highlight a given string on a jquery object by wrapping it in 48 | * span elements with the given class name. 49 | */ 50 | jQuery.fn.highlightText = function(text, className) { 51 | function highlight(node, addItems) { 52 | if (node.nodeType === 3) { 53 | var val = node.nodeValue; 54 | var pos = val.toLowerCase().indexOf(text); 55 | if (pos >= 0 && 56 | !jQuery(node.parentNode).hasClass(className) && 57 | !jQuery(node.parentNode).hasClass("nohighlight")) { 58 | var span; 59 | var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); 60 | if (isInSVG) { 61 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 62 | } else { 63 | span = document.createElement("span"); 64 | span.className = className; 65 | } 66 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 67 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 68 | document.createTextNode(val.substr(pos + text.length)), 69 | node.nextSibling)); 70 | node.nodeValue = val.substr(0, pos); 71 | if (isInSVG) { 72 | var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 73 | var bbox = node.parentElement.getBBox(); 74 | rect.x.baseVal.value = bbox.x; 75 | rect.y.baseVal.value = bbox.y; 76 | rect.width.baseVal.value = bbox.width; 77 | rect.height.baseVal.value = bbox.height; 78 | rect.setAttribute('class', className); 79 | addItems.push({ 80 | "parent": node.parentNode, 81 | "target": rect}); 82 | } 83 | } 84 | } 85 | else if (!jQuery(node).is("button, select, textarea")) { 86 | jQuery.each(node.childNodes, function() { 87 | highlight(this, addItems); 88 | }); 89 | } 90 | } 91 | var addItems = []; 92 | var result = this.each(function() { 93 | highlight(this, addItems); 94 | }); 95 | for (var i = 0; i < addItems.length; ++i) { 96 | jQuery(addItems[i].parent).before(addItems[i].target); 97 | } 98 | return result; 99 | }; 100 | 101 | /* 102 | * backward compatibility for jQuery.browser 103 | * This will be supported until firefox bug is fixed. 104 | */ 105 | if (!jQuery.browser) { 106 | jQuery.uaMatch = function(ua) { 107 | ua = ua.toLowerCase(); 108 | 109 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 110 | /(webkit)[ \/]([\w.]+)/.exec(ua) || 111 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 112 | /(msie) ([\w.]+)/.exec(ua) || 113 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || 114 | []; 115 | 116 | return { 117 | browser: match[ 1 ] || "", 118 | version: match[ 2 ] || "0" 119 | }; 120 | }; 121 | jQuery.browser = {}; 122 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; 123 | } 124 | -------------------------------------------------------------------------------- /docs/build/html/_static/cometspy_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/cometspy_logo.png -------------------------------------------------------------------------------- /docs/build/html/_static/cometspy_logo_white_bkgd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/cometspy_logo_white_bkgd.png -------------------------------------------------------------------------------- /docs/build/html/_static/css/badge_only.css: -------------------------------------------------------------------------------- 1 | .clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/lato-bold.woff -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/lato-normal.woff -------------------------------------------------------------------------------- /docs/build/html/_static/css/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/css/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /docs/build/html/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Base JavaScript utilities for all Sphinx HTML documentation. 6 | * 7 | * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | "use strict"; 12 | 13 | const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ 14 | "TEXTAREA", 15 | "INPUT", 16 | "SELECT", 17 | "BUTTON", 18 | ]); 19 | 20 | const _ready = (callback) => { 21 | if (document.readyState !== "loading") { 22 | callback(); 23 | } else { 24 | document.addEventListener("DOMContentLoaded", callback); 25 | } 26 | }; 27 | 28 | /** 29 | * Small JavaScript module for the documentation. 30 | */ 31 | const Documentation = { 32 | init: () => { 33 | Documentation.initDomainIndexTable(); 34 | Documentation.initOnKeyListeners(); 35 | }, 36 | 37 | /** 38 | * i18n support 39 | */ 40 | TRANSLATIONS: {}, 41 | PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), 42 | LOCALE: "unknown", 43 | 44 | // gettext and ngettext don't access this so that the functions 45 | // can safely bound to a different name (_ = Documentation.gettext) 46 | gettext: (string) => { 47 | const translated = Documentation.TRANSLATIONS[string]; 48 | switch (typeof translated) { 49 | case "undefined": 50 | return string; // no translation 51 | case "string": 52 | return translated; // translation exists 53 | default: 54 | return translated[0]; // (singular, plural) translation tuple exists 55 | } 56 | }, 57 | 58 | ngettext: (singular, plural, n) => { 59 | const translated = Documentation.TRANSLATIONS[singular]; 60 | if (typeof translated !== "undefined") 61 | return translated[Documentation.PLURAL_EXPR(n)]; 62 | return n === 1 ? singular : plural; 63 | }, 64 | 65 | addTranslations: (catalog) => { 66 | Object.assign(Documentation.TRANSLATIONS, catalog.messages); 67 | Documentation.PLURAL_EXPR = new Function( 68 | "n", 69 | `return (${catalog.plural_expr})` 70 | ); 71 | Documentation.LOCALE = catalog.locale; 72 | }, 73 | 74 | /** 75 | * helper function to focus on search bar 76 | */ 77 | focusSearchBar: () => { 78 | document.querySelectorAll("input[name=q]")[0]?.focus(); 79 | }, 80 | 81 | /** 82 | * Initialise the domain index toggle buttons 83 | */ 84 | initDomainIndexTable: () => { 85 | const toggler = (el) => { 86 | const idNumber = el.id.substr(7); 87 | const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); 88 | if (el.src.substr(-9) === "minus.png") { 89 | el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; 90 | toggledRows.forEach((el) => (el.style.display = "none")); 91 | } else { 92 | el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; 93 | toggledRows.forEach((el) => (el.style.display = "")); 94 | } 95 | }; 96 | 97 | const togglerElements = document.querySelectorAll("img.toggler"); 98 | togglerElements.forEach((el) => 99 | el.addEventListener("click", (event) => toggler(event.currentTarget)) 100 | ); 101 | togglerElements.forEach((el) => (el.style.display = "")); 102 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); 103 | }, 104 | 105 | initOnKeyListeners: () => { 106 | // only install a listener if it is really needed 107 | if ( 108 | !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && 109 | !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS 110 | ) 111 | return; 112 | 113 | document.addEventListener("keydown", (event) => { 114 | // bail for input elements 115 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 116 | // bail with special keys 117 | if (event.altKey || event.ctrlKey || event.metaKey) return; 118 | 119 | if (!event.shiftKey) { 120 | switch (event.key) { 121 | case "ArrowLeft": 122 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 123 | 124 | const prevLink = document.querySelector('link[rel="prev"]'); 125 | if (prevLink && prevLink.href) { 126 | window.location.href = prevLink.href; 127 | event.preventDefault(); 128 | } 129 | break; 130 | case "ArrowRight": 131 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 132 | 133 | const nextLink = document.querySelector('link[rel="next"]'); 134 | if (nextLink && nextLink.href) { 135 | window.location.href = nextLink.href; 136 | event.preventDefault(); 137 | } 138 | break; 139 | } 140 | } 141 | 142 | // some keyboard layouts may need Shift to get / 143 | switch (event.key) { 144 | case "/": 145 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; 146 | Documentation.focusSearchBar(); 147 | event.preventDefault(); 148 | } 149 | }); 150 | }, 151 | }; 152 | 153 | // quick alias for translations 154 | const _ = Documentation.gettext; 155 | 156 | _ready(Documentation.init); 157 | -------------------------------------------------------------------------------- /docs/build/html/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | const DOCUMENTATION_OPTIONS = { 2 | VERSION: '', 3 | LANGUAGE: 'en', 4 | COLLAPSE_INDEX: false, 5 | BUILDER: 'html', 6 | FILE_SUFFIX: '.html', 7 | LINK_SUFFIX: '.html', 8 | HAS_SOURCE: true, 9 | SOURCELINK_SUFFIX: '.txt', 10 | NAVIGATION_WITH_KEYS: false, 11 | SHOW_SEARCH_SUMMARY: true, 12 | ENABLE_SEARCH_SHORTCUTS: true, 13 | }; -------------------------------------------------------------------------------- /docs/build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/file.png -------------------------------------------------------------------------------- /docs/build/html/_static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /docs/build/html/_static/js/html5shiv-printshiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/build/html/_static/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/build/html/_static/js/theme.js: -------------------------------------------------------------------------------- 1 | !function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t0 63 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 64 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 65 | var s_v = "^(" + C + ")?" + v; // vowel in stem 66 | 67 | this.stemWord = function (w) { 68 | var stem; 69 | var suffix; 70 | var firstch; 71 | var origword = w; 72 | 73 | if (w.length < 3) 74 | return w; 75 | 76 | var re; 77 | var re2; 78 | var re3; 79 | var re4; 80 | 81 | firstch = w.substr(0,1); 82 | if (firstch == "y") 83 | w = firstch.toUpperCase() + w.substr(1); 84 | 85 | // Step 1a 86 | re = /^(.+?)(ss|i)es$/; 87 | re2 = /^(.+?)([^s])s$/; 88 | 89 | if (re.test(w)) 90 | w = w.replace(re,"$1$2"); 91 | else if (re2.test(w)) 92 | w = w.replace(re2,"$1$2"); 93 | 94 | // Step 1b 95 | re = /^(.+?)eed$/; 96 | re2 = /^(.+?)(ed|ing)$/; 97 | if (re.test(w)) { 98 | var fp = re.exec(w); 99 | re = new RegExp(mgr0); 100 | if (re.test(fp[1])) { 101 | re = /.$/; 102 | w = w.replace(re,""); 103 | } 104 | } 105 | else if (re2.test(w)) { 106 | var fp = re2.exec(w); 107 | stem = fp[1]; 108 | re2 = new RegExp(s_v); 109 | if (re2.test(stem)) { 110 | w = stem; 111 | re2 = /(at|bl|iz)$/; 112 | re3 = new RegExp("([^aeiouylsz])\\1$"); 113 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 114 | if (re2.test(w)) 115 | w = w + "e"; 116 | else if (re3.test(w)) { 117 | re = /.$/; 118 | w = w.replace(re,""); 119 | } 120 | else if (re4.test(w)) 121 | w = w + "e"; 122 | } 123 | } 124 | 125 | // Step 1c 126 | re = /^(.+?)y$/; 127 | if (re.test(w)) { 128 | var fp = re.exec(w); 129 | stem = fp[1]; 130 | re = new RegExp(s_v); 131 | if (re.test(stem)) 132 | w = stem + "i"; 133 | } 134 | 135 | // Step 2 136 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 137 | if (re.test(w)) { 138 | var fp = re.exec(w); 139 | stem = fp[1]; 140 | suffix = fp[2]; 141 | re = new RegExp(mgr0); 142 | if (re.test(stem)) 143 | w = stem + step2list[suffix]; 144 | } 145 | 146 | // Step 3 147 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 148 | if (re.test(w)) { 149 | var fp = re.exec(w); 150 | stem = fp[1]; 151 | suffix = fp[2]; 152 | re = new RegExp(mgr0); 153 | if (re.test(stem)) 154 | w = stem + step3list[suffix]; 155 | } 156 | 157 | // Step 4 158 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 159 | re2 = /^(.+?)(s|t)(ion)$/; 160 | if (re.test(w)) { 161 | var fp = re.exec(w); 162 | stem = fp[1]; 163 | re = new RegExp(mgr1); 164 | if (re.test(stem)) 165 | w = stem; 166 | } 167 | else if (re2.test(w)) { 168 | var fp = re2.exec(w); 169 | stem = fp[1] + fp[2]; 170 | re2 = new RegExp(mgr1); 171 | if (re2.test(stem)) 172 | w = stem; 173 | } 174 | 175 | // Step 5 176 | re = /^(.+?)e$/; 177 | if (re.test(w)) { 178 | var fp = re.exec(w); 179 | stem = fp[1]; 180 | re = new RegExp(mgr1); 181 | re2 = new RegExp(meq1); 182 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 183 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 184 | w = stem; 185 | } 186 | re = /ll$/; 187 | re2 = new RegExp(mgr1); 188 | if (re.test(w) && re2.test(w)) { 189 | re = /.$/; 190 | w = w.replace(re,""); 191 | } 192 | 193 | // and turn initial Y back to y 194 | if (firstch == "y") 195 | w = firstch.toLowerCase() + w.substr(1); 196 | return w; 197 | } 198 | } 199 | 200 | -------------------------------------------------------------------------------- /docs/build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/minus.png -------------------------------------------------------------------------------- /docs/build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/_static/plus.png -------------------------------------------------------------------------------- /docs/build/html/_static/pygments.css: -------------------------------------------------------------------------------- 1 | pre { line-height: 125%; } 2 | td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 3 | span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 4 | td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 5 | span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 6 | .highlight .hll { background-color: #ffffcc } 7 | .highlight { background: #f8f8f8; } 8 | .highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ 9 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 10 | .highlight .k { color: #008000; font-weight: bold } /* Keyword */ 11 | .highlight .o { color: #666666 } /* Operator */ 12 | .highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ 13 | .highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ 14 | .highlight .cp { color: #9C6500 } /* Comment.Preproc */ 15 | .highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ 16 | .highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ 17 | .highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ 18 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 19 | .highlight .ge { font-style: italic } /* Generic.Emph */ 20 | .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ 21 | .highlight .gr { color: #E40000 } /* Generic.Error */ 22 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 23 | .highlight .gi { color: #008400 } /* Generic.Inserted */ 24 | .highlight .go { color: #717171 } /* Generic.Output */ 25 | .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ 26 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 27 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 28 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 29 | .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ 30 | .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ 31 | .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ 32 | .highlight .kp { color: #008000 } /* Keyword.Pseudo */ 33 | .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ 34 | .highlight .kt { color: #B00040 } /* Keyword.Type */ 35 | .highlight .m { color: #666666 } /* Literal.Number */ 36 | .highlight .s { color: #BA2121 } /* Literal.String */ 37 | .highlight .na { color: #687822 } /* Name.Attribute */ 38 | .highlight .nb { color: #008000 } /* Name.Builtin */ 39 | .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ 40 | .highlight .no { color: #880000 } /* Name.Constant */ 41 | .highlight .nd { color: #AA22FF } /* Name.Decorator */ 42 | .highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ 43 | .highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ 44 | .highlight .nf { color: #0000FF } /* Name.Function */ 45 | .highlight .nl { color: #767600 } /* Name.Label */ 46 | .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ 47 | .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ 48 | .highlight .nv { color: #19177C } /* Name.Variable */ 49 | .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ 50 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 51 | .highlight .mb { color: #666666 } /* Literal.Number.Bin */ 52 | .highlight .mf { color: #666666 } /* Literal.Number.Float */ 53 | .highlight .mh { color: #666666 } /* Literal.Number.Hex */ 54 | .highlight .mi { color: #666666 } /* Literal.Number.Integer */ 55 | .highlight .mo { color: #666666 } /* Literal.Number.Oct */ 56 | .highlight .sa { color: #BA2121 } /* Literal.String.Affix */ 57 | .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ 58 | .highlight .sc { color: #BA2121 } /* Literal.String.Char */ 59 | .highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ 60 | .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ 61 | .highlight .s2 { color: #BA2121 } /* Literal.String.Double */ 62 | .highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ 63 | .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ 64 | .highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ 65 | .highlight .sx { color: #008000 } /* Literal.String.Other */ 66 | .highlight .sr { color: #A45A77 } /* Literal.String.Regex */ 67 | .highlight .s1 { color: #BA2121 } /* Literal.String.Single */ 68 | .highlight .ss { color: #19177C } /* Literal.String.Symbol */ 69 | .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ 70 | .highlight .fm { color: #0000FF } /* Name.Function.Magic */ 71 | .highlight .vc { color: #19177C } /* Name.Variable.Class */ 72 | .highlight .vg { color: #19177C } /* Name.Variable.Global */ 73 | .highlight .vi { color: #19177C } /* Name.Variable.Instance */ 74 | .highlight .vm { color: #19177C } /* Name.Variable.Magic */ 75 | .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/build/html/_static/sphinx_highlight.js: -------------------------------------------------------------------------------- 1 | /* Highlighting utilities for Sphinx HTML documentation. */ 2 | "use strict"; 3 | 4 | const SPHINX_HIGHLIGHT_ENABLED = true 5 | 6 | /** 7 | * highlight a given string on a node by wrapping it in 8 | * span elements with the given class name. 9 | */ 10 | const _highlight = (node, addItems, text, className) => { 11 | if (node.nodeType === Node.TEXT_NODE) { 12 | const val = node.nodeValue; 13 | const parent = node.parentNode; 14 | const pos = val.toLowerCase().indexOf(text); 15 | if ( 16 | pos >= 0 && 17 | !parent.classList.contains(className) && 18 | !parent.classList.contains("nohighlight") 19 | ) { 20 | let span; 21 | 22 | const closestNode = parent.closest("body, svg, foreignObject"); 23 | const isInSVG = closestNode && closestNode.matches("svg"); 24 | if (isInSVG) { 25 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 26 | } else { 27 | span = document.createElement("span"); 28 | span.classList.add(className); 29 | } 30 | 31 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 32 | const rest = document.createTextNode(val.substr(pos + text.length)); 33 | parent.insertBefore( 34 | span, 35 | parent.insertBefore( 36 | rest, 37 | node.nextSibling 38 | ) 39 | ); 40 | node.nodeValue = val.substr(0, pos); 41 | /* There may be more occurrences of search term in this node. So call this 42 | * function recursively on the remaining fragment. 43 | */ 44 | _highlight(rest, addItems, text, className); 45 | 46 | if (isInSVG) { 47 | const rect = document.createElementNS( 48 | "http://www.w3.org/2000/svg", 49 | "rect" 50 | ); 51 | const bbox = parent.getBBox(); 52 | rect.x.baseVal.value = bbox.x; 53 | rect.y.baseVal.value = bbox.y; 54 | rect.width.baseVal.value = bbox.width; 55 | rect.height.baseVal.value = bbox.height; 56 | rect.setAttribute("class", className); 57 | addItems.push({ parent: parent, target: rect }); 58 | } 59 | } 60 | } else if (node.matches && !node.matches("button, select, textarea")) { 61 | node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); 62 | } 63 | }; 64 | const _highlightText = (thisNode, text, className) => { 65 | let addItems = []; 66 | _highlight(thisNode, addItems, text, className); 67 | addItems.forEach((obj) => 68 | obj.parent.insertAdjacentElement("beforebegin", obj.target) 69 | ); 70 | }; 71 | 72 | /** 73 | * Small JavaScript module for the documentation. 74 | */ 75 | const SphinxHighlight = { 76 | 77 | /** 78 | * highlight the search words provided in localstorage in the text 79 | */ 80 | highlightSearchWords: () => { 81 | if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight 82 | 83 | // get and clear terms from localstorage 84 | const url = new URL(window.location); 85 | const highlight = 86 | localStorage.getItem("sphinx_highlight_terms") 87 | || url.searchParams.get("highlight") 88 | || ""; 89 | localStorage.removeItem("sphinx_highlight_terms") 90 | url.searchParams.delete("highlight"); 91 | window.history.replaceState({}, "", url); 92 | 93 | // get individual terms from highlight string 94 | const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); 95 | if (terms.length === 0) return; // nothing to do 96 | 97 | // There should never be more than one element matching "div.body" 98 | const divBody = document.querySelectorAll("div.body"); 99 | const body = divBody.length ? divBody[0] : document.querySelector("body"); 100 | window.setTimeout(() => { 101 | terms.forEach((term) => _highlightText(body, term, "highlighted")); 102 | }, 10); 103 | 104 | const searchBox = document.getElementById("searchbox"); 105 | if (searchBox === null) return; 106 | searchBox.appendChild( 107 | document 108 | .createRange() 109 | .createContextualFragment( 110 | '" 114 | ) 115 | ); 116 | }, 117 | 118 | /** 119 | * helper function to hide the search marks again 120 | */ 121 | hideSearchWords: () => { 122 | document 123 | .querySelectorAll("#searchbox .highlight-link") 124 | .forEach((el) => el.remove()); 125 | document 126 | .querySelectorAll("span.highlighted") 127 | .forEach((el) => el.classList.remove("highlighted")); 128 | localStorage.removeItem("sphinx_highlight_terms") 129 | }, 130 | 131 | initEscapeListener: () => { 132 | // only install a listener if it is really needed 133 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; 134 | 135 | document.addEventListener("keydown", (event) => { 136 | // bail for input elements 137 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 138 | // bail with special keys 139 | if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; 140 | if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { 141 | SphinxHighlight.hideSearchWords(); 142 | event.preventDefault(); 143 | } 144 | }); 145 | }, 146 | }; 147 | 148 | _ready(() => { 149 | /* Do not call highlightSearchWords() when we are on the search page. 150 | * It will highlight words from the *previous* search query. 151 | */ 152 | if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); 153 | SphinxHighlight.initEscapeListener(); 154 | }); 155 | -------------------------------------------------------------------------------- /docs/build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/html/objects.inv -------------------------------------------------------------------------------- /docs/build/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/build/objects.inv -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | %SPHINXBUILD% >NUL 2>NUL 14 | if errorlevel 9009 ( 15 | echo. 16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 17 | echo.installed, then set the SPHINXBUILD environment variable to point 18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 19 | echo.may add the Sphinx directory to PATH. 20 | echo. 21 | echo.If you don't have Sphinx installed, grab it from 22 | echo.https://www.sphinx-doc.org/ 23 | exit /b 1 24 | ) 25 | 26 | if "%1" == "" goto help 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | alabaster 2 | Babel 3 | Markdown 4 | markdown-it-py 5 | MarkupSafe 6 | myst-parser 7 | pandocfilters 8 | Sphinx 9 | sphinx-rtd-theme 10 | sphinxcontrib-applehelp 11 | sphinxcontrib-devhelp 12 | sphinxcontrib-htmlhelp 13 | sphinxcontrib-jquery 14 | sphinxcontrib-jsmath 15 | sphinxcontrib-qthelp 16 | sphinxcontrib-serializinghtml 17 | linkify 18 | linkify-it-py 19 | -------------------------------------------------------------------------------- /docs/source/#index.rst#: -------------------------------------------------------------------------------- 1 | .. COMETSpy documentation master file, written by Helen Scott, last 2 | updated on 2023-08-21. 3 | You can adapt this file completely to your liking, but it should at 4 | least contain the root `toctree` directive. 5 | 6 | .. The toctree directive controls what links are in the "Navigation" bar 7 | at the top of each page. The "maxdepth" argument determines how many 8 | levels deep the links are shown. The "caption" argument determines the 9 | title of the "Navigation" bar. 10 | 11 | .. toctree:: 12 | :caption: Package Documentation 13 | :maxdepth: 2 14 | :hidden: 15 | 16 | intro 17 | installation 18 | capabilities 19 | 20 | .. toctree:: 21 | :caption: Tutorials 22 | :maxdepth: 2 23 | :hidden: 24 | 25 | getting_started 26 | test_tube 27 | competition_assay 28 | citrate 29 | chemostat 30 | evolution 31 | circular_colony 32 | branching_colony 33 | demographic_noise_two_strains 34 | petri_dish 35 | soil 36 | 37 | .. toctree:: 38 | :caption: API 39 | :maxdepth: 2 40 | :hidden: 41 | 42 | modules 43 | cometspy 44 | 45 | 46 | 47 | Introduction 48 | ============ 49 | 50 | What is COMETSpy? 51 | ---------------------------- 52 | COMETS is a software platform for performing **computer simulations of 53 | metabolism in spatially structured microbial communities**. It is based on 54 | stoichiometric modeling of the genome-scale metabolic network of 55 | individual microbial species (using dynamic flux balance analysis), and 56 | on a discrete approximation of convection-diffusion equations. 57 | 58 | .. Images from COMETS imulations here, i.e. colony morpologies 59 | .. image:: img/comets_results.png 60 | :width: 800 61 | :alt: Results from COMETS simulations 62 | 63 | COMETSpy is a Python package that provides a user-friendly interface to 64 | COMETS. It allows users to easily set up and run simulations, and to 65 | analyze the results. COMETSpy is designed to be used in conjunction with 66 | COMETS. It is not a standalone package, and requires COMETS to be 67 | installed on the user's computer. 68 | 69 | .. Graphic showing the relationship between COMETS and COMETSpy 70 | .. image:: img/cometspy_workflow.png 71 | :width: 800 72 | :alt: The COMETSpy/COMETS workflow 73 | 74 | How to use this Documentation: 75 | ------------------------------ 76 | 77 | This documentation is meant to aide users in installing COMETSpy and 78 | using COMETSpy to run simulations and analyze the results. If you need 79 | help and do not easily find an answer in this documentation, ask your question 80 | in a `new issue on GitHub `_. 81 | **Any question that you have likely indicates a shortcoming in the documentation, 82 | which we will want to fix!** 83 | 84 | Find the module/class/function that you are interested in using in the 85 | table of contents on the left or in the following indices, click on the link to 86 | go to the appropriate documentation: 87 | 88 | * :ref:`modindex` 89 | * :ref:`genindex` 90 | 91 | For a class, the documentation will include a brief description of the class, 92 | the parameters that the class takes, and a list of all attributes, and examples 93 | of how to use the class. The documentation will also include a list of all 94 | the methods that are available for that class. 95 | 96 | For a function, including the methods for a class, the documentation will 97 | include a description of what the function does, a list of the parameters that 98 | the function takes and the objects that the function returns, and examples of 99 | how to use the function. 100 | 101 | Cite Us: 102 | -------- 103 | 104 | The newest version of COMETS, which was developed as a partnership between 105 | researchers at `Boston University `_, 106 | `Yale University `_ and the 107 | `University of Minnesota `_ is fully described 108 | in the following paper: 109 | 110 | `Dukovski, Bajić, Chacón, Quintin, et al.: A metabolic modeling platform for 111 | the computation of microbial ecosystems in time and space (COMETS), Nature 112 | Protocols (2021) https://doi.org/10.1038/s41596-021-00593-3. 113 | `_ 114 | -------------------------------------------------------------------------------- /docs/source/README.md: -------------------------------------------------------------------------------- 1 | # COMETS Manual 2 | 3 | This is the repository for the COMETS (Computation Of Microbial Ecosystems in Time and Space) project documentation. 4 | 5 | These documents are rendered with [MkDocs](https://www.mkdocs.org/) and written in [Markdown](https://daringfireball.net/projects/markdown/). -------------------------------------------------------------------------------- /docs/source/_static/cometspy_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/_static/cometspy_logo.png -------------------------------------------------------------------------------- /docs/source/capabilities.md: -------------------------------------------------------------------------------- 1 | # COMETS Capabilities 2 | 3 | The core of COMETS is the simulation of the growth of microbial populations by maximizing an objective reaction, usually biomass production, in an iterative way. An initial amount of biomass of one or more species (defined by their metaboli models) is seeded in an environment containing a list of specified nutrients. In each iteration, both the amount of biomass and the environment are updated using FBA predictions. 4 | 5 | 6 | ## Capabilities in space 7 | 8 | COMETS is capable of simulating microbial growth in a spatially structured environment. This is achieved by partitioning the simulation space ("world") in a "grid" of smaller spaces. Inside each space, growth is considered to be well-mixed. Both nutrients and biomass can then propagate to contiguous spaces as simulation proceeds. 9 | 10 | - 2D and 3D simulation "worlds" 11 | 12 | In addition to well-mixed conditions, COMETS can simulate 2D and 3D spatially structured environments. This enables simulation of, for instance, growth of colonies on 2D surfaces such as a Petri dish, or 3D structures such as tumors, bacterial colonies in 3D matrix, etc. 13 | 14 | 15 | - Diffusive and convective propagation of biomass in space 16 | 17 | In simulations with spatial structure, different modes of biomass propagation are implemented. The diffusive mode simulates the propagation of free swimming motile bacteria, while the convective mode simulates the propagation of bacteria by mutual pushing. The two modes of propagation can be combined. 18 | 19 | 20 | - Substrate-dependent nutrient and biomass propagation 21 | 22 | The diffusivity of nutrients as well as the propagation properties of the biomass depend on the substrate properties such as agar density, cell substrate friction coefficient etc. 23 | 24 | 25 | - Boundary conditions 26 | 27 | Two types of boundary conditions are implemented. Fixed value and fixed source or sink rate. 28 | 29 | 30 | ## Biological capabilities 31 | 32 | COMETS features many interesting biological capabilities to refine and improve the predictions of stoichiometric models, as well as to simulate different types of biologically realistic conditions. 33 | 34 | - Lag-phases in microbial growth 35 | 36 | Lag-phases are modelled as simulated growth activation of the colonies. 37 | 38 | 39 | - Continuous (chemostat) and batch growth modes 40 | 41 | In chemostat mode, the user controls the rate of replenishment of the nutrient. In batch mode, the user controls dilution and frequency. 42 | 43 | 44 | * Simulation of multispecies communities 45 | 46 | Simulation of two or more species (up to hundreds) can be performed in both species overlapping or non-overlapping spatial distribution, or in well-mixed conditions. 47 | 48 | 49 | * Parsimonious dFBA 50 | 51 | Usually, any metabolic model has multiple optimal solutions. One way to choose among them is to assume that the cell will minimize the total flux through the metabolic network. To achieve this, parsimonious FBA first optimizes the objective function, e.g. growth. Then, it performs a second optimization by fixing growth at the previously obtained optimal level and minimizing the total flux through the network. 52 | 53 | 54 | * Cell death 55 | 56 | A simple model of cell death is implemented with each species assigned death rate. 57 | 58 | 59 | - Neutral population drift 60 | 61 | The presence of demographic noise can result in random variations in the abundance of different species in a simulation. This is especially useful in the batch-growth mode, where dilution bottlenecks can have a significant impact on growing populations. 62 | 63 | 64 | * Evolutionary processes 65 | 66 | Comets allows for evolutionary simulations, including random mutation and drift during simulations. Currently, the only mutations that are available are reaction deletions. 67 | 68 | 69 | ## Computational capabilities 70 | COMETS software is implemented in the JAVA language. Therefore, it is highly portable and independent on the operative system. COMETS offers the following simulation capabilities. 71 | 72 | - Graphical User Interface (GUI) 73 | 74 | In addition to the command line, COMETS simulations can be run using a graphical user interface that includes visualization tools. 75 | 76 | 77 | - Parallelized dFBA 78 | 79 | Runs in multi-CPU systems as multi-threaded process for greater computational performance. 80 | 81 | 82 | - MATLAB toolbox 83 | 84 | A toolbox in MATLAB for modifying the input files for COMETS in a programmatic way. 85 | 86 | 87 | - Python toolbox 88 | 89 | A toolbox in Python for modifying the input files for COMETS in a programmatic way. 90 | -------------------------------------------------------------------------------- /docs/source/circular_colony.md: -------------------------------------------------------------------------------- 1 | # Growth of a circular colony 2 | 3 | This protocol replicates the main text protocol that simulates colony expansion via mechanical pushing among the growing cells. One of the characteristics of the implemented model is that it undergoes a transition in colony morphology depending on the value of the dense packing parameter. In this protocol, we will choose parameters that result in a round colony. In "branching_colony," we will choose parameters that result in a branching colony. 4 | 5 | Additionally,we will show how to generate a simple metabolic model with a single nutrient and a single reaction of biomass growth from uptake of the nutrient. 6 | 7 | We will make the layout much smaller than in the paper, however, because it is much faster to run. 8 | 9 | 10 | ```python 11 | import cobra 12 | import cobra.test # for the ijo1366 model 13 | import sys 14 | import numpy as np 15 | import cometspy as c 16 | ``` 17 | 18 | First, let's make a "toy" model, using functionality of cobrapy. It directly converts extracellular carbon to biomass. 19 | 20 | 21 | ```python 22 | carbon = cobra.Metabolite("carbon", 23 | compartment = "e") 24 | carbon_exch = cobra.Reaction("Carbon_exch", 25 | lower_bound = -1., 26 | upper_bound = 1000.) 27 | carbon_exch.add_metabolites({carbon: -1.}) 28 | Biomass = cobra.Reaction("Biomass", 29 | lower_bound = 0., 30 | upper_bound = 1000.) 31 | Biomass.add_metabolites({carbon: -1.}) 32 | toy = cobra.Model("toy") 33 | toy.add_reactions([carbon_exch, Biomass]) 34 | #toy.add_reactions([carbon_exch, carbon_transport, Biomass]) 35 | toy.objective = "Biomass" 36 | toy.repair() 37 | ``` 38 | 39 | We can test that the model runs by doing FBA in cobrapy. It should generate as much biomass as the lower bound on carbon_exch. 40 | 41 | 42 | ```python 43 | print(toy.medium) 44 | print(toy.optimize().objective_value) 45 | ``` 46 | 47 | {'Carbon_exch': 1.0} 48 | 1.0 49 | 50 | 51 | We will now convert this into a COMETS model, set its initial biomass, and set the first set of convection parameters. These are the parameters needed to obtain a circular colony with this toy model. Note that the timestep has to be set very low for this form of biomass spread. 52 | 53 | 54 | ```python 55 | grid_size = 50 56 | 57 | toy_comets = c.model(toy) 58 | toy_comets.initial_pop = [int(grid_size / 2),int(grid_size / 2),1.0] 59 | toy_comets.reactions.loc[toy_comets.reactions.EXCH, "LB"] = -1000 60 | toy_comets.add_convection_parameters(packedDensity = 0.5, 61 | elasticModulus = 1.e-4, 62 | frictionConstant = 1.0, 63 | convDiffConstant = 0.0) 64 | toy_comets.add_noise_variance_parameter(20.) 65 | ``` 66 | 67 | Note: for convection parameters to function, 68 | params.all_params['biomassMotionStyle'] = 'Convection 2D' 69 | must also be set 70 | 71 | 72 | We make sure that the COMETS model does not consider the biomass reaction an exchange. 73 | 74 | 75 | ```python 76 | toy_comets.reactions.loc[toy_comets.reactions.REACTION_NAMES == "Biomass","EXCH"] = False 77 | toy_comets.reactions.loc[toy_comets.reactions.REACTION_NAMES == "Biomass","EXCH_IND"] = 0 78 | toy_comets.reactions.loc[toy_comets.reactions.REACTION_NAMES == "Biomass", "LB"] = 0 79 | ``` 80 | 81 | This simulation's layout will be of a single, centered colony on a 100x100 grid. carbon will be spread homogenously. 82 | 83 | 84 | ```python 85 | ly = c.layout([toy_comets]) 86 | ly.grid = [grid_size, grid_size] 87 | ly.set_specific_metabolite("carbon", 1.) 88 | ``` 89 | 90 | The main parameter we need to set is biomassmotionstyle, which must be set to "Convection 2D". Then, to capture the spatial information, we'll also log biomass (instead of just total biomass). Finally, we'll also adjust a handful of other parameters. These are stored in the dictionary all_params. 91 | 92 | 93 | ```python 94 | p = c.params() 95 | 96 | p.set_param("biomassMotionStyle", "Convection 2D") 97 | p.set_param("writeBiomassLog", True) 98 | p.set_param("BiomassLogRate", 100) 99 | p.set_param("maxCycles", 2000) 100 | p.set_param("timeStep", 0.0005) 101 | p.set_param("spaceWidth", 1) 102 | p.set_param("maxSpaceBiomass", 10) 103 | p.set_param("minSpaceBiomass", 0.25e-10) 104 | p.set_param("allowCellOverlap", True) 105 | p.set_param("growthDiffRate", 0) 106 | p.set_param("flowDiffRate", 3e-9) 107 | p.set_param("exchangestyle", "Monod Style") 108 | p.set_param("defaultKm", 0.01) 109 | p.set_param("defaultHill", 1) 110 | p.set_param("defaultVmax", 100) 111 | 112 | ``` 113 | 114 | Now we make a simulation object and run it. This can take awhile. 115 | 116 | 117 | ```python 118 | sim = c.comets(ly, p) 119 | sim.run() # set delete_files = False to maintain all comets-generated files 120 | ``` 121 | 122 | 123 | Running COMETS simulation ... 124 | Done! 125 | 126 | 127 | Now let's plot the results. we use the helper script "get_biomass_image," which needs the name of the model and the timestep. Then we use matplotlib to display it. 128 | 129 | 130 | ```python 131 | im = sim.get_biomass_image('toy', 2000) 132 | from matplotlib import pyplot as plt 133 | import matplotlib.colors, matplotlib.cm 134 | my_cmap = matplotlib.cm.get_cmap("copper") 135 | my_cmap.set_bad((0,0,0)) 136 | plt.imshow(im, norm = matplotlib.colors.LogNorm(), cmap = my_cmap) 137 | 138 | ``` 139 | 140 | ![](img/circular_colony_1.png) 141 | 142 | 143 | We can tile the time series in a simple loop. 144 | 145 | 146 | ```python 147 | big_image = np.zeros((grid_size * 4, grid_size * 5)) 148 | im_cycles = np.arange(p.all_params["BiomassLogRate"], p.all_params["maxCycles"] + p.all_params["BiomassLogRate"], 149 | p.all_params["BiomassLogRate"]) 150 | for i, cycle in enumerate(im_cycles): 151 | big_image[(grid_size * int(i / 5)):(grid_size + grid_size * int(i / 5)),(grid_size * (i % 5)):(grid_size + grid_size * (i % 5))] = sim.get_biomass_image("toy", cycle) 152 | ``` 153 | 154 | 155 | ```python 156 | plt.imshow(big_image, norm = matplotlib.colors.LogNorm(), cmap = my_cmap) 157 | ``` 158 | 159 | ![](img/circular_colony_2.png) 160 | 161 | 162 | 163 | ```python 164 | 165 | ``` 166 | -------------------------------------------------------------------------------- /docs/source/cometspy.rst: -------------------------------------------------------------------------------- 1 | cometspy package 2 | ================ 3 | 4 | cometspy.comets module 5 | ---------------------- 6 | 7 | .. automodule:: cometspy.comets 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | cometspy.layout module 13 | ---------------------- 14 | 15 | .. automodule:: cometspy.layout 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | 20 | cometspy.model module 21 | --------------------- 22 | 23 | .. automodule:: cometspy.model 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | 28 | cometspy.params module 29 | ---------------------- 30 | 31 | .. automodule:: cometspy.params 32 | :members: 33 | :undoc-members: 34 | :show-inheritance: 35 | 36 | cometspy.utils module 37 | --------------------- 38 | 39 | .. automodule:: cometspy.utils 40 | :members: 41 | :undoc-members: 42 | :show-inheritance: 43 | 44 | Module contents 45 | --------------- 46 | 47 | .. automodule:: cometspy 48 | :members: 49 | :undoc-members: 50 | :show-inheritance: 51 | -------------------------------------------------------------------------------- /docs/source/competition_assay.md: -------------------------------------------------------------------------------- 1 | # Two-species competition assay 2 | Competition experiments are frequently performed in the laboratory to assay, for example, the fitness of a mutant in competition to the wild-type. Here, we simulate one such experiemnt involving E. coli and a nonessential but deleterious mutation involving the deletion of the triose phosphate isomerase reaction from glycolisis. 3 | 4 | ## Load models and create a mutant 5 | We first load our *E. coli* "core" model and create the mutant in triose phosphate isomerase by setting both upper and lower bounds to zero. We will add both models to our `test_tube` layout. 6 | 7 | 8 | ```python 9 | # Start by loading required packages, including the COMETS toolbox 10 | import cometspy as c 11 | import cobra.test 12 | import pandas as pd 13 | import matplotlib.pyplot as plt 14 | 15 | # load the models and perform the mutation 16 | wt = c.model(cobra.test.create_test_model("ecoli")) 17 | wt.id = 'wt' 18 | mut = c.model(cobra.test.create_test_model("ecoli")) 19 | mut.change_bounds('TPI', 0,0) 20 | mut.id = 'TPI_KO' 21 | 22 | # set its initial biomass, 5e-6 gr at coordinate [0,0] 23 | wt.initial_pop = [0, 0, 5e-8] 24 | mut.initial_pop = [0, 0, 5e-8] 25 | ``` 26 | 27 | Using license file /home/djordje/gurobi.lic 28 | Academic license - for non-commercial use only 29 | 30 | 31 | ## Create layout, add models and set up media composition 32 | We create an empty layout ("test_tube") and set the initial nutrient supply. 33 | 34 | 35 | ```python 36 | # create an empty layout 37 | test_tube = c.layout() 38 | 39 | # add the models to the test tube 40 | test_tube.add_model(wt) 41 | test_tube.add_model(mut) 42 | ``` 43 | 44 | building empty layout model 45 | models will need to be added with layout.add_model() 46 | 47 | 48 | Set the media composition by adding glucose and the inorganic nutrients required for this model (ammonia, phosphate) and oxygen. These inorganic nutrients will be considered as "static" by the simulation, with a value of 1000 that never depletes. Considering metabolites as "static" is the way COMETS has to simulate an unlimited supply of metabolites. 49 | 50 | 51 | ```python 52 | # Add glucose to the media 53 | test_tube.set_specific_metabolite('glc__D_e', 0.01) 54 | 55 | # Add typical trace metabolites and oxygen coli as static 56 | trace_metabolites = ['ca2_e', 'cl_e', 'cobalt2_e', 'cu2_e', 'fe2_e', 'fe3_e', 'h_e', 'k_e', 'h2o_e', 'mg2_e', 57 | 'mn2_e', 'mobd_e', 'na1_e', 'ni2_e', 'nh4_e', 'o2_e', 'pi_e', 'so4_e', 'zn2_e'] 58 | 59 | for i in trace_metabolites: 60 | test_tube.set_specific_metabolite(i, 1000) 61 | test_tube.set_specific_static(i, 1000) 62 | ``` 63 | 64 | ## Set up simulation parameters 65 | We next create a parameters object and modify needed parameters - in this case only the number of cycles the simulation runs. 66 | 67 | 68 | ```python 69 | comp_params = c.params() 70 | comp_params.set_param('maxCycles', 240) 71 | ``` 72 | 73 | ## Run the simulation 74 | 75 | Finally, we create the comets object using the above created layout and parameters, and run the competition assay. 76 | 77 | 78 | ```python 79 | comp_assay = c.comets(test_tube, comp_params) 80 | comp_assay.run() 81 | ``` 82 | 83 | Running COMETS simulation ... 84 | Done! 85 | 86 | 87 | We now plot the biomasses of these two genotypes in coculture. 88 | 89 | 90 | ```python 91 | biomass = comp_assay.total_biomass 92 | biomass['t'] = biomass['cycle'] * comp_assay.parameters.all_params['timeStep'] 93 | 94 | myplot = biomass.drop(columns=['cycle']).plot(x = 't') 95 | myplot.set_ylabel("Biomass (gr.)") 96 | ``` 97 | 98 | 99 | 100 | 101 | ![](img/comp_1.png) 102 | 103 | 104 | We can quantitatively analyze the results. For example, we can compute the competitive fitness of the mutant respect to the wild-type as the ratio of the biomass increase of the mutant divided by that of the wild-type: 105 | 106 | 107 | ```python 108 | cfit = (biomass.loc[biomass['t'] == 24, 'TPI_KO'].iloc[0]/biomass.loc[biomass['t'] == 0, 'TPI_KO'].iloc[0])/(biomass.loc[biomass['t'] == 24, 'wt'].iloc[0]/biomass.loc[biomass['t'] == 0, 'wt'].iloc[0]) 109 | cfit 110 | ``` 111 | 112 | 113 | 114 | 115 | 0.39378816074777145 116 | 117 | 118 | 119 | ## Simulating serial transfers 120 | Using `COMETS` we can also simulate a serial tranfer competition between these two mutants. We will just modify the parameters, increasing the total simulation time and including batch transfers of 1% every 24h, but we will use the same `test_tube` layout as before. 121 | 122 | 123 | ```python 124 | serial_params = c.params() 125 | serial_params.set_param('maxCycles', 240*25) # simulate 4 serial transfers of 24h each 126 | serial_params.set_param('batchDilution', True) 127 | serial_params.set_param('dilFactor', 0.01) 128 | serial_params.set_param('dilTime', 24) 129 | ``` 130 | 131 | We run the simulation 132 | 133 | 134 | ```python 135 | serial_expt = c.comets(test_tube, serial_params) 136 | serial_expt.JAVA_CLASSPATH = comp_assay.JAVA_CLASSPATH 137 | serial_expt.run() 138 | ``` 139 | 140 | Running COMETS simulation ... 141 | Done! 142 | 143 | 144 | Now plot the biomass of the two species during the experiment 145 | 146 | 147 | ```python 148 | biomass = serial_expt.total_biomass 149 | biomass['transfer'] = biomass['cycle'] * comp_assay.parameters.all_params['timeStep']/24 150 | 151 | myplot = biomass.drop(columns=['cycle']).plot(x = 'transfer') 152 | myplot.set_ylabel("Biomass (gr.)") 153 | ``` 154 | 155 | 156 | 157 | 158 | ![](img/comp_2.png) 159 | 160 | -------------------------------------------------------------------------------- /docs/source/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # For the full list of built-in configuration values, see the documentation: 4 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 5 | 6 | # -- Path setup -------------------------------------------------------------- 7 | # So that you can import cometspy from the docs/source directory 8 | import os 9 | import sys 10 | sys.path.insert(0, os.path.abspath('../../')) 11 | 12 | # -- Project information ----------------------------------------------------- 13 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information 14 | 15 | project = 'COMETSpy' 16 | copyright = '2023, The Segre Lab at Boston University' 17 | author = 'The Segre Lab at Boston University' 18 | 19 | # -- General configuration --------------------------------------------------- 20 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration 21 | 22 | extensions = [ 23 | # ... other extensions ... 24 | 'sphinx.ext.autodoc', 25 | 'sphinx_rtd_theme', 26 | 'myst_parser' 27 | ] 28 | 29 | myst_enable_extensions = [ 30 | "amsmath", 31 | "attrs_inline", 32 | "colon_fence", 33 | "deflist", 34 | "dollarmath", 35 | "fieldlist", 36 | "html_admonition", 37 | "html_image", 38 | "linkify", 39 | "replacements", 40 | "smartquotes", 41 | "strikethrough", 42 | "substitution", 43 | "tasklist", 44 | ] 45 | 46 | templates_path = ['_templates'] 47 | exclude_patterns = [] 48 | 49 | 50 | 51 | # -- Options for HTML output ------------------------------------------------- 52 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output 53 | 54 | html_theme = 'sphinx_rtd_theme' 55 | html_static_path = ['_static'] 56 | html_logo = 'img/cometspy_logo_white_bkgd.png' 57 | html_theme_options = { 58 | 'logo_only': True, 59 | 'display_version': True, 60 | 'collapse_navigation': False, 61 | 'sticky_navigation': True, 62 | 'navigation_depth': 4, 63 | 'includehidden': True, 64 | 'titles_only': False 65 | } 66 | -------------------------------------------------------------------------------- /docs/source/demographic_noise_two_strains.md: -------------------------------------------------------------------------------- 1 | # Growth and propagation of bacterial colonies on flat surfaces 2 | 3 | This protocol replicates the main text protocol that simulates demographic noise which causes spatial segregation of expanding, equally-fit colonies. 4 | 5 | 6 | ```python 7 | import cobra 8 | import cobra.test # for the ijo1366 model 9 | import sys 10 | import copy 11 | import numpy as np 12 | sys.path.append("/home/jeremy/Dropbox/work_related/harcombe_lab/segre/cometspy") # not necessary if you pip install cometspy 13 | import cometspy as c 14 | ``` 15 | 16 | We will use the E. coli core model. 17 | 18 | 19 | ```python 20 | ecoli = cobra.test.create_test_model("textbook") 21 | ``` 22 | 23 | We will now convert this into a COMETS model, and set two parameter options: the demographic noise parameter, which is called "neutral drift," and convection-based motion parameters. 24 | 25 | 26 | ```python 27 | grid_size = 40 28 | ecoli_comets = c.model(ecoli) 29 | ecoli_comets.reactions.loc[ecoli_comets.reactions.EXCH, "LB"] = -1000 30 | ecoli_comets.add_nonlinear_diffusion_parameters(convNonlinDiffZero = 0., 31 | convNonlinDiffN = 6.e-6, 32 | convNonlinDiffExponent = 1.0, 33 | convNonlinDiffHillN = 2., 34 | convNonlinDiffHillK = 0.001) 35 | ecoli_comets.add_neutral_drift_parameter(0.01) 36 | ``` 37 | 38 | Note: for non-linear diffusion parameters to function, 39 | params.all_params['biomassMotionStyle'] = 'ConvNonlin' Diffusion 2D' 40 | must also be set 41 | 42 | 43 | Let's make an exact copy of the ecoli comets model. 44 | 45 | 46 | ```python 47 | import random 48 | 49 | ecoli_comets2 = copy.copy(ecoli_comets) 50 | ecoli_comets2.id = "e_coli_core2" 51 | 52 | ecoli_comets.initial_pop = [[x, 0, np.random.normal(6.4e-5, 1e-6)] for x in range(grid_size)] 53 | ecoli_comets2.initial_pop = [[x, 0, np.random.normal(6.4e-5, 1e-6)] for x in range(grid_size)] 54 | 55 | ``` 56 | 57 | This simulation will be of a single, centered colony on a 100x100 grid. carbon will be spread homogenously, and be fixed at initial concentration along one end. 58 | 59 | 60 | ```python 61 | ly = c.layout([ecoli_comets, ecoli_comets2]) 62 | ly.grid = [grid_size, grid_size] 63 | ly.set_specific_metabolite("glc__D_e", 2.2e-3) 64 | ly.set_specific_metabolite("h2o_e", 1000) 65 | ly.set_specific_metabolite("nh4_e", 1000) 66 | ly.set_specific_metabolite("o2_e", 1000) 67 | ly.set_specific_metabolite("pi_e", 1000) 68 | ly.set_specific_metabolite("h_e", 1000) 69 | 70 | for x in range(grid_size): 71 | ly.set_specific_static_at_location("glc__D_e", (x, grid_size-1), 1.1e-3) 72 | 73 | ``` 74 | 75 | The main parameter we need to set is biomassmotionstyle, which must be set to "ConvNonlin Diffusion 2D". Then, to capture the spatial information, we'll also log biomass (instead of just total biomass). Finally, we'll also adjust a handful of other parameters. These are stored in the dictionary all_params. 76 | 77 | 78 | ```python 79 | p = c.params() 80 | 81 | cycles = 1000 82 | 83 | p.all_params["biomassMotionStyle"] = "ConvNonlin Diffusion 2D" 84 | p.all_params["writeBiomassLog"] = True 85 | p.all_params["BiomassLogRate"] = cycles 86 | p.all_params["maxCycles"] = cycles 87 | p.all_params["timeStep"] = 0.05 88 | p.all_params["spaceWidth"] = 0.01 89 | p.all_params["defaultDiffConst"] = 6.e-6 90 | p.all_params["maxSpaceBiomass"] = 1000000 91 | p.all_params["minSpaceBiomass"] = 1.0e-9 92 | p.all_params["allowCellOverlap"] = True 93 | p.all_params["growthDiffRate"] = 0 94 | p.all_params["defaultVmax"] = 18.5 95 | p.all_params["defaultKm"] = 0.000015 96 | p.all_params["defaultHill"] = 1 97 | p.all_params["exchangestyle"] = "Monod Style" 98 | ``` 99 | 100 | Now we make a simulation object and run it. This can take awhile. 101 | 102 | 103 | ```python 104 | sim = c.comets(ly, p) 105 | sim.run() 106 | ``` 107 | 108 | 109 | Running COMETS simulation ... 110 | Done! 111 | 112 | 113 | Now let's plot the results. We use the get_biomass_image helper function and then matplotlib to do the plotting. 114 | 115 | 116 | ```python 117 | im = sim.get_biomass_image('e_coli_core', cycles).astype(float) 118 | im = im / np.max(im) 119 | im2 = sim.get_biomass_image('e_coli_core2',cycles).astype(float) 120 | im2 = im2 / np.max(im2) 121 | final = np.zeros((grid_size,grid_size,3)) 122 | final[:,:,1] = im 123 | final[:,:,2] = im2 124 | from matplotlib import pyplot as plt 125 | plt.imshow(final) 126 | ``` 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | ![](img/demographic_noise_two_strains.png) 137 | 138 | 139 | 140 | ```python 141 | 142 | ``` 143 | -------------------------------------------------------------------------------- /docs/source/img/branching_colony_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/branching_colony_1.png -------------------------------------------------------------------------------- /docs/source/img/branching_colony_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/branching_colony_2.png -------------------------------------------------------------------------------- /docs/source/img/chemostat_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/chemostat_1.png -------------------------------------------------------------------------------- /docs/source/img/chemostat_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/chemostat_2.png -------------------------------------------------------------------------------- /docs/source/img/chemostat_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/chemostat_3.png -------------------------------------------------------------------------------- /docs/source/img/circular_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/circular_1.png -------------------------------------------------------------------------------- /docs/source/img/circular_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/circular_2.png -------------------------------------------------------------------------------- /docs/source/img/circular_colony_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/circular_colony_1.png -------------------------------------------------------------------------------- /docs/source/img/circular_colony_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/circular_colony_2.png -------------------------------------------------------------------------------- /docs/source/img/citrate_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/citrate_1.png -------------------------------------------------------------------------------- /docs/source/img/comets_results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/comets_results.png -------------------------------------------------------------------------------- /docs/source/img/cometspy_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/cometspy_logo.png -------------------------------------------------------------------------------- /docs/source/img/cometspy_logo_white_bkgd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/cometspy_logo_white_bkgd.png -------------------------------------------------------------------------------- /docs/source/img/cometspy_workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/cometspy_workflow.png -------------------------------------------------------------------------------- /docs/source/img/comp_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/comp_1.png -------------------------------------------------------------------------------- /docs/source/img/comp_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/comp_2.png -------------------------------------------------------------------------------- /docs/source/img/demographic_noise_two_strains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/demographic_noise_two_strains.png -------------------------------------------------------------------------------- /docs/source/img/evolution_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/evolution_1.png -------------------------------------------------------------------------------- /docs/source/img/multispecies_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/multispecies_1.png -------------------------------------------------------------------------------- /docs/source/img/petri_dish_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/petri_dish_1.png -------------------------------------------------------------------------------- /docs/source/img/petri_dish_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/petri_dish_2.png -------------------------------------------------------------------------------- /docs/source/img/petri_dish_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/petri_dish_3.png -------------------------------------------------------------------------------- /docs/source/img/petri_dish_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/petri_dish_4.png -------------------------------------------------------------------------------- /docs/source/img/soil_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/soil_1.png -------------------------------------------------------------------------------- /docs/source/img/soil_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/soil_2.png -------------------------------------------------------------------------------- /docs/source/img/soil_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/soil_3.png -------------------------------------------------------------------------------- /docs/source/img/soil_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/soil_4.png -------------------------------------------------------------------------------- /docs/source/img/soil_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/soil_5.png -------------------------------------------------------------------------------- /docs/source/img/soul_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/soul_1.png -------------------------------------------------------------------------------- /docs/source/img/test_tube_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/test_tube_1.png -------------------------------------------------------------------------------- /docs/source/img/test_tube_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segrelab/cometspy/def7ae6b1947f84f7dd6135377cfa5c6e43792d0/docs/source/img/test_tube_2.png -------------------------------------------------------------------------------- /docs/source/index.rst: -------------------------------------------------------------------------------- 1 | .. COMETSpy documentation master file, written by Helen Scott, last 2 | updated on 2023-08-21. 3 | You can adapt this file completely to your liking, but it should at 4 | least contain the root `toctree` directive. 5 | 6 | .. The toctree directive controls what links are in the "Navigation" bar 7 | at the top of each page. The "maxdepth" argument determines how many 8 | levels deep the links are shown. The "caption" argument determines the 9 | title of the "Navigation" bar. 10 | 11 | .. toctree:: 12 | :caption: Package Documentation 13 | :maxdepth: 2 14 | :hidden: 15 | 16 | intro 17 | installation 18 | capabilities 19 | 20 | .. toctree:: 21 | :caption: Tutorials 22 | :maxdepth: 2 23 | :hidden: 24 | 25 | getting_started 26 | test_tube 27 | competition_assay 28 | citrate 29 | chemostat 30 | evolution 31 | circular_colony 32 | branching_colony 33 | demographic_noise_two_strains 34 | petri_dish 35 | soil 36 | 37 | .. toctree:: 38 | :caption: API 39 | :maxdepth: 2 40 | :hidden: 41 | 42 | cometspy 43 | 44 | 45 | 46 | Introduction 47 | ============ 48 | 49 | What is COMETSpy? 50 | ---------------------------- 51 | COMETS is a software platform for performing **computer simulations of 52 | metabolism in spatially structured microbial communities**. It is based on 53 | stoichiometric modeling of the genome-scale metabolic network of 54 | individual microbial species (using dynamic flux balance analysis), and 55 | on a discrete approximation of convection-diffusion equations. 56 | 57 | .. Images from COMETS imulations here, i.e. colony morpologies 58 | .. image:: img/comets_results.png 59 | :width: 800 60 | :alt: Results from COMETS simulations 61 | 62 | COMETSpy is a Python package that provides a user-friendly interface to 63 | COMETS. It allows users to easily set up and run simulations, and to 64 | analyze the results. COMETSpy is designed to be used in conjunction with 65 | COMETS. It is not a standalone package, and requires COMETS to be 66 | installed on the user's computer. 67 | 68 | .. Graphic showing the relationship between COMETS and COMETSpy 69 | .. image:: img/cometspy_workflow.png 70 | :width: 800 71 | :alt: The COMETSpy/COMETS workflow 72 | 73 | How to use this Documentation: 74 | ------------------------------ 75 | 76 | This documentation is meant to aide users in installing COMETSpy and 77 | using COMETSpy to run simulations and analyze the results. If you need 78 | help and do not easily find an answer in this documentation, ask your question 79 | in a `new issue on GitHub `_. 80 | **Any question that you have likely indicates a shortcoming in the documentation, 81 | which we will want to fix!** 82 | 83 | Find the module/class/function that you are interested in using in the 84 | table of contents on the left or in the following indices, click on the link to 85 | go to the appropriate documentation: 86 | 87 | * :ref:`modindex` 88 | * :ref:`genindex` 89 | 90 | For a class, the documentation will include a brief description of the class, 91 | the parameters that the class takes, and a list of all attributes, and examples 92 | of how to use the class. The documentation will also include a list of all 93 | the methods that are available for that class. 94 | 95 | For a function, including the methods for a class, the documentation will 96 | include a description of what the function does, a list of the parameters that 97 | the function takes and the objects that the function returns, and examples of 98 | how to use the function. 99 | 100 | Cite Us: 101 | -------- 102 | 103 | The newest version of COMETS, which was developed as a partnership between 104 | researchers at `Boston University `_, 105 | `Yale University `_ and the 106 | `University of Minnesota `_ is fully described 107 | in the following paper: 108 | 109 | `Dukovski, Bajić, Chacón, Quintin, et al.: A metabolic modeling platform for 110 | the computation of microbial ecosystems in time and space (COMETS), Nature 111 | Protocols (2021) https://doi.org/10.1038/s41596-021-00593-3. 112 | `_ 113 | -------------------------------------------------------------------------------- /docs/source/installation.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | 4 | The COMETS Python toolbox (cometspy) is available from the package manager PyPI cometspy using the pip command. To install, run: 5 | 6 | ``` 7 | pip install cometspy 8 | ``` 9 | 10 | Warning! The current version will work only with Pandas version 1.5.0 or higer. 11 | Pandas changed the variable line_terminator to lineterminator in the 'csv' modules. 12 | More at: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.html 13 | "Changed in version 1.5.0: Previously was line_terminator, changed for consistency with read_csv and the standard library ‘csv’ module." 14 | 15 | If you get an error message about line_terminator, update your pandas package. 16 | 17 | Of course, to use cometspy you first need to install COMETS on your computer. See section below. 18 | 19 | ## Installation of COMETS 20 | There are two ways to install COMETS: using the COMETS installer or by unpacking the .tar.gz file. The easiest is to use the installer, especially recommended for individual use on a laptop or desktop. The installer can be downloaded from: https://comets.bu.edu The users are required to register, after which they can obtain the installer appropriate for their system. The installer guides the user through a standard GUI installation procedure that includes accepting the license agreement, choosing the directory where COMETS will be installed (the default directory is recommended), the option to create a desktop shortcut etc. The installer is available for the Windows, MacOS and Linux systems. 21 | 22 | In addition to the GUI installer, we provide the comets_x.x.x.tar.gz file for custom installation, typically on a Linux system. The file should be unpacked in the directory were COMETS will be installed with: 23 | 24 | ``` 25 | $tar -xzvf comets_x.x.x.tar.gz ./ 26 | ``` 27 | 28 | This will create the comets installation directory. 29 | 30 | In Unix systems (Linux or MacOS) the user also needs to specify the COMETS_HOME environment variable, which has to point to the comets installation folder. In Linux systems, this is done by adding the following line to the .bashrc file located in the home folder: 31 | ``` 32 | export COMETS_HOME = "/your/comets/installation/folder" 33 | ``` 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /docs/source/intro.rst: -------------------------------------------------------------------------------- 1 | Introduction 2 | ============ 3 | 4 | What is COMETSpy? 5 | ---------------------------- 6 | COMETS is a software platform for performing **computer simulations of 7 | metabolism in spatially structured microbial communities**. It is based on 8 | stoichiometric modeling of the genome-scale metabolic network of 9 | individual microbial species (using dynamic flux balance analysis), and 10 | on a discrete approximation of convection-diffusion equations. 11 | 12 | .. Images from COMETS simulations here, i.e. colony morpologies 13 | .. image:: img/comets_results.png 14 | :width: 800 15 | :alt: Results from COMETS simulations 16 | 17 | COMETSpy is a Python package that provides a user-friendly interface to 18 | COMETS. It allows users to easily set up and run simulations, and to 19 | analyze the results. COMETSpy is designed to be used in conjunction with 20 | COMETS. It is not a standalone package, and requires COMETS to be 21 | installed on the user's computer. 22 | 23 | .. Graphic showing the relationship between COMETS and COMETSpy 24 | .. image:: img/cometspy_workflow.png 25 | :width: 800 26 | :alt: The COMETSpy/COMETS workflow 27 | 28 | How to use this Documentation: 29 | ------------------------------ 30 | 31 | This documentation is meant to aide users in installing COMETSpy and 32 | using COMETSpy to run simulations and analyze the results. If you need 33 | help and do not easily find an answer in this documentation, ask your question 34 | in a `new issue on GitHub `_. 35 | **Any question that you have likely indicates a shortcoming in the documentation, 36 | which we will want to fix!** 37 | 38 | Find the module/class/function that you are interested in using in the 39 | table of contents on the left or in the following indices, click on the link to 40 | go to the appropriate documentation: 41 | 42 | * :ref:`modindex` 43 | * :ref:`genindex` 44 | 45 | For a class, the documentation will include a brief description of the class, 46 | the parameters that the class takes, and a list of all attributes, and examples 47 | of how to use the class. The documentation will also include a list of all 48 | the methods that are available for that class. 49 | 50 | For a function, including the methods for a class, the documentation will 51 | include a description of what the function does, a list of the parameters that 52 | the function takes and the objects that the function returns, and examples of 53 | how to use the function. 54 | 55 | Cite Us: 56 | -------- 57 | 58 | The newest version of COMETS, which was developed as a partnership between 59 | researchers at `Boston University `_, 60 | `Yale University `_ and the 61 | `University of Minnesota `_ is fully described 62 | in the following paper: 63 | 64 | `Dukovski, Bajić, Chacón, Quintin, et al.: A metabolic modeling platform for 65 | the computation of microbial ecosystems in time and space (COMETS), Nature 66 | Protocols (2021) https://doi.org/10.1038/s41596-021-00593-3. 67 | `_ 68 | -------------------------------------------------------------------------------- /ipynb_to_docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for f in *.ipynb 4 | do 5 | jupyter-nbconvert --to markdown $f --output $HOME/Dropbox/projects/comets-manual/docs/python-module/"${f%%.*}".md 6 | done 7 | 8 | -------------------------------------------------------------------------------- /make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | %SPHINXBUILD% >NUL 2>NUL 14 | if errorlevel 9009 ( 15 | echo. 16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 17 | echo.installed, then set the SPHINXBUILD environment variable to point 18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 19 | echo.may add the Sphinx directory to PATH. 20 | echo. 21 | echo.If you don't have Sphinx installed, grab it from 22 | echo.https://www.sphinx-doc.org/ 23 | exit /b 1 24 | ) 25 | 26 | if "%1" == "" goto help 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | # Inside of setup.cfg 2 | [metadata] 3 | description-file = README.md 4 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup 2 | from os import path 3 | 4 | setup( 5 | name='cometspy', 6 | packages=['cometspy'], 7 | version='0.5.2', 8 | license='GPL', 9 | description='The Python interface to COMETS', 10 | author='The COMETSPy Core Team', 11 | author_email='djordje.bajic@yale.edu', 12 | url='https://github.com/segrelab/cometspy', 13 | download_url='https://github.com/segrelab/cometspy/archive/v0.5.1.tar.gz', # New releases here!! 14 | keywords=['metabolism', 'dynamic', 'flux', 'balance', 'analysis', 'spatial', 'evolution'], 15 | install_requires=[ 16 | # I get to this in a second 17 | 'numpy', 18 | 'cobra', 19 | 'pandas>=1.0.0'], 20 | classifiers=[ 21 | 'Development Status :: 4 - Beta', # "3 - Alpha", "4 - Beta", "5 - Production/Stable" 22 | 'Intended Audience :: Science/Research', # Define that your audience are developers 23 | 'License :: OSI Approved :: MIT License', 24 | 'Programming Language :: Python :: 3.6', 25 | 'Programming Language :: Python :: 3.7', 26 | 'Programming Language :: Python :: 3.8', 27 | ], 28 | ) 29 | --------------------------------------------------------------------------------