-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
104 lines (83 loc) · 3.5 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
FROM fred2/optitype:latest
#unfortunately the most up-to-date version is only tagged latest, no release tag; however, it hasn't been updated in a year
MAINTAINER John Garza <[email protected]>
LABEL \
description="Image containing optitype and other helper tools for the optitype HLA-typing immuno subworkflow"
#switch from inherited user to root for necessary installation permissions
USER root
#needed for samtools
RUN apt-get update -y && apt-get install -y libncurses5-dev
#htslib, samtools, sambamba, bwa install below all pulled from docker-cle dockerfile
##############
#HTSlib 1.3.2#
##############
ENV HTSLIB_INSTALL_DIR=/opt/htslib
WORKDIR /tmp
RUN wget https://github.com/samtools/htslib/releases/download/1.3.2/htslib-1.3.2.tar.bz2 && \
tar --bzip2 -xvf htslib-1.3.2.tar.bz2
WORKDIR /tmp/htslib-1.3.2
RUN ./configure --enable-plugins --prefix=$HTSLIB_INSTALL_DIR && \
make && \
make install && \
cp $HTSLIB_INSTALL_DIR/lib/libhts.so* /usr/lib/
################
#Samtools 1.3.1#
################
ENV SAMTOOLS_INSTALL_DIR=/opt/samtools
WORKDIR /tmp
RUN wget https://github.com/samtools/samtools/releases/download/1.3.1/samtools-1.3.1.tar.bz2 && \
tar --bzip2 -xf samtools-1.3.1.tar.bz2
WORKDIR /tmp/samtools-1.3.1
RUN ./configure --with-htslib=$HTSLIB_INSTALL_DIR --prefix=$SAMTOOLS_INSTALL_DIR && \
make && \
make install
WORKDIR /
RUN rm -rf /tmp/samtools-1.3.1
#################
#Sambamba v0.6.4#
#################
RUN mkdir /opt/sambamba/ \
&& wget https://github.com/lomereiter/sambamba/releases/download/v0.6.4/sambamba_v0.6.4_linux.tar.bz2 \
&& tar --extract --bzip2 --directory=/opt/sambamba --file=sambamba_v0.6.4_linux.tar.bz2 \
&& ln -s /opt/sambamba/sambamba_v0.6.4 /usr/bin/sambamba
############
#BWA 0.7.15#
############
ENV BWA_VERSION 0.7.15
RUN cd /tmp/ \
&& wget -q http://downloads.sourceforge.net/project/bio-bwa/bwa-${BWA_VERSION}.tar.bz2 && tar xvf bwa-${BWA_VERSION}.tar.bz2 \
&& cd /tmp/bwa-${BWA_VERSION} \
&& sed -i 's/CFLAGS=\\t\\t-g -Wall -Wno-unused-function -O2/CFLAGS=-g -Wall -Wno-unused-function -O2 -static/' Makefile \
&& make \
&& cp /tmp/bwa-${BWA_VERSION}/bwa /usr/local/bin \
&& rm -rf /tmp/bwa-${BWA_VERSION}
#################
#bedtools 2.28.0#
#################
WORKDIR /usr/bin/
RUN wget https://github.com/arq5x/bedtools2/releases/download/v2.28.0/bedtools
RUN chmod +x bedtools
COPY optitype_script.sh /usr/bin/optitype_script.sh
COPY optitype_script_wdl.sh /usr/bin/optitype_script_wdl.sh
###############
#Picard 2.18.1#
###############
ADD https://github.com/broadinstitute/picard/releases/download/2.18.1/picard.jar ./
RUN mkdir /opt/picard-2.18.1
RUN chmod -R ugo+r /opt/picard-2.18.1
RUN mv picard.jar /opt/picard-2.18.1
RUN chmod -R ugo+r /opt/picard-2.18.1/picard.jar
RUN ln -s /opt/picard-2.18.1 /opt/picard
RUN ln -s /opt/picard-2.18.1 /usr/picard
#include the optitype hla reference and pre-calculated bwa index outputs
RUN mkdir -p /ref_data/optitype_ref
RUN mkdir -p /ref_data/ebi_ref
COPY hla_reference_dna.fasta /ref_data/optitype_ref/hla_reference_dna.fasta
COPY hla_reference_dna.fasta.amb /ref_data/optitype_ref/hla_reference_dna.fasta.amb
COPY hla_reference_dna.fasta.ann /ref_data/optitype_ref/hla_reference_dna.fasta.ann
COPY hla_reference_dna.fasta.bwt /ref_data/optitype_ref/hla_reference_dna.fasta.bwt
COPY hla_reference_dna.fasta.pac /ref_data/optitype_ref/hla_reference_dna.fasta.pac
COPY hla_reference_dna.fasta.sa /ref_data/optitype_ref/hla_reference_dna.fasta.sa
#clear inherited entrypoint
ENTRYPOINT []
CMD []