CoCoMiCo : COoperation and COmpetition in MIcrobial COmmunities
CoCoMiCo aims at characterising the metabolism of microbial communities through genome-scale metabolic networks: it calculates cooperation and competition potentials for the communities. It has two modes:
- a regular mode: cooperation and competition potentials are computed for a community whose associated genome-scale metabolic networks are located in a directory: (
runmode) - a
benchmarkmode: run can be performed systematically for a collection of microbial communities described in ajsonfile
CoCoMiCo can be tested on toy data using the following command: cocomico toys.
Install
Required Python >= 3.7. The main dependency of CoCoMiCo is an Answer Set Programming (ASP) solver. Clyngor permits the connection between Python and ASP, whereas Clyngor_with_clingo provides the solver binaries in the Python environment. If you work in a conda environment, installing the solvers directly (clingo) makes it unnecessary to install Clyngor_with_clingo.
pip install cocomico
or
python setyp.py install
or after cloning this repository
pip install .
If you use CoCoMiCo, please cite:
Lecomte M, Muller C, Badoual A, Falentin H, Sherman DJ, and Frioux C. 2023. CoCoMiCo: metabolic modelling of cooperation and competition potentials in large-scale bacterial communities.
Usage
Single community run
run needs the specific architecture as follow:
Community_folder
├── species_1.sbml
├── species_4.sbml
├── species_10.sbml
Metabolic network file in the community_folder can be in either .xml or .sbml format. run mode creates the json community in the appropriate format described in the section benchmark.
usage: cocomico run [-h] [-folder_path FOLDER_PATH] [-seed_path SEED_PATH] [-output OUTPUT]
optional arguments:
-h, --help show this help message and exit
-i, -folder_path FOLDER_PATH, --folder_path FOLDER_PATH
Directory path of a community composed of sbml or xml files.
-s, -seed_path SEED_PATH, --seed_path SEED_PATH
path of seed file
-o, -output OUTPUT, --output OUTPUT
output path
Exemple of execution
cocomico run -folder_path PATH_COMMUNITIES_FOLDER -seed_path PATH_SEED_FILE -output PATH_OUTPUT
Multiple runs: benchmarking mode
benchmark needs the genome-scale metabolic networks used for community construction to be stored in a directory and a json file describing the composition of each sample as follow.
For example:
Folder_input
├── communities.json
├── sbml
│ └── species_1.sbml
│ └── species_4.xml
| ..
`communities.json`` must be in the following format:
{
"com_0" :[
species_1.sbml,
species_4.xml,
species_10.sbml
],
"com_1" :[
species_12.xml,
species_120.sbml
]
}
Here, sample com0 is composed of three species: species_, species_4 and species_10.
usage: cocomico benchmark [-h] [-json_com JSON_COM] [-seed_path SEED_PATH] [-sbml_path SBML_PATH] [-output OUTPUT]
optional arguments:
-h, --help show this help message and exit
-j, -json_com JSON_COM, --json_com JSON_COM
path of the json file
-s, -seed_path SEED_PATH, --seed_path SEED_PATH
path of seed file
-i, -sbml_path SBML_PATH, --sbml_path SBML_PATH
folder path to find sbml model
-o -output OUTPUT, --output OUTPUT
output path
Exemple of execution
cocomico benchmark -json_com PATH_COMMUNITIES_JSON_FILE -seed_path PATH_SEED_FILE -sbml_path PATH_SBML_DIRECTORY -output PATH_OUTPUT
toys
usage: cocomico toys [-h] [-output OUTPUT]
optional arguments:
-h, --help show this help message and exit
-o, -output OUTPUT, --output OUTPUT
output path
Output
In a folder community_scores, the output is a json file as follow:
{
""metabolite production value (delta)": 31,
"metabolite production value_metric": {
"added value community": 17,
"all individual can produce": 14
},
"cooP": 18.0,
"cooP_metric": {
"number of exchanged metabolites": 8,
"pi producers": 8.5,
"pi consumers": 9.5
},
"reaction production(rho)": 58,
"reaction production_metric": {
"added value comunity": 37
},
"comP": 3.25,
"comP_metric": {
"total number of limited subtrates": 13
},
"bacteria": [
"Com2Org1",
"Com2Org4",
"Com2Org2",
"Com2Org3"
]
}
In addition, a scores.tsv file is generated, in the output directory, containing all information about the communities:
ComPandCoopare respectively the competition and the cooperation potentials.rhis a score describing the gain of activated reactions in the interacting community with respect to activated reaction in a non-interacting communitydeltis a score describing the gain of producible metabolites in the interacting community with respect to activated reaction in a non-interacting communitycom_sizdescribes the size of the corresponding community ie the number of genome-scale metabolic networksnb_exc_cpddenotes the putative number of metabolic exchanges in the communityCooP_producersandCooP_consumerscalculate respectively the number of producers and consumers of exchanged metabolites, applying an exponential decrease to the score each time a metabolite is produced (respectively consumed) by more than one member.
| delta | cooP | rho | comP | com_size | nb_exc_cpd | cooP_producers | cooP_consumers | |
|---|---|---|---|---|---|---|---|---|
| 0 | 22 | 10.0 | 40 | 2.66 | 3 | 4 | 4.5 | 5.5 |
| 1 | 31 | 18.0 | 58 | 3.25 | 4 | 8 | 8.5 | 9.5 |
Version
CoCoMiCo version 0.2.1
Metadata
Release files for CoCoMiCo 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| CoCoMiCo-0.2.1.tar.gz | 38.7 kB | Without provenance | Details for CoCoMiCo-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| CoCoMiCo-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for CoCoMiCo-0.2.1-py3-none-any.whl |
Total release size: 73.5 kB
Release files / CoCoMiCo-0.2.1.tar.gz
| Download URL | CoCoMiCo-0.2.1.tar.gz |
|---|---|
| Size | 38.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d83ee428661124f75bf39491c51b0ae6b5bebdf1772746ac5853c3b8096e8c49
|
|
BLAKE2b-256 checksum How to use checksums |
1c5a7da477120e0cfd972b8c8aee3f37d79c7e7f4c204a6bae84f38a8e034601
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.2
|
Release files / CoCoMiCo-0.2.1-py3-none-any.whl
| Download URL | CoCoMiCo-0.2.1-py3-none-any.whl |
|---|---|
| Size | 34.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ecbadac6c0d8aff83bd54a5d4d239b172647d6fc587f835c25733f2c13349799
|
|
BLAKE2b-256 checksum How to use checksums |
abc317c41b05e5ee39d30eb2878ec1b09b8ce6572f03150de12d6760ace0a3d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.2
|
Security for CoCoMiCo 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.