Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ Executions can be timed out using the `timeout` arguments (in minutes).
- 2: Running the RetroPath2.0 Knime program produced an OSError
- 3: InChI is malformated
- 4: Sink file is malformed
- 5: Knime installation returns an error
- 10: Source has been found in the sink (warning)
- 11: No solution is found (warning)

Expand All @@ -117,13 +116,13 @@ To run functional tests, the environment variable `RP2_FUNCTIONAL=TRUE` is requi

### Knime dependencies

Availbale options:
Available options:

1. You provide a path of the Knime root directory through the argument `--kinstall`. 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, at the root of the python package, 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.

```bash
python -m retropath2_wrapper.knime \
python -m retropath2_wrapper.knime online \
--kinstall "/path/to/knime/root/dir" \
--kver {4.6.4,4.7.0}
```
Expand All @@ -134,6 +133,14 @@ Knime software and packages are available at:
- [KNIME v4.6.4 - Zenodo](https://zenodo.org/record/7515771)
- [KNIME v4.7.0 - Zenodo](https://zenodo.org/record/7564938)

All files from these repositories can be downloaded through the `Download all` button:

```bash
python -m retropath2_wrapper.knime local \
--kinstall "/path/to/knime/root/dir" \
--zenodo-zip "/path/to/7515771.zip"
```

## Known issues

1. Could not load native RDKit library, libfreetype.so.6: cannot open shared object file
Expand Down
1 change: 0 additions & 1 deletion retropath2_wrapper/Args.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
'OSError': 2,
'InChI': 3,
'SinkFileMalformed': 4,
'KnimeInstallationError': 5,
}


Expand Down
14 changes: 12 additions & 2 deletions retropath2_wrapper/RetroPath2.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from filetype import guess
from tempfile import TemporaryDirectory
from typing import Dict, Tuple
from types import SimpleNamespace
from logging import (
Logger,
getLogger
Expand All @@ -32,6 +33,7 @@
DEFAULTS,
RETCODES,
)
from retropath2_wrapper import knime as knime_module
from retropath2_wrapper.knime import Knime
from retropath2_wrapper.preference import Preference

Expand Down Expand Up @@ -78,8 +80,16 @@ def retropath2(
)
if knime.kexec == "":
# Install KNIME
if not knime.install(kver=Knime.DEFAULT_VERSION, logger=logger):
return RETCODES["KnimeInstallationError"]
args_knime = SimpleNamespace(
kinstall=knime.kinstall,
kver=Knime.DEFAULT_VERSION,
)
knime_module.install_online(args_knime, logger=logger)
# Init Knime again to set Knime.kexec
knime = Knime(
kinstall=knime.kinstall,
workflow=knime.workflow,
)
logger.debug('knime: ' + str(knime))

# Store RetroPath2 params into a dictionary
Expand Down
Loading
Loading