-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathDockerfile
More file actions
128 lines (98 loc) · 3.06 KB
/
Dockerfile
File metadata and controls
128 lines (98 loc) · 3.06 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
ARG CLAIR3_VER="1.1.0"
FROM mambaorg/micromamba:2.0.8-ubuntu22.04 AS builder
ARG CLAIR3_VER
USER root
WORKDIR /
RUN apt-get update && apt-get install -y \
wget \
bzip2 \
make \
g++ \
libboost-graph-dev
RUN micromamba install --name base -c conda-forge -c bioconda \
python=3.9.0 \
pypy3.6 \
tensorflow-cpu=2.8.0 \
pytables \
pigz \
cffi=1.14.4 \
parallel=20191122 \
zstd \
samtools=1.15.1 \
whatshap=1.7 \
xz \
zlib \
bzip2 \
automake \
curl &&\
micromamba clean -a -y
ENV PATH="$PATH:/opt/conda/bin/"
ARG MAMBA_DOCKERFILE_ACTIVATE=1
RUN pypy3 -m ensurepip && \
pypy3 -m pip install mpmath==1.2.1 &&\
pip install tensorflow-addons
RUN wget -q https://github.com/HKU-BAL/Clair3/archive/refs/tags/v${CLAIR3_VER}.tar.gz &&\
tar -xvf v${CLAIR3_VER}.tar.gz &&\
cd Clair3-${CLAIR3_VER}/preprocess/realign/ &&\
g++ -std=c++14 -O1 -shared -fPIC -o realigner ssw_cpp.cpp ssw.c realigner.cpp && \
g++ -std=c++11 -shared -fPIC -o debruijn_graph -O3 debruijn_graph.cpp &&\
cd ../.. &&\
make &&\
mkdir /clair3 &&\
cp -rv clair3 preprocess postprocess scripts shared /clair3 &&\
cp clair3.py run_clair3.sh /clair3 &&\
cp longphase libclair3* /clair3 &&\
cp LICENSE.md /clair3
RUN mkdir /clair3/models &&\
wget -q http://www.bio8.cs.hku.hk/clair3/clair3_models/clair3_models.tar.gz &&\
tar --no-same-owner -C /clair3/models -xvf clair3_models.tar.gz
## App ##
FROM mambaorg/micromamba:2.0.8-ubuntu22.04 AS app
ARG CLAIR3_VER
USER root
WORKDIR /
LABEL base.image="mambaorg/micromamba:2.0.8-ubuntu22.04"
LABEL dockerfile.version="1"
LABEL software="CLAIR3"
LABEL software.version="${CLAIR3_VER}"
LABEL description="Clair3 is a germline small variant caller for long-reads."
LABEL website="https://github.com/HKU-BAL/Clair3"
LABEL license="https://github.com/HKU-BAL/Clair3/blob/main/LICENSE.md"
LABEL maintainer="Kutluhan Incekara"
LABEL maintainer.email="kutluhan.incekara@ct.gov"
RUN apt-get update && apt-get install --no-install-recommends -y\
procps && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*
RUN micromamba install --name base -c conda-forge -c bioconda \
python=3.9.0 \
numpy=1.24.3 \
pypy3.6 \
tensorflow-cpu=2.8.0 \
pytables \
pigz \
cffi=1.14.4 \
parallel=20191122 \
zstd \
samtools=1.15.1 \
whatshap=1.7 &&\
micromamba clean -a -y &&\
rm -rf /opt/conda/pkgs/
ENV PATH="/opt/conda/bin/:/clair3:${PATH}" \
LC_ALL=C.UTF-8
RUN pypy3 -m ensurepip &&\
pypy3 -m pip install --no-cache mpmath==1.2.1 &&\
pip install --no-cache tensorflow-addons
COPY --from=builder /clair3 /clair3
CMD run_clair3.sh
WORKDIR /data
## Test ##
FROM app AS test
RUN run_clair3.sh
RUN apt-get update && apt-get install -y wget
RUN wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/build-files/clair3/1.0.9/ont_quick_test.sh && \
chmod +x ont_quick_test.sh &&\
./ont_quick_test.sh
# list models
RUN ls /clair3/models
# list tools installed with micromamba
RUN micromamba list