forked from StaPH-B/docker-builds
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
107 lines (88 loc) · 3.13 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
105
106
ARG QUAST_VER="5.3.0"
## Builder ##
FROM ubuntu:focal as builder
ARG QUAST_VER
# define timezone to avoid build stalls
ENV TZ=America/New_York
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get install --no-install-recommends -y \
wget \
python2 \
perl \
cpanminus \
g++ \
make \
openjdk-8-jre-headless \
r-base \
pkg-config \
libfreetype6-dev \
libpng-dev \
libboost-all-dev \
locales &&\
locale-gen en_US.UTF-8 &&\
cpanm Time::HiRes &&\
apt-get autoclean &&\
rm -rf /var/lib/apt/lists/*
# python dependencies
RUN update-alternatives --install /usr/bin/python python /usr/bin/python2 1 &&\
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py && python get-pip.py &&\
pip install --no-cache matplotlib simplejson joblib
# install quast
RUN wget https://github.com/ablab/quast/releases/download/quast_${QUAST_VER}/quast-${QUAST_VER}.tar.gz && \
tar -xzf quast-${QUAST_VER}.tar.gz && \
rm -rf quast-${QUAST_VER}.tar.gz && \
cd /quast-${QUAST_VER} && \
./setup.py install
# add GRIDSS for SV detection
ADD https://github.com/ablab/quast/raw/master/external_tools/gridss/gridss-1.4.1.jar /quast-${QUAST_VER}/quast_libs/gridss/
## App ##
FROM ubuntu:jammy as app
ARG QUAST_VER
LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="QUAST"
LABEL software.version=${QUAST_VER}
LABEL description="Genome assembly evaluation tool"
LABEL website="https://github.com/ablab/quast"
LABEL license="https://github.com/ablab/quast/blob/master/LICENSE.txt"
LABEL maintainer="Curtis Kapsak"
LABEL maintainer.email="[email protected]"
LABEL maintainer2="Kutluhan Incekara"
LABEL maintainer2.email="[email protected]"
# define timezone to avoid build stalls
ENV TZ=America/New_York
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# install only necessary programs and libraries to run quast
RUN apt-get update && apt-get install --no-install-recommends -y \
wget \
python3 \
python3-matplotlib \
perl \
openjdk-8-jre-headless \
r-base \
libidn12 \
locales &&\
locale-gen en_US.UTF-8 &&\
apt-get autoclean &&\
rm -rf /var/lib/apt/lists/* &&\
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 &&\
ln -s /usr/lib/x86_64-linux-gnu/libidn.so.12 /usr/lib/x86_64-linux-gnu/libidn.so.11
# copy quast and compiled tools
COPY --from=builder /quast-${QUAST_VER} /quast-${QUAST_VER}
ENV LC_ALL=C \
PATH=$PATH:/quast-${QUAST_VER}
CMD quast.py --help && quast-lg.py --help && metaquast.py --help
WORKDIR /data
## Test ##
FROM app as test
# test quast
RUN quast.py --test-sv && mv ./quast_test_output/ ./quast_test_sv_output/
# test quast-lg
RUN quast-lg.py --test && mv ./quast_test_output/ ./quast_test_lg_output/
# test metaquast
RUN metaquast.py --test-no-ref
# check logs
RUN tail -n5 ./quast_test_sv_output/quast.log &&\
tail -n5 ./quast_test_lg_output/quast.log &&\
tail -n5 ./quast_test_output/metaquast.log
# Note: libidn is required for makeblastdb. libidn.so.11 symlink is a temporary patch for this version.