Skip to content

Commit 2ca02ae

Browse files
committed
Renaming and rerun of examples
1 parent 725f163 commit 2ca02ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+24132
-389361
lines changed

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
[![PyPI version](https://badge.fury.io/py/commodelpy.svg)](https://badge.fury.io/py/commodelpy)
1+
[![PyPI version](https://badge.fury.io/py/commmodelpy.svg)](https://badge.fury.io/py/commmodelpy)
22

3-
# ComModelPy
3+
# CommModelPy
44

55
## Description
66

7-
ComModelPy is a collection of Python [dataclasses](https://docs.python.org/3/library/dataclasses.html) and associated functions which aim to help one in generating stoichiometric metabolic models of communities which consist of one or multiple species. All dataclasses and functions are based on [cobrapy](https://github.com/opencobra/cobrapy).
7+
CommModelPy is a collection of Python [dataclasses](https://docs.python.org/3/library/dataclasses.html) and associated functions which aim to help one in generating stoichiometric metabolic models of communities which consist of one or multiple species. All dataclasses and functions are based on [cobrapy](https://github.com/opencobra/cobrapy).
88

9-
The underlying methods for the generation and analysis of the community models is explained in more detail in ComModelPy's source code documentation.
9+
The underlying methods for the generation and analysis of the community models is explained in more detail in CommModelPy's source code documentation.
1010

11-
An exemplary usage of ComModelPy is given in its publiation (Bekiaris & Klamt, in submission).
11+
An exemplary usage of CommModelPy is given in its publiation (Bekiaris & Klamt, in submission).
1212

1313
## Installation procedure
1414

1515
### Option 1: As PyPI module
1616

17-
You can install ComModelPy as Python module from [PyPI](https://pypi.org/project/commodelpy/) using *pip*:
17+
You can install CommModelPy as Python module from [PyPI](https://pypi.org/project/commmodelpy/) using *pip*:
1818

1919
<pre>
20-
pip install commodelpy
20+
pip install commmodelpy
2121
</pre>
2222

23-
Afterwards, you can use ComModelPy just as any other Python module using *import* in your Python session/script:
23+
Afterwards, you can use CommModelPy just as any other Python module using *import* in your Python session/script:
2424
<pre>
25-
import commodelpy
25+
import commmodelpy
2626
</pre>
27-
In order to import ComModelPy's main script with all major dataclasses and functions and which is called "commodelpy.py", you can import it using
27+
In order to import CommModelPy's main script with all major dataclasses and functions and which is called "commmodelpy.py", you can import it using
2828
<pre>
29-
import commodelpy.commodelpy
29+
import commmodelpy.commmodelpy
3030
</pre>
3131

3232
### Option 2: Direct download
3333

34-
If you don't want to use ComModelPy as PyPI module, you can also download this repository directly. The main script file is the commodelpy.py Python script in the "commodelpy" subfolder.
34+
If you don't want to use CommModelPy as PyPI module, you can also download this repository directly. The main script file is the commmodelpy.py Python script in the "commmodelpy" subfolder.
3535

3636
## Repository structure
3737

38-
* The actual commodelpy pip package can be found in the "commodelpy" subfolder, where "commodelpy.py" contains all relevant functions and dataclasses.
39-
* All Python scripts which were used in ComModelPy's publication, which use ComModelPy's function for community models without defined growth and with fixed species ratios, can be found in the "publication_runs" subfolder, which is in the "commodelpy" subfolder. The scripts in the local subfolder "toy_model" contain the script for the generation of the toy model shown in the publication. The scripts in the local subfolder "ecoli_models" contain the generation of dG0 data using the [Equilibrator API](https://gitlab.com/equilibrator/equilibrator-api) as well as the ComModelPy-assisted generation of iML1515 and EcoliCore2 single-species community models. A complete call of all E. coli model scripts in the right order is given by the "execute_publication_ecoli_model_scripts.py" script in the main folder, a call of the toy model scripts is given by the "execute_publication_toy_model_script.py" script in the main folder.
40-
* An exemplary usage of ComModelPy with its function with a defined fixed growth rate and free species ratios can be found in the "balanced_growth_example" subfolder. A call of the relevant script is given in the "execute_balanced_growth_example.py" script in the main folder.
38+
* The actual commmodelpy pip package can be found in the "commmodelpy" subfolder, where "commmodelpy.py" contains all relevant functions and dataclasses.
39+
* All Python scripts which were used in CommModelPy's publication, which use CommModelPy's function for community models without defined growth and with fixed species ratios, can be found in the "publication_runs" subfolder, which is in the "commmodelpy" subfolder. The scripts in the local subfolder "toy_model" contain the script for the generation of the toy model shown in the publication. The scripts in the local subfolder "ecoli_models" contain the generation of dG0 data using the [Equilibrator API](https://gitlab.com/equilibrator/equilibrator-api) as well as the CommModelPy-assisted generation of iML1515 and EcoliCore2 single-species community models. A complete call of all E. coli model scripts in the right order is given by the "execute_publication_ecoli_model_scripts.py" script in the main folder, a call of the toy model scripts is given by the "execute_publication_toy_model_script.py" script in the main folder.
40+
* An exemplary usage of CommModelPy with its function with a defined fixed growth rate and free species ratios can be found in the "balanced_growth_example" subfolder. A call of the relevant script is given in the "execute_balanced_growth_example.py" script in the main folder.
4141

4242
## Documentation
4343

44-
A documentation of ComModelPy's features and functions can be found in the "docs/commodelpy/" subfolder of this repository. The documentation's starting point is "index.html". The whole documentation was generated using [pdoc3](https://github.com/pdoc3/).
44+
A documentation of CommModelPy's features and functions can be found in the "docs/commmodelpy/" subfolder of this repository. The documentation's starting point is "index.html". The whole documentation was generated using [pdoc3](https://github.com/pdoc3/).
4545

46-
You can also access ComModelPy's documentation using Python's help function after importing ComModelPy, e.g. for the whole module:
46+
You can also access CommModelPy's documentation using Python's help function after importing CommModelPy, e.g. for the whole module:
4747
<pre>
48-
help(commodelpy)
48+
help(commmodelpy)
4949
</pre>
5050

5151
## Publication
5252

53-
ComModelPy is published in the following publication:
53+
CommModelPy is published in the following publication:
5454

5555
* Bekiaris & Klamt, 2021, *in submission*
5656

5757
## License
5858

59-
ComModelPy is free and open source, using the Apache License, Version 2
59+
CommModelPy is free and open source, using the Apache License, Version 2

balanced_growth_example/exemplary_run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import cobra
22
import copy
3-
from commodelpy.commodelpy import Community, SingleModel, create_community_model_with_balanced_growth
3+
from commmodelpy.commmodelpy import Community, SingleModel, create_community_model_with_balanced_growth
44
from typing import Dict
55

66
growth_rate = 0.4
@@ -82,7 +82,7 @@
8282
combined_metabolite_ids_mapping = {
8383
**all_inout_metabolite_ids_mapping, **essential_metabolite_mapping}
8484

85-
# Define commodelpy SingleModel
85+
# Define commmodelpy SingleModel
8686
ecoli_1 = SingleModel(
8787
cobra_model=ecoli_model,
8888
species_abbreviation="ecoli1",
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
# limitations under the License.
1616
"""
1717
This module contains all major class and function definitions of
18-
commodelpy. commodelpy's source code is intersected in two parts:
18+
commmodelpy. commmodelpy's source code is intersected in two parts:
1919
2020
1. The definition of all dataclasses which describe single models and a community.
21-
2. The definition of the commodelpy functions which can be used using the dataclasses.
21+
2. The definition of the commmodelpy functions which can be used using the dataclasses.
2222
2323
The definitions of the community structure are inspired by the ones used in the RedCom
2424
publication (Koch et al., 2019).
@@ -52,7 +52,7 @@ class SingleModel:
5252
5353
Use case
5454
----------
55-
In commodelpy, SingleModel instances are intended to be used
55+
In commmodelpy, SingleModel instances are intended to be used
5656
within Community instances. The additional information of SingleModel
5757
instances is then used for the generation of the actual community model.
5858
@@ -120,8 +120,8 @@ class Community:
120120
121121
Use case
122122
----------
123-
In commodelpy, Community instances are directly used in order to create a
124-
community model according to the method described in commodelpy's publication.
123+
In commmodelpy, Community instances are directly used in order to create a
124+
community model according to the method described in commmodelpy's publication.
125125
126126
Member variables
127127
----------
@@ -171,7 +171,7 @@ class Community:
171171
# FUNCTION DEFINITIONS SECTION
172172
def community_model_fba_summary(model: cobra.Model, exchange_reaction_id_prefix: str = "EX_C_",
173173
optimization_title: str = "FBA") -> Tuple[cobra.Solution, List[Dict[str, int]]]:
174-
Performs an FBA (or any kind of modified optimization) on a commodelpy-generated community model and prints the results.
174+
Performs an FBA (or any kind of modified optimization) on a commmodelpy-generated community model and prints the results.
175175
176176
Description
177177
----------
@@ -194,7 +194,7 @@ def community_model_fba_summary(model: cobra.Model, exchange_reaction_id_prefix:
194194
195195
Arguments
196196
----------
197-
* model: cobra.Model ~ The commodelpy-generated community model as cobrapy Model instance.
197+
* model: cobra.Model ~ The commmodelpy-generated community model as cobrapy Model instance.
198198
* exchange_reaction_id_prefix: str = "EX_C_" ~ The exchange reaction ID prefix as given during the
199199
generation of the model's Community instance.
200200
* optimization_title: str = "FBA"~ Will be printed at the beginning of the FBA summary as
@@ -270,7 +270,7 @@ def community_model_fba_summary(model: cobra.Model, exchange_reaction_id_prefix:
270270

271271

272272
def generate_community_model_with_no_growth(community: Community, fractions: Dict[str, float], biomass_reactions: Dict[str, str] = {}) -> cobra.Model:
273-
"""Creates a cobrapy-compatible community model from a commodelpy Community instance.
273+
"""Creates a cobrapy-compatible community model from a commmodelpy Community instance.
274274
275275
Description
276276
----------
@@ -741,7 +741,7 @@ def split_reversible_organism_reactions(model: cobra.Model, organism_id_biomass_
741741
742742
Arguments
743743
----------
744-
* model: cobra.Model ~ A commodelpy-generated community cobrapy model.
744+
* model: cobra.Model ~ A commmodelpy-generated community cobrapy model.
745745
* organism_id_biomass_reaction_mapping: Dict[str, str] ~ A dictionary with the community model's organism IDs
746746
as keys, and the corresponding biomass reaction IDs as values
747747
"""
@@ -753,7 +753,7 @@ def split_reversible_organism_reactions(model: cobra.Model, organism_id_biomass_
753753
if reaction.id in organism_id_biomass_reaction_mapping.values():
754754
continue
755755

756-
# Get biomass ID of the reaction using the commodelpy standard naming scheme
756+
# Get biomass ID of the reaction using the commmodelpy standard naming scheme
757757
organism_id = reaction.id.split("_")[-1]
758758
# Skip reaction if it is not part of the organisms (i.e., it is either an ignored
759759
# organism or part of the exchange compartment)

create_source_code_docs.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
REM This Windows batch script generates commodelpy's documentation using pdoc3
1+
REM This Windows batch script generates commmodelpy's documentation using pdoc3
22
REM In order to run this script correctly, you need pdoc3 first
3-
pdoc3 commodelpy --output-dir ../docs --force --html
3+
pdoc3 commmodelpy --output-dir ../docs --force --html

create_source_code_docs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
2-
# This Unix script generates commodelpy's documentation using pdoc3
2+
# This Unix script generates commmodelpy's documentation using pdoc3
33
# In order to run this script correctly, you need pdoc3 first
4-
pdoc3 commodelpy --output-dir ./docs --force --html
4+
pdoc3 commmodelpy --output-dir ./docs --force --html

dG0_data_test.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)