https://github.com/brsynth/retropath2-wrapper
Python wrapper for Retropath2.0 Knime workflow
Science Score: 59.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
1 of 3 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.3%) to scientific vocabulary
Keywords
Repository
Python wrapper for Retropath2.0 Knime workflow
Basic Info
Statistics
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 3
- Releases: 18
Topics
Metadata Files
README.md
Retropath2.0 Python wrapper
Implementation of the KNIME retropath2.0 workflow. Takes for input the minimal (dmin) and maximal (dmax) diameter for the reaction rules and the maximal path length (maxSteps). The tool expects the following files: rules.csv, sink.csv and source.csv and produces results in an output folder.
Prerequisites
- Python 3
- KNIME (code was tested on
4.6.4,4.7.0versions)
Install
Prerequisite
The conda package manager is required. Fresh instructions on how to install conda are available online.
The tool tries to install the KNIME Anlytical Platform as well as the RetroPath2.0 node dependancies.
conda package
Install in the <my_env> conda environment:
shell
conda install -c conda-forge -n <my_env> retropath2_wrapper
Run
Disclaimer: we recommand to provide absolute path to files, problems can arise with relative paths.
From CLI (Linux, macOS)
sh
python -m retropath2_wrapper <sink-file> <rules-file> <out-dir> --source_file <source-file>
From Python code
The minimal required arguments are sink_file, source_file, rules_file and outdir.
```python
from retropath2_wrapper import retropath2
rcode = retropath2( sinkfile='/path/to/sink/file', sourcefile='/path/to/source/file', rulesfile='/path/to/rules/file', outdir='/path/to/outdir' ) ```
Exploration settings have default values and can be tuned: ```python from retropath2_wrapper import retropath2
rcode = retropath2( sinkfile='/path/to/sink/file', sourcefile='/path/to/source/file', rulesfile='/path/to/rules/file', outdir='/path/to/outdir', maxsteps=3, topx=100, dmin=0, dmax=100, mwmaxsource=1000, ) ```
Already installed KNIME app can hence be used that way, eg: ```python from retropath2_wrapper import retropath2
rcode = retropath2( sinkfile='/path/to/sink/file', sourcefile='/path/to/source/file', rulesfile='/path/to/rules/file', outdir='/path/to/outdir' kexec='/Applications/KNIME 4.3.0.app/Contents/MacOS/knime', ) ```
Executions can be timed out using the timeout arguments (in minutes).
Return codes
retropath2() function returns one of the following codes:
* 0: No error
* 1: File is not found
* 2: Running the RetroPath2.0 Knime program produced an OSError
* 3: InChI is malformated
* 10: Source has been found in the sink (warning)
* 11: No solution is found (warning)
Tests
Test can be run with the following commands:
Natively
sh
conda install -c conda-forge pytest
python -m pytest tests
To run functional tests, the environment variable RP2_FUNCTIONAL=TRUE is required.
Knime dependencies
Two options are available:
1. You provide a path of the Knime executable through the argument --kexec. You need to have the following libraries installed: org.knime.features.chem.types.feature.group, org.knime.features.datageneration.feature.group, org.knime.features.python.feature.group, org.rdkit.knime.feature.feature.group
2. retropath2_wrapper will install Knime for you by downloading the softwares available on Zenodo. You can choose a version among 4.6.4 or 4.7.0. Optionally, you can locate a path for the installation. If an executable is found in the path, Knime will not be reinstalled.
Knime software and packages are available at: * KNIME * KNIME v4.6.4 - Zenodo * KNIME v4.7.0 - Zenodo
Known issues
- Could not load native RDKit library, libfreetype.so.6: cannot open shared object file
Some Knime versions (like: 4.3.0) or environments can't load RDKit library.
You need to append the
$CONDA_PREFIX/libpath to theLD_LIBRARY_PATHvariable where thelibfreetypelibrary is available:sh conda activate <env_name> export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CONDA_PREFIX/lib"
CI/CD
For further tests and development tools, a CI toolkit is provided in cicd-toolkit folder (see cicd-toolkit/README.md).
How to cite RetroPath2.0?
Please cite:
Delépine B, Duigou T, Carbonell P, Faulon JL. RetroPath2.0: A retrosynthesis workflow for metabolic engineers. Metabolic Engineering, 45: 158-170, 2018. DOI: https://doi.org/10.1016/j.ymben.2017.12.002
Owner
- Name: BioRetroSynth
- Login: brsynth
- Kind: organization
- Website: http://www.jfaulon.com
- Repositories: 33
- Profile: https://github.com/brsynth
Our group is interested in synthetic biology and systems metabolic engineering in whole-cell and cell-free systems.
GitHub Events
Total
- Release event: 2
- Watch event: 1
- Push event: 12
- Pull request event: 3
- Create event: 3
Last Year
- Release event: 2
- Watch event: 1
- Push event: 12
- Pull request event: 3
- Create event: 3
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 370
- Total Committers: 3
- Avg Commits per committer: 123.333
- Development Distribution Score (DDS): 0.127
Top Committers
| Name | Commits | |
|---|---|---|
| joan | j****n@u****r | 323 |
| Guillaume Gricourt | g****i@g****m | 28 |
| Thomas Duigou | t****u@i****r | 19 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 10
- Total pull requests: 9
- Average time to close issues: 4 months
- Average time to close pull requests: 28 days
- Total issue authors: 7
- Total pull request authors: 2
- Average comments per issue: 2.0
- Average comments per pull request: 0.22
- Merged pull requests: 8
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 6 months
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 1
Top Authors
Issue Authors
- tduigou (3)
- guillaume-gricourt (2)
- niraito (1)
- bbanzai88 (1)
- cn-lugen (1)
- Abdel-youssef (1)
- razmarques (1)
Pull Request Authors
- guillaume-gricourt (9)
- dependabot[bot] (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 34 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 11
- Total maintainers: 1
pypi.org: retropath2-wrapper
'python wrapper to run retropath2.0 knime workflow'
- Homepage: https://github.com/brsynth/retropath2-wrapper
- Documentation: https://retropath2-wrapper.readthedocs.io/
- License: MIT
-
Latest release: 1.1.0
published over 5 years ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v2 composite
- docker://continuumio/miniconda3 * composite
- actions/checkout v2 composite
- actions/create-release v1 composite
- actions/download-artifact v2 composite
- actions/upload-artifact v2 composite
- ad-m/github-push-action master composite
- conda-incubator/setup-miniconda v2 composite
- mathieudutour/github-tag-action v5.6 composite
- ruby/setup-ruby v1 composite
- actions/checkout v2 composite
- conda-incubator/setup-miniconda v2 composite