Skip to content

Commit

Permalink
Upgrade to newer version
Browse files Browse the repository at this point in the history
  • Loading branch information
toniher committed Jan 14, 2025
1 parent 0b53b4a commit 758306a
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 44 deletions.
20 changes: 9 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
FROM biocorecrg/debian-perlbrew-pyenv3-java:buster AS builder

ARG IPSCAN_VERSION=5.65-97.0
ARG IPSCAN_VERSION=5.72-103.0

# Install InterPro
RUN cd /usr/local; curl --retry 3 --fail --silent --show-error --location --remote-name https://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/${IPSCAN_VERSION}/alt/interproscan-core-${IPSCAN_VERSION}.tar.gz && \
curl --retry 3 --fail --silent --show-error --location --remote-name https://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/${IPSCAN_VERSION}/alt/interproscan-core-${IPSCAN_VERSION}.tar.gz.md5 && \
md5sum -c interproscan-core-${IPSCAN_VERSION}.tar.gz.md5

RUN cd /usr/local; curl --retry 3 --fail --silent --show-error --location --remote-name https://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/${IPSCAN_VERSION}/interproscan-${IPSCAN_VERSION}-64-bit.tar.gz && \
curl --retry 3 --fail --silent --show-error --location --remote-name https://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/${IPSCAN_VERSION}/interproscan-${IPSCAN_VERSION}-64-bit.tar.gz.md5 && \
md5sum -c interproscan-${IPSCAN_VERSION}-64-bit.tar.gz.md5

RUN cd /usr/local; tar zxf interproscan-${IPSCAN_VERSION}-64-bit.tar.gz --exclude "interproscan-${IPSCAN_VERSION}/data" && rm interproscan-${IPSCAN_VERSION}-64-bit.tar.gz interproscan-${IPSCAN_VERSION}-64-bit.tar.gz.md5
RUN cd /usr/local; tar zxf interproscan-core-${IPSCAN_VERSION}.tar.gz --exclude "interproscan-${IPSCAN_VERSION}/data" && rm interproscan-core-${IPSCAN_VERSION}.tar.gz interproscan-core-${IPSCAN_VERSION}.tar.gz.md5

