Skip to content

Commit

Permalink
Added Docker image script. Added docker support to pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewels committed May 11, 2017
1 parent 1004a8e commit c6757ba
Show file tree
Hide file tree
Showing 6 changed files with 186 additions and 17 deletions.
106 changes: 106 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
FROM openjdk:8

LABEL authors="[email protected],[email protected]" \
description="Docker image containing all requirements for NGI-MethylSeq pipeline"

# Install container-wide requrements gcc, pip, zlib, libssl, make, libncurses, fortran77, g++, R
RUN apt-get update && \
apt-get install -y --no-install-recommends \
g++ \
gcc \
gfortran \
libbz2-dev \
libcurl4-openssl-dev \
libgsl0-dev \
liblzma-dev \
libncurses5-dev \
libpcre3-dev \
libreadline-dev \
libssl-dev \
make \
python-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*

# Install pip
RUN curl -fsSL https://bootstrap.pypa.io/get-pip.py -o /opt/get-pip.py && \
python /opt/get-pip.py && \
rm /opt/get-pip.py

RUN curl -fsSL http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.5.zip -o /opt/fastqc_v0.11.5.zip && \
unzip /opt/fastqc_v0.11.5.zip -d /opt/ && \
chmod 755 /opt/FastQC/fastqc && \
ln -s /opt/FastQC/fastqc /usr/local/bin/fastqc && \
rm /opt/fastqc_v0.11.5.zip

# Install cutadapt
RUN pip install cutadapt

# Install TrimGalore
RUN mkdir /opt/TrimGalore && \
curl -fsSL http://www.bioinformatics.babraham.ac.uk/projects/trim_galore/trim_galore_v0.4.2.zip -o /opt/TrimGalore/trim_galore_v0.4.2.zip && \
unzip /opt/TrimGalore/trim_galore_v0.4.2.zip -d /opt/TrimGalore && \
ln -s /opt/TrimGalore/trim_galore /usr/local/bin/trim_galore && \
rm /opt/TrimGalore/trim_galore_v0.4.2.zip

# Install SAMTools
RUN curl -fsSL https://github.com/samtools/samtools/releases/download/1.3.1/samtools-1.3.1.tar.bz2 -o /opt/samtools-1.3.1.tar.bz2 && \
tar xvjf /opt/samtools-1.3.1.tar.bz2 -C /opt/ && \
cd /opt/samtools-1.3.1 && \
make && \
make install && \
rm /opt/samtools-1.3.1.tar.bz2

# Install PicardTools
RUN curl -fsSL https://github.com/broadinstitute/picard/releases/download/2.0.1/picard-tools-2.0.1.zip -o /opt/picard-tools-2.0.1.zip && \
unzip /opt/picard-tools-2.0.1.zip -d /opt/ && \
rm /opt/picard-tools-2.0.1.zip
ENV PICARD_HOME /opt/picard-tools-2.0.1

# Install Bismark
RUN mkdir /opt/Bismark && \
curl -fsSL https://github.com/FelixKrueger/Bismark/archive/0.17.0.zip -o /opt/Bismark/bismark.zip && \
unzip /opt/Bismark/bismark.zip -d /opt/Bismark && \
ln -s /opt/Bismark/Bismark-0.17.0/bam2nuc /usr/local/bin/bam2nuc && \
ln -s /opt/Bismark/Bismark-0.17.0/bismark /usr/local/bin/bismark && \
ln -s /opt/Bismark/Bismark-0.17.0/bismark2bedGraph /usr/local/bin/bismark2bedGraph && \
ln -s /opt/Bismark/Bismark-0.17.0/bismark2report /usr/local/bin/bismark2report && \
ln -s /opt/Bismark/Bismark-0.17.0/bismark2summary /usr/local/bin/bismark2summary && \
ln -s /opt/Bismark/Bismark-0.17.0/bismark_genome_preparation /usr/local/bin/bismark_genome_preparation && \
ln -s /opt/Bismark/Bismark-0.17.0/bismark_methylation_extractor /usr/local/bin/bismark_methylation_extractor && \
ln -s /opt/Bismark/Bismark-0.17.0/coverage2cytosine /usr/local/bin/coverage2cytosine && \
ln -s /opt/Bismark/Bismark-0.17.0/deduplicate_bismark /usr/local/bin/deduplicate_bismark && \
ln -s /opt/Bismark/Bismark-0.17.0/filter_non_conversion /usr/local/bin/filter_non_conversion && \
rm /opt/Bismark/bismark.zip

# Install Qualimap
RUN mkdir /opt/Qualimap && \
curl -fsSL https://bitbucket.org/kokonech/qualimap/downloads/qualimap_v2.2.1.zip -o /opt/Qualimap/qualimap.zip && \
unzip /opt/Qualimap/qualimap.zip -d /opt/Qualimap && \
ln -s /opt/Qualimap/qualimap_v2.2.1/qualimap /usr/local/bin/qualimap && \
rm /opt/Qualimap/qualimap.zip

