Completes mono-component reactions output by RetroPath2.0 with the appropriate cofactors. Creates sub-paths when multiple reaction rules are associated with a single reaction. Input is a single pathways file produced by RP2Paths. It stands on rrCache which store pre-computed data.
All metabolic pathways will be built as the following:
- In each "master" pathway,
- each chemical transformation could be produced by multiple reaction rules, and
- each reaction rule could have been produced by multiple template chemical reactions.
- each chemical transformation could be produced by multiple reaction rules, and
Thus, each different template reaction for each different reaction rule for each different chemical transformation provides one single possible pathway. The algorithm explores the combinatorics of all possible pathways and for each "master pathway" (the one from chemical transformations), keeps only top ones (defined by max_subpaths_filter CLI option, default: 10).
Required:
- rp2_metnet: (string) Path to the metabolic network file built by RetroPath2.0
- sink: (string) Path to the rpextractsink file containing infos on molecules in the sink
- rp2paths_compounds: (string) Path to the rp2paths compounds file
- rp2paths_pathways: (string) Path to the rp2paths pathways file
- outdir: (string) Path to the folder where result files are written
Advanced options:
- --upper_flux_bound: (integer, default=10000) Upper flux bound value for all new reactions created
- --lower_flux_bound: (integer, default=-10000) Lower flux bound value for all new reactions created
- --max_subpaths_filter: (integer, default=10) Number of subpaths per master pathway
rpcompletion depends on rplibs, which depends on cobra, which requires python-libsbml.
On Apple Silicon (arm64) macOS, python-libsbml is not available as a native Conda package.
Therefore, installation must be done using an Intel (osx-64) Conda environment under Rosetta.
conda install -c conda-forge rpcompletionsoftwareupdate --install-rosetta --agree-to-licenseCONDA_SUBDIR=osx-64 conda install -c conda-forge rpcompletionOr with mamba:
CONDA_SUBDIR=osx-64 mamba install -c conda-forge rpcompletionconda config --env --set subdir osx-64python -c "import rpcompletion; print('rpcompletion installed successfully')"
python -c "import cobra; print(cobra.__version__)"Make sure you are using:
CONDA_SUBDIR=osx-64Check:
conda config --show subdirExpected output:
subdir: osx-64From Python code
from rpcompletion import rp_completion
pathways = rp_completion(
rp2_metnet_filename,
sink_filename,
rp2paths_compounds_filename,
rp2paths_pathways_filename,
)From CLI
python -m rpcompletion \
rp2_metnet.csv \
sink.csv \
rp2paths_compounds.csv \
rp2paths_pathways.csv \
<outdir>Test can be run with the following commands:
python -m pytest- Joan Hérisson
- Thomas Duigou
- Melchior du Lac
rpCompletion is released under the MIT licence. See the LICENCE file for details.