COoperation and COmpetition potentials in MIcrobial COmunities
Project description
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: (
run
mode) - a
benchmark
mode: run can be performed systematically for a collection of microbial communities described in ajson
file
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:
ComP
andCoop
are respectively the competition and the cooperation potentials.rh
is a score describing the gain of activated reactions in the interacting community with respect to activated reaction in a non-interacting communitydelt
is a score describing the gain of producible metabolites in the interacting community with respect to activated reaction in a non-interacting communitycom_siz
describes the size of the corresponding community ie the number of genome-scale metabolic networksnb_exc_cpd
denotes the putative number of metabolic exchanges in the communityCooP_producers
andCooP_consumers
calculate 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file CoCoMiCo-0.2.1.tar.gz
.
File metadata
- Download URL: CoCoMiCo-0.2.1.tar.gz
- Upload date:
- Size: 38.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d83ee428661124f75bf39491c51b0ae6b5bebdf1772746ac5853c3b8096e8c49 |
|
MD5 | 86ddf79a139268e72ad2573f947e1ca2 |
|
BLAKE2b-256 | 1c5a7da477120e0cfd972b8c8aee3f37d79c7e7f4c204a6bae84f38a8e034601 |
File details
Details for the file CoCoMiCo-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: CoCoMiCo-0.2.1-py3-none-any.whl
- Upload date:
- Size: 34.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecbadac6c0d8aff83bd54a5d4d239b172647d6fc587f835c25733f2c13349799 |
|
MD5 | 0eef7a8aa3d0409be4b987942b742760 |
|
BLAKE2b-256 | abc317c41b05e5ee39d30eb2878ec1b09b8ce6572f03150de12d6760ace0a3d3 |