# Install BWA
RUN mkdir /opt/bwa && \
curl -fsSL https://downloads.sourceforge.net/project/bio-bwa/bwa-0.7.15.tar.bz2 -o /opt/bwa/bwa.tar.bz2 && \
tar xvjf /opt/bwa/bwa.tar.bz2 -C /opt/bwa/ && \
cd /opt/bwa/bwa-0.7.15/ && \
make && \
ln -s /opt/bwa/bwa-0.7.15/bwa /usr/local/bin/bwa && \
rm /opt/bwa/bwa.tar.bz2

# Install bwa-meth
RUN pip install toolshed && \
pip install git+git://github.com/brentp/bwa-meth.git

# Install MethylDackel
RUN mkdir /opt/MethylDackel && \
curl -fsSL https://github.com/dpryan79/MethylDackel/archive/0.2.1.zip -o /opt/MethylDackel/MethylDackel.zip && \
unzip /opt/MethylDackel/MethylDackel.zip -d /opt/MethylDackel && \
cd /opt/MethylDackel/MethylDackel-0.2.1 && \
make && \
make install prefix=/usr/local/bin && \
rm /opt/MethylDackel/MethylDackel.zip

# Install MultiQC
RUN pip install git+git://github.com/ewels/MultiQC.git
23 changes: 23 additions & 0 deletions conf/docker.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
vim: syntax=groovy
-*- mode: groovy;-*-
* -------------------------------------------------
* Nextflow config file for use with Docker
* -------------------------------------------------
* Defines basic usage limits and docker image id.
* Imported under the default 'docker' Nextflow
* profile in nextflow.config
* NOTE: Not suitable for production use, assumes
* compute limits of only 16GB memory and 1 CPU core.
*/

docker {
enabled = true
}

process {
container = 'scilifelab/ngi-methylseq'
cpus = 1
memory = 16.GB
time = 48.h
}
30 changes: 30 additions & 0 deletions conf/testing.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
vim: syntax=groovy
-*- mode: groovy;-*-
* --------------------------------------------------------
* Nextflow config file for automated testing with Travis
* --------------------------------------------------------
*/

params {
// Need to specify this here (as well as main.nf) so that timeline and trace work below.
outdir = './results'
}

docker {
enabled = true
}
process {
container = 'scilifelab/ngi-methylseq'
cpus = 2
memory = 7.GB
time = 48.h
}
timeline {
enabled = true
file = "${params.outdir}/NGI-MethylSeq_timeline.html"
}
trace {
enabled = true
file = "${params.outdir}/NGI-MethylSeq_trace.txt"
}
18 changes: 11 additions & 7 deletions conf/uppmax-devel.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
/* -------------------------------------------------
* Example Nextflow config file for UPPMAX (milou)
/*
vim: syntax=groovy
-*- mode: groovy;-*-
* -------------------------------------------------
* Defines reference genomes, using iGenome paths
* Should be saved either with Nextflow installation or
* as file ~/.nextflow/config
* Nextflow config file for UPPMAX (milou / irma)
* -------------------------------------------------
* Differs from main UPPMAX config in that it submits
* jobs to the `devcore` queue, which has much faster
* queue times. All jobs are limited to 1 hour to be eligible
* for this queue.
*/


Expand Down Expand Up @@ -93,8 +97,8 @@ process {
cpus = { 4 * task.attempt }
memory = { 32.GB * task.attempt }
}
$pileOMeth {
module = ['bioinfo-tools', 'PileOMeth']
$methyldackel {
module = ['bioinfo-tools', 'MethylDackel']
cpus = { 6 * task.attempt }
memory = { 48.GB * task.attempt }
}
Expand Down
15 changes: 9 additions & 6 deletions conf/uppmax.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
/* -------------------------------------------------
* Example Nextflow config file for UPPMAX (milou)
/*
vim: syntax=groovy
-*- mode: groovy;-*-
* -------------------------------------------------
* Nextflow config file for UPPMAX (milou / irma)
* -------------------------------------------------
* Defines reference genomes, using iGenome paths
* Should be saved either with Nextflow installation or
* as file ~/.nextflow/config
* Imported under the default 'standard' Nextflow
* profile in nextflow.config
*/


Expand Down Expand Up @@ -99,8 +102,8 @@ process {
cpus = { 4 * task.attempt }
memory = { 32.GB * task.attempt }
}
$pileOMeth {
module = ['bioinfo-tools', 'PileOMeth']
$methyldackel {
module = ['bioinfo-tools', 'MethylDackel']
cpus = { 6 * task.attempt }
memory = { 48.GB * task.attempt }
}
Expand Down
11 changes: 7 additions & 4 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ profiles {
devel {
includeConfig 'conf/uppmax-devel.config'
}

// UNDER DEVELOPMENT (not yet written)
docker {
process.container = 'your/image'
docker.enabled = true
includeConfig 'conf/docker.config'
}
testing {
includeConfig 'conf/testing.config'
}
none {
// Don't load any config (for use with custom home configs)
}

}
Expand Down

0 comments on commit c6757ba

Please sign in to comment.