medema-group / BiG-SCAPE

Similarity networks of biosynthetic gene clusters
GNU Affero General Public License v3.0
69 stars 26 forks source link

Add official singularity image #26

Closed currocam closed 1 year ago

currocam commented 1 year ago

We would like to use BiG-SCAPE either using Docker or, preferably, singularity. The latest release docker image is not working for us. I understand is under development (see #25 ). There are images in dockerhub such as https://hub.docker.com/r/aflatoxing/bigscape which are not up to date.

I have created a singularity image for the latest available version of bigscape, following the instructions given in this issue #22 but using as source code the latest release.

My final singularity image can be found here: https://cloud.sylabs.io/library/currocam/default/bigscape

This image is working for us in our server. I would appreciate if you could offer an official image to use (maybe using this one as a reference). Also, I don't understand why the dockerfile image refers to the latest version of the project instead of a release. Doesn't it make it less reproducible and more susceptible to bugs?

Thank you in advance.

How to reproduce sif file

This is the our bigscape.def file. It is based os this file:

https://singularityhub.github.io/singularityhub-archive/containers/ISU-HPC-big-scape-latest/

Bootstrap: docker
from: continuumio/miniconda3
%labels
MAINTAINER campuzanocurro@gmail.com
%post
apt-get update -y
apt install -y wget unzip
export PATH=/opt/conda/bin:$PATH
echo 'export PATH=/usr/local/bin:/opt/conda/bin:$PATH' >>$SINGULARITY_ENVIRONMENT
conda install -y numpy scipy scikit-learn
conda install -c bioconda hmmer biopython fasttree anaconda networkx
cd /usr/src
wget https://github.com/medema-group/BiG-SCAPE/archive/refs/tags/v1.1.5.zip
unzip v1.1.5.zip
rm v1.1.5.zip
mv BiG-SCAPE-1.1.5 BiG-SCAPE
wget ftp://ftp.ebi.ac.uk/pub/databases/Pfam/releases/Pfam31.0/Pfam-A.hmm.gz
gunzip Pfam-A.hmm.gz && hmmpress Pfam-A.hmm && mv Pfam-A.* /usr/src/BiG-SCAPE/.
chmod +x /usr/src/BiG-SCAPE/*.py
echo 'export PATH=/usr/src/BiG-SCAPE:$PATH' >>$SINGULARITY_ENVIRONMENT
mkdir -p /local/scratch
chmod 777 /local/scratch
mkdir -p /local/scratch/input /local/scratch/output

I build the image by running

singularity build --sandbox --fakeroot bigscape bigscape.def

Then, I edit the source code as indicated in #22 and build the sif file

singularity build --fakeroot bigscape_singularity.sif bigscape

We are able to run the program using

singularity run bigscape_singularity.sif python /usr/src/BiG-SCAPE/bigscape.py --help

CatarinaCarolina commented 1 year ago

Docker image has been updated (#25)

Singularity image will be built for release 2.0