diff --git a/astrocyte_pkg.yml b/astrocyte_pkg.yml index 135c14c4ac4c473050f38b8cc32a1963322afcee..e7b412ea2bb30601f889f6711723a9261d133fd2 100644 --- a/astrocyte_pkg.yml +++ b/astrocyte_pkg.yml @@ -66,7 +66,7 @@ workflow_containers: - docker://git.biohpc.swmed.edu:5050/s219741/chipseq-analysis-containerized/r:3.3.2 - docker://git.biohpc.swmed.edu:5050/s219741/chipseq-analysis-containerized/python:3.6.1 - docker://git.biohpc.swmed.edu:5050/s219741/chipseq-analysis-containerized/chipseq:1.0.0 - - docker://git.biohpc.swmed.edu:5050/s219741/chipseq-analysis-containerized/motif-search:meme-4.11.1 + - docker://git.biohpc.swmed.edu:5050/s219741/chipseq-analysis-containerized/motif-search:meme-5.5.4 # A list of parameters used by the workflow, defining how to present them, # options etc in the web interface. For each parameter: diff --git a/building/docker/motif-search/meme-5.5.4/Dockerfile b/building/docker/motif-search/meme-5.5.4/Dockerfile new file mode 100755 index 0000000000000000000000000000000000000000..ae9197f5b0f80266069dcdbfd5f1388aad21ee10 --- /dev/null +++ b/building/docker/motif-search/meme-5.5.4/Dockerfile @@ -0,0 +1,73 @@ +#FROM ubuntu:20.04 +FROM continuumio/miniconda3:24.3.0-0 + +WORKDIR /motif-search/ + +ENV DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC + +# Environment variables for the campus proxy. +ENV http_proxy="http://proxy.swmed.edu:3128" \ + https_proxy="http://proxy.swmed.edu:3128" + +COPY ./meme-5.5.4.tar.gz . +# RUN wget https://meme-suite.org/meme/meme-software/5.5.4/meme-5.5.4.tar.gz +RUN tar -zxf ./meme-5.5.4.tar.gz +RUN rm meme-5.5.4.tar.gz + +COPY entrypoint.sh . + +RUN apt update \ + && apt-get install -y --no-install-recommends \ + wget \ + build-essential \ + ca-certificates \ + curl \ + imagemagick \ + libexpat1-dev \ + libxml2-dev \ + libxslt1-dev \ + libgs-dev \ + libgd-dev \ + #libexslt1-dev \ + python3 \ + zlib1g-dev \ + perl \ + libxml-simple-perl \ + libxml-libxml-perl \ + libxml-parser-perl \ + libhtml-template-compiled-perl \ + libxml-opml-simplegen-perl \ + libxml-libxml-debugging-perl \ + && apt-get clean + +# Install meme-chip +RUN cd meme-5.5.4 && \ + ./configure --prefix=/motif-search/meme --with-url="http://meme-suite.org" --enable-build-libxml2 --enable-build-libxslt && \ + make && \ + # make test && \ + make install && \ + export PATH=/motif-search/meme/bin/:/motif-search/meme/libexec/meme-5.5.4:$PATH && \ + meme -version && \ + meme-chip --version && \ + spamo --version && \ + centrimo --version && \ + # apt-get remove -y build-essential libxml2 libxml2-dev libxslt1-dev && \ + apt-get clean + +# Enable the use of bash-specific conda commands in the layer. +RUN eval "$(conda shell.bash hook)" && \ + chmod +x entrypoint.sh && \ + #conda create -y -c bioconda -c conda-forge -c defaults -n motifSearch python=2.7.12 pip=9.0.1 && \ + conda create -y -c bioconda -c conda-forge -c defaults -n motifSearch python=3.6.1 && \ + conda activate motifSearch && \ + python --version && \ + # Install pandas and numpy. + pip install numpy==1.12.1 && \ + pip install pandas==0.20.1 && \ + # Install BEDTools 2.26 .0 + conda install -y --solver=libmamba -c bioconda bedtools=2.26.0 && \ + bedtools --version && \ + conda clean -y --all && \ + conda deactivate + +ENTRYPOINT ["/motif-search/entrypoint.sh"] diff --git a/building/docker/motif-search/meme-5.5.4/entrypoint.sh b/building/docker/motif-search/meme-5.5.4/entrypoint.sh new file mode 100755 index 0000000000000000000000000000000000000000..ad47b594d82e570cce89e7ddb82d54e478e41e3b --- /dev/null +++ b/building/docker/motif-search/meme-5.5.4/entrypoint.sh @@ -0,0 +1,23 @@ +#!/bin/bash --login +# The --login ensures the bash configuration is loaded, enabling Conda. + +# Temporarily disable strict mode and activate conda: +# set : Used to set or unset shell attributes (when options are specified, as shown here). +# -e : Exit on non-zero return status. +# -u : Treat unset variables and parameters other than special parameters "@" and "*" as an error when performaing parameter expansion. +# -o : specify an option name. In our case here, we use the "pipefail" option. +# pipefail : If set, the return value of a pipeline is the value of the last (rightmost) command to exit with a non-zeros status, or zero if all commands in the pipeline exit successfully. +# Using + rather than - causes these options to be turned off. +set +euo pipefail + +source /opt/conda/etc/profile.d/conda.sh + +conda activate motifSearch + +export PATH=/motif-search/meme/bin/:$PATH + +# Enable strict mode: +set -euo pipefail + +# exec the final command: +exec "$@" diff --git a/building/docker/motif-search/meme-5.5.4/meme-5.5.4.tar.gz b/building/docker/motif-search/meme-5.5.4/meme-5.5.4.tar.gz new file mode 100755 index 0000000000000000000000000000000000000000..ffe3f5b59e25aa752207ddafa6084ebe0ab6be62 Binary files /dev/null and b/building/docker/motif-search/meme-5.5.4/meme-5.5.4.tar.gz differ diff --git a/workflow/configs/biohpc.config b/workflow/configs/biohpc.config index dd490f2d20d53d4135bccce471727a7b6f8e654e..aee07e3cb944189506a2a827a6f580ec6486fc47 100644 --- a/workflow/configs/biohpc.config +++ b/workflow/configs/biohpc.config @@ -79,7 +79,7 @@ process { } withName: motifSearch { executor = 'local' - container = 'docker://git.biohpc.swmed.edu:5050/s219741/chipseq-analysis-containerized/motif-search:meme-4.11.1' + container = 'docker://git.biohpc.swmed.edu:5050/s219741/chipseq-analysis-containerized/motif-search:meme-5.5.4' //cpus = 32 } withName: multiqcReport { diff --git a/workflow/scripts/motif_search.py b/workflow/scripts/motif_search.py index ffa0939edad4dab3d8865ea0ea4acc47c7f04533..4544a732198b7dc3bdf08a45c6337838aed4ad03 100755 --- a/workflow/scripts/motif_search.py +++ b/workflow/scripts/motif_search.py @@ -139,8 +139,10 @@ def motif_search(filename, genome, experiment, peak): logger.error("bedtools error: %s", err) # Call memechip + #out, err = utils.run_pipe([ + # 'meme-chip -oc %s -meme-minw 5 -meme-maxw 15 -meme-nmotifs 10 %s -norand' % (out_motif, out_fa)]) out, err = utils.run_pipe([ - 'meme-chip -oc %s -meme-minw 5 -meme-maxw 15 -meme-nmotifs 10 %s -norand' % (out_motif, out_fa)]) + 'meme-chip -oc %s -minw 5 -maxw 15 -meme-nmotifs 10 %s -meme-norand ' % (out_motif, out_fa)]) if err: logger.error("meme-chip error: %s", err)