KRIPO stands for Key Representation of Interaction in POckets.
KNIME nodes for KripoDB (https://github.com/3D-e-Chem/kripodb).
Requirements:
- KNIME, https://www.knime.org, version 5.1 or higher
Optionally:
- KripoDB Python package & data files, https://github.com/3D-e-Chem/kripodb, required to start local running kripo web service instead of the public one.
Steps to get KripoDB nodes inside KNIME:
- Goto Help > Install new software ... menu
- Press add button
- Fill text fields with
https://3d-e-chem.github.io/updates/5.1
- Select --all sites-- in work with pulldown
- Open KNIME 3D-e-Chem Contributions folder
- Select KripoDB
- Install software & restart
See a minimal example workflow at examples/Knime-KripoDB-example.zip. The workflow can be run by importing it into KNIME as an archive.
Other workflows using the KripoDB nodes can be found at https://github.com/3D-e-Chem/workflows
Development requirements:
- Maven, https://maven.apache.org
Steps to get development environment setup based on https://github.com/knime/knime-sdk-setup#sdk-setup:
- Install Java 17
- Install Eclipse for RCP and RAP developers
- Configure Java 17 inside Eclipse Window > Preferences > Java > Installed JREs
- Import this repo as an Existing Maven project
- Activate target platform by going to Window > Preferences > Plug-in Development > Target Platform and check the
KNIME Analytics Platform (5.1) - nl.esciencecenter.e3dchem.kripodb.targetplatform/KNIME-AP-5.1.target
target definition. - A KNIME Analytics Platform instance can be started by right clicking on the
targetplatform/KNIME\ Analytics\ Platform.launch
file and selectingRun As → KNIME Analytics Platform
. The KNIME instance will contain the target platform together with all extensions defined in the workspace.
During import the Tycho Eclipse providers must be installed.
mvn package
Jar has been made in plugin/target
directory.
An Eclipse update site will be made in p2/target/repository
repository.
mvn verify
Tests in tests
module will have been run with results in test/target/surefire-reports
directory.
There are unit tests and workflow tests both are executed in the KNIME eclipse application.
See https://github.com/3D-e-Chem/knime-testflow for more information about workflow tests.
The web service client is generated using Swagger Code Generator and stored inside plugin/src/java/nl/esciencecenter/e3dchem/kripodb/ws/client/
directory.
- Start KripoDB webservice
kripodb serve data/similarities.frozen.h5 data/fragments.sqlite data/pharmacophores.h5
- Download swagger code generator
wget http://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.2.3/swagger-codegen-cli-2.2.3.jar
- Generate a client for KripoDB web service
java -jar swagger-codegen-cli-2.2.3.jar generate \
--input-spec http://localhost:8084/kripo/swagger.json \
--output client \
--lang java \
--config swagger-codegen.config.json
- Compile client
cd client
mvn package
- Populate plugin with client source code and dependencies
mkdir ../plugin/lib
cp target/lib/gson-* target/lib/logging-interceptor-* target/lib/ok* target/lib/swagger-annotations-* ../plugin/lib/
rm -r ../plugin/src/java/nl/esciencecenter/e3dchem/kripodb/ws/client
cp -r src/main/java/nl/esciencecenter/e3dchem/kripodb/ws/client ../plugin/src/java/nl/esciencecenter/e3dchem/kripodb/ws/
- Update plugin/META-INF/MANIFEST.MF, plugin/build.properties files to reflect contents of lib/
- Update versions in pom files with
mvn org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=<version>-SNAPSHOT
command. - Commit and push changes
- Create package with
mvn package
, will create update site inp2/target/repository
- Test node by installing it from local update site
- Append new release to 3D-e-Chem update site
- Make clone of https://github.com/3D-e-Chem/3D-e-Chem.github.io repo
- Append release to 3D-e-Chem update site with
mvn install -Dtarget.update.site=<3D-e-Chem repo/updates>
- Commit and push changes in this repo and 3D-e-Chem.github.io repo
- Create a Github release
- Update Zenodo entry
- Correct authors
- To Related/alternate identifiers section add http://dx.doi.org/10.1186/1758-2946-6-S1-O26 as
is cited by this upload
entry. - Make nodes available to 3D-e-Chem KNIME feature by following steps at https://github.com/3D-e-Chem/knime-node-collection#new-release
- Update CITIATION.cff with new DOI
The test workflow are tested against a mocked web server and not the actual http://3d-e-chem.vu-compmedchem.nl/kripodb site.
The mock server is called WireMock and normally gives empty responses.
To have WireMock server return filled responses, stubs stored in tests/src/test/resources/
directory must be provided.
The stubs can be recorded by starting a WireMock server in recording mode by:
java -jar tests/lib/wiremock-standalone-2.5.0.jar --proxy-all="http://3d-e-chem.vu-compmedchem.nl/" \
--port=8089 --record-mappings --verbose --root-dir=tests/src/test/resources/
java -jar tests/lib/wiremock-standalone-2.5.0.jar --proxy-all="http://localhost:8084/" \
--port=8089 --record-mappings --verbose --root-dir=tests/src/test/resources/
Then in a KNIME workflow in the KripoDB nodes set the base path to http://localhost:8089.
Executing the workflow will fetch data from http://3d-e-chem.vu-compmedchem.nl/kripodb via the WireMock server and cause new stubs to be recorded in the tests/src/test/resources/
directory.
To run the test workflows from inside KNIME desktop enviroment start the WireMock server in mock mode by:
java -jar tests/lib/wiremock-standalone-2.5.0.jar --port=8089 --verbose --root-dir=tests/src/test/resources/
Then import the test workflows in tests/src/knime/
directory, select the workflow in the KNIME explorer and in the context menu (right-click) select Run as workflow test
.