forked from pangenome/pggb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
182 lines (157 loc) · 6.69 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
FROM debian:bullseye-slim AS binary
LABEL authors="Erik Garrison, Simon Heumos, Andrea Guarracino"
LABEL description="Preliminary docker image containing all requirements for pggb pipeline"
LABEL base_image="debian:bullseye-slim"
LABEL software="pggb"
LABEL about.home="https://github.com/pangenome/pggb"
LABEL about.license="SPDX:MIT"
# dependencies
RUN apt-get update \
&& apt-get install -y \
git \
bash \
cmake \
make \
g++-11 \
python3-dev \
pybind11-dev \
libbz2-dev \
bc \
libatomic-ops-dev \
autoconf \
libgsl-dev \
zlib1g-dev \
libzstd-dev \
libjemalloc-dev \
libhts-dev \
build-essential \
pkg-config \
time \
curl \
pigz \
tabix \
bcftools \
samtools \
wget \
pip \
libcairo2-dev \
unzip \
parallel \
&& apt-get clean \
&& apt-get purge \
&& rm -rf /var/lib/apt/lists/*
RUN git clone --recursive https://github.com/waveygang/wfmash \
&& cd wfmash \
&& git pull \
&& git checkout 00fed868164fdbf81a80e4f6d229299dcf170267 \
&& git submodule update --init --recursive \
&& sed -i 's/-march=native/-march=sandybridge/g' src/common/wflign/deps/WFA2-lib/Makefile \
&& cmake -H. -DCMAKE_BUILD_TYPE=Generic -DEXTRA_FLAGS='-march=sandybridge -Ofast' -Bbuild && cmake --build build -- -j $(nproc) \
&& cp build/bin/wfmash /usr/local/bin/wfmash \
&& cd ../ \
&& rm -rf wfmash
RUN git clone --recursive https://github.com/ekg/seqwish \
&& cd seqwish \
&& git pull \
&& git checkout f44b402f0c2e02988d431d9b2e5eba9727cf93a9 \
&& git submodule update --init --recursive \
&& cmake -H. -DCMAKE_BUILD_TYPE=Generic -DEXTRA_FLAGS='-march=sandybridge -Ofast' -Bbuild && cmake --build build -- -j $(nproc) \
&& cp bin/seqwish /usr/local/bin/seqwish \
&& cd ../ \
&& rm -rf seqwish
RUN git clone --recursive https://github.com/pangenome/smoothxg \
&& cd smoothxg \
&& git pull \
&& git checkout 4ff4cf2487afca5629c55ec38c977106ff08001b \
&& git submodule update --init --recursive \
&& sed -i 's/-msse4.1/-march=sandybridge -Ofast/g' deps/spoa/CMakeLists.txt \
&& sed -i 's/-march=native/-march=sandybridge -Ofast/g' deps/spoa/CMakeLists.txt \
&& sed -i 's/-march=native/-march=sandybridge -Ofast/g' deps/abPOA/CMakeLists.txt \
&& cmake -H. -DCMAKE_BUILD_TYPE=Generic -DEXTRA_FLAGS='-march=sandybridge -Ofast' -Bbuild && cmake --build build -- -j $(nproc) \
&& cp bin/smoothxg /usr/local/bin/smoothxg \
&& cp deps/odgi/bin/odgi /usr/local/bin/odgi \
&& cd ../ \
&& rm -rf odgi
# Rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN cargo --help
RUN git clone https://github.com/marschall-lab/GFAffix.git \
&& cd GFAffix \
&& git pull \
&& git checkout 3784c7ee03ee82df576474d2e119fdd88616914b \
&& cargo install --force --path . \
&& mv /root/.cargo/bin/gfaffix /usr/local/bin/gfaffix \
&& cd ../ \
&& rm -rf GFAffix
RUN pip install multiqc==1.14
RUN wget https://github.com/vgteam/vg/releases/download/v1.40.0/vg && chmod +x vg && mv vg /usr/local/bin/vg
RUN git clone https://github.com/pangenome/vcfbub \
&& cd vcfbub \
&& git pull \
&& git checkout 26a1f0cb216a423f8547c4ad0e0ce38cb9d324b9 \
&& cargo install --force --path . \
&& mv /root/.cargo/bin/vcfbub /usr/local/bin/vcfbub \
&& cd ../ \
&& rm -rf vcfbub
RUN git clone --recursive https://github.com/vcflib/vcflib.git \
&& cd vcflib \
&& git checkout 7c1a31a430d339adcb9a0c2fd3fd02d3b30e3549 \
&& mkdir -p build \
&& cd build \
&& cmake -DZIG=OFF -DCMAKE_BUILD_TYPE=Debug .. && cmake --build . -- -j $(nproc) \
&& mv vcfwave /usr/local/bin/vcfwave \
&& mv vcfuniq /usr/local/bin/vcfuniq \
&& cd ../ \
&& rm -rf vcflib
# Community detection dependencies
RUN pip install igraph==0.10.4
RUN pip install pycairo==1.23.0
# Additional tools
RUN git clone https://github.com/ekg/fastix.git \
&& cd fastix \
&& git pull \
&& git checkout 331c1159ea16625ee79d1a82522e800c99206834 \
&& cargo install --force --path . && \
mv /root/.cargo/bin/fastix /usr/local/bin/fastix \
&& cd ../ \
&& rm -rf fastix
RUN git clone https://github.com/ekg/pafplot.git \
&& cd pafplot \
&& git pull \
&& git checkout 7dda24c0aeba8556b600d53d748ae3103ec85501 \
&& cargo install --force --path . \
&& mv /root/.cargo/bin/pafplot /usr/local/bin/ \
&& cd ../ \
&& rm -rf pafplot
COPY pggb /usr/local/bin/pggb
RUN chmod 777 /usr/local/bin/pggb
COPY partition-before-pggb /usr/local/bin/partition-before-pggb
RUN chmod a+rx /usr/local/bin/partition-before-pggb
# MUMMER adjustments
RUN wget https://github.com/mummer4/mummer/releases/download/v4.0.0rc1/mummer-4.0.0rc1.tar.gz \
&& tar -xf mummer-4.0.0rc1.tar.gz && cd mummer-4.0.0rc1 && ./configure && make && make install && cd ../
RUN ldconfig
RUN wget https://github.com/RealTimeGenomics/rtg-tools/releases/download/3.12.1/rtg-tools-3.12.1-linux-x64.zip \
&& unzip rtg-tools-3.12.1-linux-x64.zip && sed -i 's/read -r -p "Would you like to enable automatic usage logging (y\/n)? " REPLY/REPLY="n"/g' /rtg-tools-3.12.1/rtg \
&& ln -s /rtg-tools-3.12.1/rtg /usr/local/bin/ && rtg help
# Install base R
# NOTE: we might have to go the conda way on the long run
# https://www.reddit.com/r/Rlanguage/comments/oi31xn/installing_r41_on_debian_bullseye_testing/
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key B8F25A8A73EACF41 \
&& echo "deb http://cloud.r-project.org/bin/linux/debian bullseye-cran40/" > /etc/apt/sources.list.d/r-packages.list \
&& apt update \
&& apt install -y r-base \
&& apt-get clean \
&& apt-get purge \
&& rm -rf /var/lib/apt/lists/* \
&& wget https://cran.r-project.org/src/contrib/data.table_1.14.8.tar.gz \
&& R CMD INSTALL data.table_1.14.8.tar.gz
RUN wget https://github.com/arq5x/bedtools2/releases/download/v2.31.0/bedtools.static \
&& mv bedtools.static /usr/local/bin/bedtools \
&& chmod +x /usr/local/bin/bedtools
# copy required scripts
COPY scripts/* /usr/local/bin/
# Hacky-way to easily get versioning info
COPY .git /usr/local/bin/
SHELL ["/bin/bash", "-c"]