# Replace interproscan.properties
COPY interproscan.properties /usr/local/interproscan-${IPSCAN_VERSION}/interproscan.properties
Expand All @@ -20,21 +19,20 @@ RUN tar zxf /tmp/signalp-4.1b.Linux.tar.Z -C /usr/local/interproscan-${IPSCAN_VE

COPY external/tmhmm-2.0c.Linux.tar.gz /tmp/
RUN tar zxf /tmp/tmhmm-2.0c.Linux.tar.gz -C /tmp && \
cp /tmp/tmhmm-2.0c/bin/decodeanhmm.Linux_x86_64 /usr/local/interproscan-${IPSCAN_VERSION}/bin/tmhmm/2.0c/decodeanhmm

cp /tmp/tmhmm-2.0c/bin/decodeanhmm.Linux_x86_64 /usr/local/interproscan-${IPSCAN_VERSION}/bin/tmhmm/2.0c/decodeanhmm

COPY external/phobius101_linux.tar.gz /tmp/
RUN tar xzf /tmp/phobius101_linux.tar.gz -C /usr/local/interproscan-${IPSCAN_VERSION}/bin/phobius/1.01 --strip-components 3

RUN chmod -R a+rx /usr/local/interproscan-${IPSCAN_VERSION}/bin/*
RUN chmod -R a+rx /usr/local/interproscan-${IPSCAN_VERSION}/bin/*

RUN cd /usr/local/interproscan-${IPSCAN_VERSION}; rm -rf data

FROM biocorecrg/debian-perlbrew-pyenv3-java:buster

ARG IPSCAN_VERSION=5.65-97.0
ARG IPSCAN_VERSION=5.72-103.0

ENV PATH "/usr/local/interproscan:${PATH}"
ENV PATH="/usr/local/interproscan:${PATH}"

COPY --from=builder /usr/local/interproscan-${IPSCAN_VERSION} /usr/local/interproscan

Expand Down
15 changes: 7 additions & 8 deletions Dockerfile.open
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
FROM biocorecrg/debian-perlbrew-pyenv3-java:buster AS builder

ARG IPSCAN_VERSION=5.65-97.0
ARG IPSCAN_VERSION=5.72-103.0

# Install InterPro
RUN cd /usr/local; curl --retry 3 --fail --silent --show-error --location --remote-name https://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/${IPSCAN_VERSION}/alt/interproscan-core-${IPSCAN_VERSION}.tar.gz && \
curl --retry 3 --fail --silent --show-error --location --remote-name https://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/${IPSCAN_VERSION}/alt/interproscan-core-${IPSCAN_VERSION}.tar.gz.md5 && \
md5sum -c interproscan-core-${IPSCAN_VERSION}.tar.gz.md5

RUN cd /usr/local; curl --retry 3 --fail --silent --show-error --location --remote-name https://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/${IPSCAN_VERSION}/interproscan-${IPSCAN_VERSION}-64-bit.tar.gz && \
curl --retry 3 --fail --silent --show-error --location --remote-name https://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/${IPSCAN_VERSION}/interproscan-${IPSCAN_VERSION}-64-bit.tar.gz.md5 && \
md5sum -c interproscan-${IPSCAN_VERSION}-64-bit.tar.gz.md5

RUN cd /usr/local; tar zxf interproscan-${IPSCAN_VERSION}-64-bit.tar.gz --exclude "interproscan-${IPSCAN_VERSION}/data" && rm interproscan-${IPSCAN_VERSION}-64-bit.tar.gz interproscan-${IPSCAN_VERSION}-64-bit.tar.gz.md5
RUN cd /usr/local; tar zxf interproscan-core-${IPSCAN_VERSION}.tar.gz --exclude "interproscan-${IPSCAN_VERSION}/data" && rm interproscan-core-${IPSCAN_VERSION}.tar.gz interproscan-core-${IPSCAN_VERSION}.tar.gz.md5

# Replace interproscan.properties
COPY interproscan.properties /usr/local/interproscan-${IPSCAN_VERSION}/interproscan.properties
RUN chmod a+r /usr/local/interproscan-${IPSCAN_VERSION}/interproscan.properties
RUN chmod -R a+rx /usr/local/interproscan-${IPSCAN_VERSION}/bin/*
RUN chmod -R a+rx /usr/local/interproscan-${IPSCAN_VERSION}/bin/*

RUN cd /usr/local/interproscan-${IPSCAN_VERSION}; rm -rf data

FROM biocorecrg/debian-perlbrew-pyenv3-java:buster

ARG IPSCAN_VERSION=5.65-97.0
ARG IPSCAN_VERSION=5.72-103.0

ENV PATH "/usr/local/interproscan:${PATH}"

Expand Down
36 changes: 17 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,44 @@

Container recipes for building [Interproscan](https://interproscan-docs.readthedocs.io) (for [Docker](https://www.docker.com/) and [Singularity](https://singularity.hpcng.org/)).

* If you want to use Interproscan external privative software, these programs must be obtained first with granted academic permissions.
* [SignalP](http://www.cbs.dtu.dk/services/SignalP/) ```signalp-4.1b.Linux.tar.Z```
* [TMHMM](http://www.cbs.dtu.dk/services/TMHMM/) ```tmhmm-2.0c.Linux.tar.gz```
* [Phobious](https://phobius.sbc.su.se/) ```phobius101_linux.tar.gz```
* Regarding phobius: https://www.biostars.org/p/238642/
* Keep in mind that some other modifications are also needed in those programs above in advance, e. g., replacing ```/usr/bin/perl``` for ```/usr/bin/env perl```
- If you want to use Interproscan external privative software, these programs must be obtained first with granted academic permissions.
- [SignalP](http://www.cbs.dtu.dk/services/SignalP/) `signalp-4.1b.Linux.tar.Z`
- [TMHMM](http://www.cbs.dtu.dk/services/TMHMM/) `tmhmm-2.0c.Linux.tar.gz`
- [Phobious](https://phobius.sbc.su.se/) `phobius101_linux.tar.gz`
- Regarding phobius: https://www.biostars.org/p/238642/
- Keep in mind that some other modifications are also needed in those programs above in advance, e. g., replacing `/usr/bin/perl` for `/usr/bin/env perl`

Last software package versions of Interproscan include the whole data by default. For container performance and distribution, we don't keep Interproscan data directory.

It is important to ensure that program and data versions match and that this is adequately reflected in ```interproscan.properties``` or ```interproscan.open.properties``` files. Otherwise Interproscan is not likely to work.

## Pregenerated images

* [Singularity](https://biocore.crg.eu/iprscan/)
* [Docker](https://hub.docker.com/r/biocorecrg/interproscan)
- [Singularity](https://biocore.crg.eu/iprscan/)
- [Docker](https://hub.docker.com/r/biocorecrg/interproscan)

## Building from Docker recipes

# With privative software
docker build -t iprscan:5.56-89.0 -f Dockerfile .
sudo singularity build iprscan-5.56-89.0.sif docker-daemon://iprscan:5.56-89.0
docker build -t iprscan:5.72-103.0 -f Dockerfile .
sudo singularity build iprscan-5.72-103.0.sif docker-daemon://iprscan:5.72-103.0
# Without privative software
docker build -t iprscan-open:5.56-89.0 -f Dockerfile.open .
sudo singularity build iprscan-5.56-89.0.open.sif docker-daemon://iprscan-open:5.56-89.0
docker build -t iprscan-open:5.72-103.0 -f Dockerfile.open .
sudo singularity build iprscan-5.72-103.0.open.sif docker-daemon://iprscan-open:5.72-103.0

You can avoid using ```sudo``` with ```--fakeroot``` Singularity build option.
You can avoid using `sudo` with `--fakeroot` Singularity build option.

## Running

For running the container images, it is mandatory to mount a data directory that fits the same Interproscan version. Below some example commands:

```
# Docker
docker run --volume /path/to/data:/usr/local/interproscan/data --volume /path/to/scratch:/scratch -t biocorecrg/interproscan:5.56-89.0 /usr/local/interproscan/interproscan.sh -i /scratch/test.fa --goterms --iprlookup --pathways -o /scratch/out_interpro -f TSV
docker run --volume /path/to/data:/usr/local/interproscan/data --volume /path/to/scratch:/scratch -t biocorecrg/interproscan:5.72-103.0 /usr/local/interproscan/interproscan.sh -i /scratch/test.fa --goterms --iprlookup --pathways -o /scratch/out_interpro -f TSV
# Singularity
singularity exec -B /path/to/data:/usr/local/interproscan/data -e iprscan-5.56-89.0.open.sif /usr/local/interproscan/interproscan.sh -i /path/to/test2.fa --goterms --iprlookup --pathways -o /path/to/out_interpro -f TSV
singularity exec -B /path/to/data:/usr/local/interproscan/data -e iprscan-5.72-103.0.open.sif /usr/local/interproscan/interproscan.sh -i /path/to/test2.fa --goterms --iprlookup --pathways -o /path/to/out_interpro -f TSV
```

## NOTES

* Moreover, keep into account that a user with suitable permissions may need first to index ```/usr/local/interproscan/data``` directory (e.g., with ```python3 /usr/local/interproscan/initial_setup.py```). You can use the very container images. Details here: https://interproscan-docs.readthedocs.io/en/latest/HowToRun.html
* Depending on your setup, you may need to change ```SINGULARITY_TMPDIR``` (and ```SINGULARITY_CACHEDIR```) environment variables for pointing to a location with enough space. More details at: https://singularity.hpcng.org/admin-docs/master/installation.html
- Moreover, keep into account that a user with suitable permissions may need first to index `/usr/local/interproscan/data` directory (e.g., with `python3 /usr/local/interproscan/initial_setup.py`). You can use the very container images. Details here: https://interproscan-docs.readthedocs.io/en/latest/HowToRun.html
- Depending on your setup, you may need to change `SINGULARITY_TMPDIR` (and `SINGULARITY_CACHEDIR`) environment variables for pointing to a location with enough space. More details at: https://singularity.hpcng.org/admin-docs/master/installation.html
11 changes: 5 additions & 6 deletions interproscan.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@ perl.command=perl
python3.command=python3

# Binary file locations (required for setup.py)
binary.hmmer3.path=${bin.directory}/hmmer/hmmer3/3.1b1
binary.hmmer33.path=${bin.directory}/hmmer/hmmer3/3.3
binary.hmmer3.path=${bin.directory}/hmmer/hmmer3/3.3

####################################
# Member databases HMMs
####################################
antifam.hmm.path=${data.directory}/antifam/7.0/AntiFam.hmm
gene3d.hmm.path=${data.directory}/gene3d/4.3.0/gene3d_main.hmm
hamap.hmm.path=${data.directory}/hamap/2023_01/hamap.hmm.lib
ncbifam.hmm.path=${data.directory}/ncbifam/13.0/ncbifam.hmm
panther.hmm.path=${data.directory}/panther/18.0/famhmm/binHmm
pfam-a.hmm.path=${data.directory}/pfam/36.0/pfam_a.hmm
hamap.hmm.path=${data.directory}/hamap/2023_05/hamap.hmm.lib
ncbifam.hmm.path=${data.directory}/ncbifam/15.0/ncbifam.hmm
panther.hmm.path=${data.directory}/panther/19.0/famhmm/binHmm
pfam-a.hmm.path=${data.directory}/pfam/37.1/pfam_a.hmm
pirsf.sfhmm.path=${data.directory}/pirsf/3.10/sf_hmm_all
pirsr.srhmm.path=${data.directory}/pirsr/2023_05/sr_hmm_all
sfld.hmm.path=${data.directory}/sfld/4/sfld.hmm
Expand Down

0 comments on commit 758306a

Please sign in to comment.