-
Notifications
You must be signed in to change notification settings - Fork 8
Installation #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
soulios
wants to merge
6
commits into
yigbt:master
Choose a base branch
from
soulios:installation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Installation #39
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e376b7e
update options and saving for encoders
soulios 31f48a4
Merge branch 'master' of https://github.com/yigbt/deepFPlearn
soulios d7d315d
updated installation guide inreadme
soulios 5320eb3
updated installation guide and removed conda yml
soulios 7388d3a
adressed pr review comments. gpus not available on containers only vi…
soulios 561a213
Update README
bernt-matthias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,127 +10,125 @@ neural network (GNN) that predicts an association to a target molecule, e.g., a | |||||
| DeepFPlearn<sup>+</sup> is an extension of deepFPlearn[[2]](#2), which uses binary fingerprints to represent the | ||||||
| molecule's structure computationally. | ||||||
|
|
||||||
| ## Setting up Python environment | ||||||
| ## Installation | ||||||
|
|
||||||
| The DFPL package requires a particular Python environment to work properly. | ||||||
| It consists of a recent Python interpreter and packages for data-science and neural networks. | ||||||
| The exact dependencies can be found in the | ||||||
| [`requirements.txt`](requirements.txt) (which is used when installing the package with pip) | ||||||
| and [`environment.yml`](environment.yml) (for installation with conda). | ||||||
|
|
||||||
| You have several ways to provide the correct environment to run code from the DFPL package. | ||||||
|
|
||||||
| 1. Use the automatically built docker/Singularity containers | ||||||
| 2. Build your own container [following the steps here](container/README.md) | ||||||
| 3. Setup a python virtual environment | ||||||
| 4. Set up a conda environment install the requirements via conda and the DFPL package via pip | ||||||
| 1. Use bioconda to install the package | ||||||
| 2. Set up a Python virtual environment | ||||||
| 3. Use the automatically built Docker | ||||||
| 4. Use the automatically built Singularity containers | ||||||
|
|
||||||
| In the following, you find details for option 1., 3., and 4. | ||||||
| ### Bioconda | ||||||
bernt-matthias marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| The package is also available on Bioconda. You can find the Bioconda recipe here and | ||||||
| [] | ||||||
|
|
||||||
| First create an environment with the following command: | ||||||
|
|
||||||
| ```shell | ||||||
| conda create --override-channels --channel conda-forge --channel bioconda -n dfpl python3.8 deepfplearn | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| ``` | ||||||
|
|
||||||
| If you have a GPU available you can install the package with additional tensorflow-gpu package: | ||||||
|
|
||||||
| ```shell | ||||||
| conda create --override-channels --channel conda-forge --channel bioconda -n dfpl python3.8 deepfplearn tensorflow-gpu==2.9.3 | ||||||
bernt-matthias marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| ``` | ||||||
|
|
||||||
| Then activate the environment: | ||||||
|
|
||||||
| ```shell | ||||||
| conda activate dfpl | ||||||
| ``` | ||||||
|
|
||||||
bernt-matthias marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| ### Set up DFPL in a python virtual environment | ||||||
|
|
||||||
bernt-matthias marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| From within the `deepFPlearn` directory call | ||||||
|
|
||||||
| ``` | ||||||
| virtualenv -p python3 ENV_PATH | ||||||
| . ENV_PATH/bin/activate | ||||||
| pip install ./ | ||||||
| ``` | ||||||
|
|
||||||
| replace `ENV_PATH` by the directory where the python virtual environment should be created. | ||||||
| If your system has only python3 installed `-p python3` may be removed. | ||||||
|
|
||||||
| In order to use the environment, it needs to be activated with `. ENV_PATH/bin/activate`. | ||||||
|
|
||||||
| ### Docker container | ||||||
|
|
||||||
| You need docker installed on you machine. | ||||||
| You need docker installed on your machine. If you don't have it installed yet, you can find the installation | ||||||
| instructions [here](https://docs.docker.com/engine/install/). | ||||||
|
|
||||||
| In order to run DFPL use the following command line | ||||||
| In order to run DFPL pull the image using the following command line: | ||||||
|
|
||||||
| ```shell | ||||||
| docker run --gpus GPU_REQUEST registry.hzdr.de/department-computational-biology/deepfplearn/deepfplearn:TAG dfpl DFPL_ARGS | ||||||
| docker pull quay.io/biocontainers/deepfplearn:TAG | ||||||
| ``` | ||||||
| Then mount the directory containing the data you want to process and run the container with the following command: | ||||||
|
|
||||||
| ```shell | ||||||
| docker run -v /path/to/local/repo quay.io/biocontainers/deepfplearn:TAG dfpl DFPL_ARGS | ||||||
| ``` | ||||||
| And then you can run the container with the following command: | ||||||
|
|
||||||
| ```shell | ||||||
| docker run quay.io/biocontainers/deepfplearn:TAG dfpl DFPL_ARGS | ||||||
| ``` | ||||||
|
|
||||||
| where you replace | ||||||
|
|
||||||
| - `TAG` by the version you want to use or `latest` if you want to use latest available version) | ||||||
| - You can see available tags | ||||||
| here https://gitlab.hzdr.de/department-computational-biology/deepfplearn/container_registry/5827. | ||||||
| - `TAG` by the version you want to use | ||||||
| - You can see available tags in [biocontainers](https://biocontainers.pro/tools/deepfplearn). | ||||||
| In general a container should be available for each released version of DFPL. | ||||||
| - `GPU_REQUEST` by the GPUs you want to use or `all` if all GPUs should be used (remove `--gpus GPU_REQUEST` if only the | ||||||
| CPU should) | ||||||
| - `DFPL_ARGS` by arguments that should be passed to DFPL (use `--help` to see available options) | ||||||
|
|
||||||
| In order to get an interactive bash shell in the container use: | ||||||
|
|
||||||
| ```shell | ||||||
| docker run -it --gpus GPU_REQUEST registry.hzdr.de/department-computational-biology/deepfplearn/deepfplearn:TAG bash | ||||||
| docker run -it quay.io/biocontainers/deepfplearn:TAG bash | ||||||
| ``` | ||||||
|
|
||||||
|
|
||||||
| ### Singularity container | ||||||
|
|
||||||
| You need Singularity installed on your machine. You can download a container with | ||||||
| You need Singularity installed on your machine. You can find the installation instructions | ||||||
| [here](https://apptainer.org/user-docs/master/quick_start.html). | ||||||
|
|
||||||
| ```shell | ||||||
| singularity pull dfpl.TAG.sif docker://registry.hzdr.de/department-computational-biology/deepfplearn/deepfplearn:TAG | ||||||
| singularity pull dfpl.TAG.sif docker://quay.io/biocontainers/deepfplearn:TAG | ||||||
| ``` | ||||||
|
|
||||||
| - replace `TAG` by the version you want to use or `latest` if you want to use latest available version) | ||||||
| - replace `TAG` by the version you want to use | ||||||
| - You can see available tags | ||||||
| here https://gitlab.hzdr.de/department-computational-biology/deepfplearn/container_registry/5827. | ||||||
| In general a container should be available for each released version of DFPL. | ||||||
| [here](https://biocontainers.pro/tools/deepfplearn). | ||||||
|
|
||||||
| This stores the container as a file `dfpl.TAG.sif` which can be run as follows: | ||||||
|
|
||||||
| ```shell script | ||||||
| singularity run --nv dfpl.TAG.sif dfpl DFPL_ARGS | ||||||
| singularity run dfpl.TAG.sif dfpl DFPL_ARGS | ||||||
| ``` | ||||||
|
|
||||||
| - replace `DFPL_ARGS` by arguments that should be passed to DFPL (use `--help` to see available options) | ||||||
| - omit the `--nv` tag if you don't want to use GPUs | ||||||
|
|
||||||
| or you can start a shell script (look at [run-all-cases.sh](scripts/run-all-cases.sh) for an | ||||||
| example) | ||||||
|
|
||||||
| ```shell script | ||||||
| singularity run --nv dfpl.sif ". ./example/run-multiple-cases.sh" | ||||||
| ``` | ||||||
|
|
||||||
| It's also possible to get an interactive shell into the container | ||||||
|
|
||||||
| ```shell script | ||||||
| singularity shell --nv dfpl.TAG.sif | ||||||
| singularity shell dfpl.TAG.sif | ||||||
| ``` | ||||||
|
|
||||||
| **Note:** The Singularity container is intended to be used on HPC cluster where your ability to install software might | ||||||
| be limited. | ||||||
| For local testing or development, setting up the conda environment is preferable. | ||||||
|
|
||||||
| ### Set up DFPL in a python virtual environment | ||||||
|
|
||||||
| From within the `deepFPlearn` directory call | ||||||
|
|
||||||
| ``` | ||||||
| virtualenv -p python3 ENV_PATH | ||||||
| . ENV_PATH/bin/activate | ||||||
| pip install ./ | ||||||
| ``` | ||||||
|
|
||||||
| replace `ENV_PATH` by the directory where the python virtual environment should be created. | ||||||
| If your system has only python3 installed `-p python3` may be removed. | ||||||
|
|
||||||
| In order to use the environment it needs to be activated with `. ENV_PATH/bin/activate`. | ||||||
|
|
||||||
| ### Set up DFPL in a conda environment | ||||||
|
|
||||||
| To use this tool in a conda environment: | ||||||
|
|
||||||
| 1. Create the conda env from scratch | ||||||
|
|
||||||
| From within the `deepFPlearn` directory, you can create the conda environment with the provided yaml file that | ||||||
| contains all information and necessary packages | ||||||
|
|
||||||
| ```shell | ||||||
| conda env create -f environment.yml | ||||||
| ``` | ||||||
|
|
||||||
| 2. Activate the `dfpl_env` environment with | ||||||
|
|
||||||
| ```shell | ||||||
| conda activate dfpl_env | ||||||
| ``` | ||||||
|
|
||||||
| 3. Install the local `dfpl` package by calling | ||||||
| For local testing or development, setting up the bioconda environment is preferable. | ||||||
|
|
||||||
| ```shell | ||||||
| pip install --no-deps ./ | ||||||
| ``` | ||||||
|
|
||||||
| ## Prepare data | ||||||
|
|
||||||
|
|
||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.