-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
61 lines (55 loc) · 2.31 KB
/
Copy pathDockerfile
File metadata and controls
61 lines (55 loc) · 2.31 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
ARG VERSION=0.3.2-morphic
FROM debian:bookworm-slim as chromap_builder
#put builder tools in
RUN apt-get update && apt-get install -y \
build-essential \
curl \
zlib1g-dev \
git \
autoconf \
automake \
libtool \
libcurl4-openssl-dev \
libssl-dev \
libbz2-dev \
liblzma-dev \
libdeflate-dev \
&& rm -rf /var/lib/apt/lists/*
RUN git clone --recursive https://github.com/morphic-bio/chromap.git /chromap
WORKDIR /chromap
RUN git fetch origin && git checkout 537e5fd && git submodule update --init --recursive
# Build htslib first (required dependency)
WORKDIR /chromap/third_party/htslib
# Generate missing version.h for htscodecs before building
RUN if [ -d htscodecs/htscodecs ] && [ ! -f htscodecs/htscodecs/version.h ]; then \
ver="unknown"; \
if git -C htscodecs describe --match 'v[0-9].[0-9]*' --dirty >/dev/null 2>&1; then \
ver=$(git -C htscodecs describe --match 'v[0-9].[0-9]*' --dirty); \
ver=${ver#v}; \
fi; \
echo "#define HTSCODECS_VERSION_TEXT \"${ver}\"" > htscodecs/htscodecs/version.h; \
fi
# Configure and build htslib (disable optional features we don't need)
RUN autoreconf -i && \
./configure --disable-bz2 --disable-lzma --disable-libdeflate --without-libcurl && \
make clean && make -j 4
# Build chromap
WORKDIR /chromap
RUN make clean && make -j 8
#Python3 will be the base image and we will install macs2 and macs3 bedtools and samtools
FROM python:3.9-slim
RUN apt-get update && apt-get install -y zlib1g-dev bedtools samtools tabix curl \
&& rm -rf /var/lib/apt/lists/*
RUN curl -L -o /usr/local/bin/bedGraphToBigWig https://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/bedGraphToBigWig \
&& chmod +x /usr/local/bin/bedGraphToBigWig
RUN pip install numpy pyBigWig pyfaidx pandas termcolor modisco-lite modisco==0.5.16.4
RUN apt-get update && apt-get install -y gcc && \
pip install macs2 && pip install macs3 && \
apt-get remove -y gcc && rm -rf /var/lib/apt/lists/*
#install gawk
RUN apt-get update && apt-get install -y gawk && \
rm -rf /var/lib/apt/lists/*
#copy the chromap binary and htslib libraries from the chromap_builder image
COPY --from=chromap_builder /chromap*/chromap /usr/local/bin/chromap
COPY --from=chromap_builder /chromap/third_party/htslib/libhts.so* /usr/local/lib/
RUN ldconfig