-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
local.json
in favor of system variables (#19)
* remove local.json * refactor to use third party binaries as system variables * add THIRDPARTY.md * update dockerfile * update tests
- Loading branch information
1 parent
1df641c
commit 9dcc312
Showing
13 changed files
with
252 additions
and
205 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,56 +1,65 @@ | ||
#============================================================================================== | ||
FROM python:3.11 as base | ||
FROM python:3.11 AS base | ||
|
||
LABEL author="Rodrigo V. Honorato <[email protected]>" | ||
|
||
ARG SOFTWARE_PATH=/opt/software | ||
|
||
#------------------------------------------------------------------------------------------ | ||
# System dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
libboost-all-dev \ | ||
&& \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy Whiscy | ||
WORKDIR /opt/software/whiscy | ||
COPY . . | ||
|
||
# install BioPython | ||
RUN pip install biopython==1.79 | ||
|
||
# Build protdist | ||
WORKDIR /opt/software/whiscy/bin/protdist | ||
RUN sh compile.sh | ||
|
||
#------------------------------------------------------------------------------------------ | ||
# Build Muscle | ||
WORKDIR /opt/software/whiscy/muscle3.8.1551 | ||
WORKDIR ${SOFTWARE_PATH}/muscle3.8.1551 | ||
RUN curl https://drive5.com/muscle/muscle_src_3.8.1551.tar.gz | tar xzv && \ | ||
make && \ | ||
mv muscle /opt/software/whiscy/bin/muscle3.8.1551 && \ | ||
sed -i "s/\/Users\/bjimenez\/bin\/muscle\/muscle3.8.31_i86darwin64/\/opt\/software\/whiscy\/bin\/muscle3.8.1551/g" /opt/software/whiscy/etc/local.json | ||
make | ||
ENV MUSCLE_BIN=${SOFTWARE_PATH}/muscle3.8.1551/muscle | ||
|
||
#------------------------------------------------------------------------------------------ | ||
# Build hsspconv | ||
WORKDIR ${SOFTWARE_PATH} | ||
RUN wget https://github.com/cmbi/hssp/archive/3.1.5.tar.gz && \ | ||
tar -zxvf 3.1.5.tar.gz && \ | ||
cd hssp-3.1.5 && \ | ||
./autogen.sh && \ | ||
./configure && \ | ||
make hsspconv && \ | ||
mv hsspconv ../ && \ | ||
sed -i "s/\/Users\/bjimenez\/bin\/hssp\/hsspconv/\/opt\/software\/whiscy\/bin\/hsspconv/g" /opt/software/whiscy/etc/local.json | ||
|
||
make hsspconv | ||
ENV HSSPCONV_BIN=${SOFTWARE_PATH}/hssp-3.1.5/hsspconv | ||
|
||
#------------------------------------------------------------------------------------------ | ||
# Build freesasa | ||
WORKDIR ${SOFTWARE_PATH} | ||
RUN wget https://github.com/mittinatten/freesasa/releases/download/2.0.3/freesasa-2.0.3.tar.gz && \ | ||
tar -zxvf freesasa-2.0.3.tar.gz && \ | ||
cd freesasa-2.0.3 && \ | ||
./configure --disable-json --prefix=/opt/software/whiscy/bin/freesasa && \ | ||
make && make install | ||
|
||
# WHISCY exports | ||
ENV WHISCY_PATH=/opt/software/whiscy | ||
ENV PYTHONPATH="${PYTHONPATH}:${WHISCY_PATH}" | ||
ENV WHISCY_BIN="${WHISCY_PATH}/whiscy.py" | ||
ENV PATH="${WHISCY_PATH}:${WHISCY_PATH}/bin/freesasa/bin:${PATH}" | ||
./configure --disable-json --prefix=`pwd` && \ | ||
make && \ | ||
make install | ||
ENV FREESASA_BIN=${SOFTWARE_PATH}/freesasa-2.0.3/bin/freesasa | ||
|
||
#------------------------------------------------------------------------------------------ | ||
# Install Whiscy | ||
WORKDIR ${SOFTWARE_PATH}/whiscy | ||
COPY . . | ||
|
||
#------------------------------------------------------------------------------------------ | ||
# install BioPython | ||
RUN pip install biopython==1.79 | ||
|
||
#------------------------------------------------------------------------------------------ | ||
# Build protdist | ||
WORKDIR ${SOFTWARE_PATH}/whiscy/bin/protdist | ||
RUN sh compile.sh | ||
ENV PROTDIST_BIN=${SOFTWARE_PATH}/whiscy/bin/protdist/protdist | ||
|
||
#------------------------------------------------------------------------------------------ | ||
# Set data directory | ||
|
||
WORKDIR /data | ||
|
||
|
This file contains 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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Installation of Third-Party dependencies | ||
|
||
These instructions assuming you are installing locally in a Ubuntu Linux system, different steps may be required for other systems. | ||
|
||
All will be installed in a `software` directory in your `$HOME` directory. | ||
|
||
## System dependendencies | ||
|
||
```bash | ||
$ sudo apt-get update && \ | ||
sudo apt-get install -y build-essential libboost-all-dev | ||
``` | ||
|
||
## Muscle | ||
|
||
```bash | ||
$ mkdir -p $HOME/software && cd $HOME/software | ||
$ mkdir muscle3.8.1551 && cd muscle3.8.1551 | ||
$ wget https://drive5.com/muscle/muscle_src_3.8.1551.tar.gz | ||
$ tar -zxf muscle_src_3.8.1551.tar.gz && rm muscle_src_3.8.1551.tar.gz | ||
$ make | ||
$ export MUSCLE_BIN=$HOME/software/muscle3.8.1551/muscle | ||
``` | ||
|
||
## Freesasa | ||
```bash | ||
$ mkdir -p $HOME/software && cd $HOME/software | ||
$ wget https://github.com/mittinatten/freesasa/releases/download/2.0.3/freesasa-2.0.3.tar.gz | ||
$ tar -zxf freesasa-2.0.3.tar.gz && rm freesasa-2.0.3.tar.gz | ||
$ cd freesasa-2.0.3 | ||
$ ./configure --disable-json --prefix=`pwd` | ||
$ make | ||
$ make install | ||
$ export FREESASA_BIN=$HOME/software/freesasa-2.0.3/bin/freesasa | ||
``` | ||
|
||
## HSSPCONV | ||
```bash | ||
$ mkdir -p $HOME/software && cd $HOME/software | ||
$ wget https://github.com/cmbi/hssp/archive/3.1.5.tar.gz | ||
$ tar -zxf 3.1.5.tar.gz && rm 3.1.5.tar.gz | ||
$ cd hssp-3.1.5 | ||
$ ./autogen.she | ||
$ ./configure | ||
$ make hsspconv | ||
$ export HSSPCONV_BIN=$HOME/software/hssp-3.1.5/hsspconv | ||
``` | ||
|
||
## Protdist | ||
|
||
Protdist is distributed together with WHISCY, you can find it in the `whiscy` directory. We are working on a better way to install this dependency 🙂 | ||
|
||
```bash | ||
$ mkdir -p $HOME/software && cd $HOME/software | ||
$ git clone https://github.com/haddocking/whiscy | ||
$ mv whiscy/bin/protdist . && rm -rf whiscy | ||
$ cd protdist | ||
$ bash compile.sh | ||
$ export PROTDIST_BIN=$HOME/software/protdist/protdist | ||
``` | ||
|
||
--- | ||
|
||
In the end the system variables that define the third-party dependencies should look like this: | ||
|
||
```bash | ||
export MUSCLE_BIN=$HOME/software/muscle3.8.1551/muscle | ||
export FREESASA_BIN=$HOME/software/freesasa-2.0.3/bin/freesasa | ||
export HSSPCONV_BIN=$HOME/software/hssp-3.1.5/hsspconv | ||
export PROTDIST_BIN=$HOME/software/protdist/protdist | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import os | ||
from pathlib import Path | ||
|
||
MUSCLE_BIN = os.environ.get("MUSCLE_BIN") | ||
FREESASA_BIN = os.environ.get("FREESASA_BIN") | ||
HSSPCONV_BIN = os.environ.get("HSSPCONV_BIN") | ||
PROTDIST_BIN = os.environ.get("PROTDIST_BIN") | ||
|
||
# Make sure none of them are None | ||
if MUSCLE_BIN is None: | ||
raise ValueError("MUSCLE_BIN not found in system variables") | ||
|
||
if FREESASA_BIN is None: | ||
raise ValueError("FREESASA_BIN not found in system variables") | ||
|
||
if HSSPCONV_BIN is None: | ||
raise ValueError("HSSPCONV_BIN not found in system variables") | ||
|
||
if PROTDIST_BIN is None: | ||
raise ValueError("PROTDIST_BIN not found in system variables") | ||
|
||
PARAM_PATH = Path(Path(__file__).parent.parent, "param") | ||
|
||
|
||
CUTOFF = { | ||
"sa_pred_cutoff": 15.0, | ||
"sa_act_cutoff": 40.0, | ||
"air_cutoff": 0.18, | ||
"air_dist_cutoff": 6.5, | ||
} | ||
|
||
AIR = { | ||
"air_pro_percentage": 10.0, | ||
"air_wm_pro_or": 98.52, | ||
"air_wm_whis_or": 0.370515, | ||
"air_wm_pro_and": 55.42, | ||
"air_wm_whis_and": 0.106667, | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.