Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • BICF/Astrocyte/chipseq_analysis
  • s190984/chipseq_analysis
  • astrocyte/workflows/bicf/chipseq_analysis
  • s219741/chipseq-analysis-containerized
Show changes
Commits on Source (26)
Showing
with 610 additions and 21 deletions
......@@ -103,9 +103,18 @@ ENV/
# nextflow analysis folders/files
pipeline_trace*.txt*
dag.dot*
.nextflow*.log*
report*.html*
timeline*.html*
/workflow/output/*
/work/*
/.nextflow/*
test_data/*.fastq.gz
workflow/dag*.dot*
workflow/trace*.txt*
workflow/.nextflow/
workflow/.nextflow*.log*
workflow/report*.html*
workflow/timeline*.html*
workflow/output/*
workflow/work/*
workflow/images/
workflow/cleanup.sh
......@@ -9,15 +9,31 @@
# A unique identifier for the workflow package, text/underscores only
name: 'chipseq_analysis_bicf'
# Who wrote this?
author: 'Holly Ruess, Spencer D. Barnes, Jeremy A. Mathews, Beibei Chen and Venkat Malladi'
author: 'Holly Ruess, Spencer D. Barnes, Jeremy A. Mathews, Beibei Chen and Venkat Malladi, Peng Lian, Felix Perez'
# A contact email address for questions
email: 'bicf@utsouthwestern.edu'
# A more informative title for the workflow package
title: 'BICF ChIP-seq Analysis Workflow'
# A summary of the workflow package in plain text
description: |
This is a workflow package for the BioHPC/BICF ChIP-seq workflow system.
It implements ChIP-seq analysis workflow and visualization application.
This is a fully-containerized version of the workflow package for the
BioHPC/BICF ChIP-seq workflow system. It implements the ChIP-seq analysis
workflow and visualization application.
# The minimum Astrocyte version that requires to run this workflow. For old pipelines, which do not have this label
# a default value of 0.3.1 will be assigned automatically. A request of minimum version less than 0.4.0 will be ignored.
minimum_astrocyte_version: '2.0.1'
# The Nextflow version that requires to run this workflow. For old pipelines, which do not have this label
# a default value of 0.31.0 will be assigned automatically. Please make sure the requested nextflow version is available
# in the module list.
nextflow_version: '19.07.0'
# (Optional) The Nextflow config file to use for this workflow. If provided, the file should exist in workflow/configs
nextflow_config: 'biohpc.config'
# The container to use for this workflow, none/singularity. If omitted, the default value 'none' will be used.
container: 'singularity'
# The version of singularity to use. This is required if container == 'singularity'
singularity_version: '3.9.9'
# -----------------------------------------------------------------------------
# DOCUMENTATION
......@@ -39,21 +55,20 @@ documentation_files:
# A list of cluster environment modules that this workflow requires to run.
# Specify versioned module names to ensure reproducability.
workflow_modules:
- 'python/3.6.1-2-anaconda'
- 'trimgalore/0.4.1'
- 'bwa/intel/0.7.12'
- 'samtools/1.6'
- 'sambamba/0.6.6'
- 'bedtools/2.26.0'
- 'deeptools/2.5.0.1'
- 'phantompeakqualtools/1.2'
- 'macs/2.1.0-20151222'
- 'UCSC_userApps/v317'
- 'R/3.3.2-gccmkl'
- 'meme/4.11.1-gcc-openmpi'
- 'pandoc/2.7'
- 'singularity/3.0.2'
- None
# A list of container images requires to run this workflow.
# Specify full path and version names to ensure reproducibility.
# This keyword is required when 'container' is specified in Astrocyte 0.4.1 and above.
# Singularity supports different registries, please specify the protocol to use.
# Such as, "docker://", "shub://", "library://", etc. We encourage you to use the GitLab
# container registry of BioHPC to save and manage your container images.
workflow_containers:
- docker://git.biohpc.swmed.edu:5050/astrocyte/workflows/bicf/chipseq_analysis/py36:1.0.0
- docker://git.biohpc.swmed.edu:5050/astrocyte/workflows/bicf/chipseq_analysis/r:3.3.2
- docker://git.biohpc.swmed.edu:5050/astrocyte/workflows/bicf/chipseq_analysis/python:3.6.1
- docker://git.biohpc.swmed.edu:5050/astrocyte/workflows/bicf/chipseq_analysis/chipseq:1.0.0
- docker://git.biohpc.swmed.edu:5050/astrocyte/workflows/bicf/chipseq_analysis/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:
......
FROM continuumio/miniconda3:24.3.0-0
LABEL IMAGE="chipseq" \
IMAGE_VERSION="1.0.0" \
AUTHORS="Felix Perez,Peng Lian" \
EMAIL="biohpc-help@utsouthwestern.edu"
WORKDIR /chipseq/
# Environment variables for the campus proxy.
ENV http_proxy="http://proxy.swmed.edu:3128" \
https_proxy="http://proxy.swmed.edu:3128"
# Enable the use of bash-specific conda commands in the layer.
RUN eval "$(conda shell.bash hook)" && \
# Create a Python 3.6.1 conda environment and initialize its use.
conda create -y -c bioconda -c defaults -c conda-forge -n py361 python=3.6.1 && \
echo "python ==3.6.1" >> /opt/conda/envs/py361/conda-meta/pinned && \
conda update conda -y && \
conda activate py361 && \
# Install the versions of numpy and pandas required for further software installs.
pip install numpy==1.12.1 && \
pip install pandas==0.20.1 && \
# Install BWA 0.7.12
conda install -y --solver=libmamba -c bioconda bwa=0.7.12 && \
# Install depedencies for the following installations.
apt-get update && apt-get install -y gcc make zlib1g-dev libbz2-dev liblzma-dev libcurl4-openssl-dev && \
# Install Sambamba 0.6.6
conda install -y -c bioconda sambamba=0.6.6 && \
sambamba --version && \
# Install BEDTools 2.26.0
conda install -y -c bioconda bedtools=2.26.0 && \
bedtools --version && \
# Install Pandoc 2.7
conda install -y -c conda-forge pandoc=2.7 && \
pandoc --version && \
# Install deepTools 2.5.0.1
pip install deepTools==2.5.0.1 && \
deeptools --version && \
pip cache purge && \
conda deactivate && \
conda clean -y --all && \
apt-get remove -y gcc make zlib1g-dev libbz2-dev liblzma-dev libcurl4-openssl-dev && \
apt-get clean
RUN eval "$(conda shell.bash hook)" && \
# Install MultiQC v.1.9 & SAMtools 1.6 in a separate conda environment - unsatisfiable in py361.
conda create -y --solver=libmamba -c defaults -c conda-forge -c bioconda -n extra python=3.7.6 multiqc=1.9 samtools=1.6 && \
ln -s /opt/conda/envs/extra/bin/multiqc /usr/bin/multiqc && \
ln -s /opt/conda/envs/extra/bin/samtools /usr/bin/samtools && \
samtools --version && \
multiqc --version && \
conda deactivate && \
conda clean -y --all
# Create a Python 2.7 environment.
RUN eval "$(conda shell.bash hook)" && \
conda create -y -n py27 -c conda-forge python=2.7.12 pip=9.0.1 && \
conda activate py27 && \
apt-get update && apt-get install -y gcc make zlib1g-dev libbz2-dev liblzma-dev libcurl4-openssl-dev && \
# Install Trim Galore 0.4.1.
conda install -y --solver=libmamba -c bioconda trim-galore=0.4.1 && \
trim_galore --version && \
# Fix the version of cutadapt for trim galore.
conda install -y --solver=libmamba -c bioconda cutadapt=1.9.1 && \
cutadapt --version && \
# Install MACS2 2.1.0.20151222
pip install numpy && \
pip install MACS2==2.1.0.20151222 && \
macs2 --version && \
# Install phantompeakqualtools 1.2
conda install -y --solver=libmamba -c conda-forge gcc && \
conda install -y --solver=libmamba -c bioconda phantompeakqualtools=1.2 && \
# Install MEME 4.11.1
conda install -y --solver=libmamba -c bioconda meme=4.11.1 && \
meme -version && \
conda deactivate && \
conda clean -y --all && \
apt-get remove -y gcc make zlib1g-dev && \
apt-get remove -y libbz2-dev liblzma-dev libcurl4-openssl-dev && \
apt-get clean
RUN eval "$(conda shell.bash hook)" && \
conda activate py27 && \
# Install R 3.4.1 & r-spp 1.14.
conda install -y --solver=libmamba -c conda-forge libiconv && \
conda install -y --solver=libmamba -c conda-forge r=3.4.1 && \
conda install -y --solver=libmamba -c bioconda r-spp=1.14 && \
conda deactivate && \
conda clean -y --all && \
# Setup the symlinks for the software in the py27 environment so that when
# the Python 3.6.1 environment is active, users can still use commands
# that are dependent upon Python 2.7.
ln -s /opt/conda/envs/py27/bin/trim_galore /usr/bin/trim_galore && \
ln -s /opt/conda/envs/py27/bin/cutadapt /usr/bin/cutadapt && \
ln -s /opt/conda/envs/py27/bin/R /usr/bin/R && \
ln -s /opt/conda/envs/py27/bin/Rscript /usr/bin/Rscript && \
ln -s /opt/conda/envs/py27/bin/run_spp.R /usr/bin/run_spp.R && \
ln -s /opt/conda/envs/py27/bin/macs2 /usr/bin/macs2 && \
ln -s /opt/conda/envs/py27/bin/meme /usr/bin/meme && \
ln -s /opt/conda/envs/py27/bin/meme-chip /usr/bin/meme-chip
# Install UCSC_userApps/v317
RUN apt-get install -y gcc-9 g++-9 make libncurses-dev zlib1g-dev libbz2-dev liblzma-dev libcap-dev libssl-dev libpng-dev libmariadb-dev-compat libcurl4-openssl-dev && \
ln -fs /usr/bin/gcc-9 /usr/bin/gcc && \
wget http://hgdownload.cse.ucsc.edu/admin/exe/userApps.archive/userApps.v317.src.tgz && \
tar -xzf userApps.v317.src.tgz && \
rm userApps.v317.src.tgz && \
cd userApps && \
make clean && \
make && \
# In entrypoint.sh, an export command is used to add the userApps binaries to the PATH environment variable.
apt-get remove -y gcc-9 g++-9 make libncurses-dev zlib1g-dev libbz2-dev liblzma-dev libpcap-dev libssl-dev libpng-dev libmariadb-dev-compat libcurl4-openssl-dev && \
apt-get clean
# Copy in the entrypoint script to use for activating the Python 3.6.1 conda environment by default when launching a container.
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/chipseq/entrypoint.sh"]
\ No newline at end of file
#!/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 py361
# Add the userApps binaries to the PATH.
export PATH=$PATH:/chipseq/userApps/bin/
# Enable strict mode:
set -euo pipefail
# exec some commands:
exec "$@"
FROM continuumio/miniconda3:24.3.0-0
LABEL IMAGE="chipseq-analysis-motifSearch" \
IMAGE_VERSION="1.0.0" \
AUTHORS="Felix Perez,Peng Lian" \
EMAIL="biohpc-help@utsouthwestern.edu"
WORKDIR /motif-search/
# Environment variables for the campus proxy.
ENV http_proxy="http://proxy.swmed.edu:3128" \
https_proxy="http://proxy.swmed.edu:3128"
# Original module load order:
# module load python/3.6.1-2-anaconda
# module load meme/4.11.1-gcc-openmpi
# module load bedtools/2.26.0
COPY entrypoint.sh .
RUN eval "$(conda shell.bash hook)" && \
conda create -y -c bioconda -c conda-forge -c defaults -n motifSearch python=2.7.12 pip=9.0.1 && \
echo "python ==2.7.12" >> /opt/conda/envs/motifSearch/conda-meta/pinned && \
conda activate motifSearch && \
# Install pandas and numpy.
pip install numpy==1.12.1 && \
pip install pandas==0.20.1 && \
# Install MEME 4.11.1
conda install -y --solver=libmamba -c conda-forge -c bioconda meme=4.11.1 && \
meme -version && \
# Install BEDTools 2.26.0
conda install -y --solver=libmamba -c bioconda bedtools=2.26.0 && \
bedtools --version && \
# The stringi installation below solves a dependency issue encountered when DREME is used (meme-4.11.1)
conda install -y --solver=libmamba -c conda-forge r-stringi=1.2.4 && \
conda deactivate
RUN eval "$(conda shell.bash hook)" && \
# Create a Python 3.6.1 conda environment and initialize its use.
conda create -y -c bioconda -c defaults -c conda-forge -n py361 python=3.6.1 && \
echo "python ==3.6.1" >> /opt/conda/envs/py361/conda-meta/pinned && \
conda update conda -y && \
conda activate py361 && \
# Install the versions of numpy and pandas required for further software installs.
pip install numpy==1.12.1 && \
pip install pandas==0.20.1 && \
conda deactivate && \
ln -s /opt/conda/envs/py361/bin/python3 /opt/conda/envs/motifSearch/bin/python3
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/motif-search/entrypoint.sh"]
#!/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 "$@"
#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"]
#!/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 "$@"
File added
#!/usr/bin/python3
import sys
import json
import subprocess
import threading
'''
This script is a wrapper of the podman command on RHEL 7. It helps podman 1.6.4 to push a correct manifest file the
remote registry.
Author: Peng Lian
Date: 10/24/2023
'''
PODMAN_BIN = subprocess.check_output(['which', 'podman']).decode().strip()
def execute_command(command, *args):
'''
Execute command and print the real time output to stdout
'''
# Function to process and print output in real time
def process_output(pipe):
for line in pipe:
print(line.decode(), end="")
cmd = [command, *args]
with subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as process:
stdout_thread = threading.Thread(target=process_output, args=(process.stdout,))
stderr_thread = threading.Thread(target=process_output, args=(process.stderr,))
stdout_thread.start()
stderr_thread.start()
# Wait for the process to complete
process.wait()
# Ensure that both threads finish
stdout_thread.join()
stderr_thread.join()
return process.returncode
def fix_manifest(registry, tag):
'''
'.gzip' is missing in the 'mediaType' of 'layers' in the manifest file generated by podman 1.6.4.
This function scans the 'mediaType' and add the '.gzip' suffix.
'''
print(f'Fixing manifest for {registry}:{tag} ...')
# get graph root
output = subprocess.check_output([PODMAN_BIN, 'info', '-f', 'json'])
info = json.loads(output.decode())
graphRoot = info['store']['GraphRoot']
# get image ID
output = subprocess.check_output([PODMAN_BIN, 'inspect', f'{registry}:{tag}'])
imageID = eval(output.decode().replace('true', 'True').replace('false', 'False'))[0]['Id']
# read manifest
imageManifestFile = f'{graphRoot}/overlay-images/{imageID}/manifest'
manifest = json.loads(open(imageManifestFile).readlines()[0])
# update the layers mediaType with .gzip
changed = False
for l in manifest['layers']:
if l['mediaType'].endswith('tar'):
l['mediaType'] = f"{l['mediaType']}.gzip"
changed = True
# write the fixed manifest to file
if changed:
with open(imageManifestFile, 'w') as f:
f.write(json.dumps(manifest).replace(' ', '') + '\n')
f.close()
print('Manifest updated.')
return json.dumps(manifest)
if __name__ == "__main__":
# only engage when 'push' command is called
if len(sys.argv) >= 2 and sys.argv[1] == 'push':
print(f"Executing push: {' '.join(sys.argv[1:])}")
# get registry and tag from the last argv
last_argv = sys.argv[-1]
if last_argv.find(':') > 0:
Tag = last_argv.strip().split(':')[-1]
Registry = ':'.join(last_argv.strip().split(':')[:-1])
# fix manifest
fix_manifest(registry=Registry, tag=Tag)
execute_command(PODMAN_BIN, *sys.argv[1:])
else:
execute_command(PODMAN_BIN, *sys.argv[1:])
FROM continuumio/miniconda3:24.3.0-0
LABEL IMAGE="Python/3.6.1" \
IMAGE_VERSION="0.0.1" \
AUTHORS="Felix Perez,Peng Lian" \
EMAIL="biohpc-help@utsouthwestern.edu"
WORKDIR /python361/
# Environment variables for the campus proxy.
ENV http_proxy="http://proxy.swmed.edu:3128" \
https_proxy="http://proxy.swmed.edu:3128"
# Copy in files to use for activating our Python 3.6.1 conda environment by default when launching a container.
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh && \
conda create -y -c bioconda -c defaults -c conda-forge -n py361 python=3.6.1 && \
echo "python ==3.6.1" >> /opt/conda/envs/py361/conda-meta/pinned && \
# Enable the use of bash-specific conda commands in the layer.
eval "$(conda shell.bash hook)" && \
conda update conda -y && \
conda activate py361 && \
# Install pandas and numpy
pip install numpy==1.12.1 && \
pip install pandas==0.20.1 && \
conda clean -y --all && \
pip cache purge && \
conda deactivate
#ENV BASH_ENV="/python361/entrypoint.sh"
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/python361/entrypoint.sh"]
CMD ["/opt/conda/envs/py361/bin/python"]
FROM ubuntu:18.04
LABEL IMAGE="Python/3.6.1" \
IMAGE_VERSION="0.0.1" \
AUTHORS="Felix Perez,Peng Lian" \
EMAIL="biohpc-help@utsouthwestern.edu"
WORKDIR /python361/
# Environment variables for the campus proxy.
ENV http_proxy="http://proxy.swmed.edu:3128" \
https_proxy="http://proxy.swmed.edu:3128"
RUN apt-get update
RUN apt-get install -y build-essential
# This will install Python, pip, pip3, and pip3.6.
RUN apt-get install -y python3.6-venv
RUN apt-get install -y python3-pip
# Inorder to run pip3.6, run it the following way `python3.6 -m pip`
# Update Python & Install wheel
RUN python3.6 -m pip install pip --upgrade
RUN python3.6 -m pip install wheel
RUN python3.6 -m pip install numpy==1.12.1
RUN python3.6 -m pip install pandas==0.20.1
#!/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 py361
# Enable strict mode:
set -euo pipefail
# exec the final command:
exec "$@"
FROM continuumio/miniconda3:24.3.0-0
LABEL IMAGE="R-3.3.2" \
IMAGE_VERSION="1.0.0" \
AUTHORS="Felix Perez,Peng Lian" \
EMAIL="biohpc-help@utsouthwestern.edu"
WORKDIR /r-332/
# Environment variables for the campus proxy.
ENV http_proxy="http://proxy.swmed.edu:3128" \
https_proxy="http://proxy.swmed.edu:3128"
RUN conda create -y -c bioconda -c defaults -c conda-forge -n r332 r-base=3.3.2 && \
echo "r-base ==3.3.2" >> /opt/conda/envs/r332/conda-meta/pinned && \
# Enable the use of bash-specific conda commands in the layer.
eval "$(conda shell.bash hook)" && \
conda update conda -y && \
conda activate r332 && \
# Install ChIPseeker, GenomicFeatures, and DiffBind from Bioconductor
conda install -y --solver=libmamba -c bioconda bioconductor-chipseeker=1.10.0 && \
conda install -y --solver=libmamba -c bioconda bioconductor-genomicfeatures=1.26.4 && \
conda install -y --solver=libmamba -c bioconda bioconductor-diffbind=2.2.12 && \
# The below install solves a dependency issue with libicui18n.so
conda install -y --solver=libmamba -c conda-forge r-stringi && \
R -e "as.data.frame(installed.packages()[,c(1,3:4)])" && \
conda clean -y --all && \
conda deactivate
# Copy in the entrypoint.sh script used to activate the R 3.3.2 conda environment by default when launching a container.
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/r-332/entrypoint.sh"]
CMD ["/opt/conda/envs/r-332/bin/R"]
options(repos = c(CRAN = 'https://cloud.r-project.org'), download.file.method = 'libcurl')
options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')
options(Ncpus = 6)
#!/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 r332
# Enable strict mode:
set -euo pipefail
# exec the final command:
exec "$@"
File mode changed from 100644 to 100755