Installation

The package refineGEMs and all its dependencies can be installed either via pip into virtual environments like conda or pipenv or via Docker. The latest version is tested with Python 3.10, 3.11 and 3.12.

Hint

Via pip

Warning

With the release of version 2.0.0, refineGEMs will only work with Python 3.10+.
For older versions Python 3.9 can still be used.

To install refineGEMs as Python package from PyPI, simply install it via pip:

pip install refinegems

Some refineGEMs features require optional dependencies that are not needed for the base installation:

pip install "refinegems[chebi]"
pip install "refinegems[ols]"
pip install "refinegems[sbo]"

To install all optional dependencies at once, run:

pip install "refinegems[optional]"

The connected tools ModelPolisher[1][2], MCC[3] and BOFdat[4] are also optional workflow steps and currently need to be installed directly from GitHub before using the corresponding functionality. If they are missing, refineGEMs reports the missing dependency and skips the affected optional step where possible.

Hint

BOFdat should be installed as stated below. The fork contains certain bug fixes such that the program is able to run. If you have a functional version of BOFdat installed you can try to use it. In case you encounter problems with your own version, please, install BOFdat as stated below.

pip install "model-polisher@git+https://github.com/draeger-lab/MPClient"
pip install "masschargecuration@git+https://github.com/draeger-lab/MassChargeCuration"
pip install "bofdat@git+https://github.com/draeger-lab/BOFdat"

Via Docker

refineGEMs can also be used via Docker. You can pull the latest image from (a) Docker Hub or (b) build it locally.

(a) Image from Docker Hub

To pull the image from Docker Hub, simply use:

docker pull biodatalab/refinegems:<tag>

(b) Local build

To build the Docker image locally, firstly clone the repository:

git clone "https://github.com/draeger-lab/refinegems.git"

Then change into the directory and build the image:

cd refinegems
docker build -t refinegems .

The default image installs the runtime optional dependency group from pyproject.toml, but excludes the documentation dependencies. Optional connected tools that are currently installed directly from GitHub are included by default and can be disabled for a smaller image:

# build without the optional connected GitHub tools
docker build \
   --build-arg INSTALL_EXTERNAL_TOOLS=false \
   -t refinegems:runtime .

The full default can also be made explicit:

docker build \
   --build-arg INSTALL_EXTERNAL_TOOLS=true \
   -t refinegems:full .

How to use

Note

To provide the input files and retrieve the output files mount one folder as workspace folder to the Docker image with -v.

The default command executed by the image is refinegems -h and provides the help information for the CLI of refineGEMs.

docker run refinegems -h

To use the image interactively and open a bash shell, run the following command:

docker run -it --entrypoint bash refinegems

To use the image for specific commands, you can simply use every of the CLI commands as entrypoint. For example, to curate a (draft) model, run:

docker run --name <container_name> -v <user_folder>:/rg_cont refinegems analyse stats ./path/to/model.xml