forked from mtokuyama/ERVmap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
82 lines (74 loc) · 2.62 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
FROM ubuntu:20.04 as bioinformatics_base
#===============================#
# Docker Image Configuration #
#===============================#
LABEL org.opencontainers.image.source='https://github.com/eipm/ERVmap' \
vendor="Englander Institute for Precision Medicine" \
description="ERVmap" \
maintainer="[email protected]" \
base_image="ubuntu" \
base_image_version="20.04"
ENV APP_NAME="ERVmap" \
TZ='US/Eastern' \
PROGRAMS="opt"
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update \
&& apt-get upgrade -y --fix-missing \
&& apt-get install build-essential -y \
&& apt-get install -y \
vim \
emacs \
bedtools \
wget \
libncurses5-dev \
libz-dev \
libbz2-dev \
liblzma-dev \
&& rm -rf /var/lib/apt/lists/*
#===========================#
# Install SAMTOOLS & HTSLIB #
#===========================#
ENV SAMTOOLS_VERSION 1.9
ENV HTSLIB_VERSION 1.9
ENV samtools_dir /${PROGRAMS}/samtools-${SAMTOOLS_VERSION}
ENV htslib_dir ${samtools_dir}/htslib-${HTSLIB_VERSION}
RUN wget -O samtools-${SAMTOOLS_VERSION}.tar.bz2 https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2 \
&& tar jxf samtools-${SAMTOOLS_VERSION}.tar.bz2 -C ${PROGRAMS} \
&& rm samtools-${SAMTOOLS_VERSION}.tar.bz2 \
&& cd ${samtools_dir} \
&& make \
&& make install \
&& cd htslib-${HTSLIB_VERSION} \
&& make \
&& make install
#===========================#
# Install STAR #
#===========================#
ENV STAR_VERSION 2.7.6a
ENV star_dir /${PROGRAMS}/STAR-${STAR_VERSION}
RUN wget -O STAR-${STAR_VERSION}.tar.gz https://github.com/alexdobin/STAR/archive/2.7.6a.tar.gz \
&& tar xzf STAR-${STAR_VERSION}.tar.gz -C ${PROGRAMS} \
&& rm STAR-${STAR_VERSION}.tar.gz \
&& cd ${star_dir}/source \
&& make STAR
RUN ln -s ${star_dir}/source/STAR /usr/local/bin/
#===========================#
# Production layer #
#===========================#
FROM bioinformatics_base
COPY --from=bioinformatics_base /usr/local/bin/ /usr/local/bin
COPY --from=bioinformatics_base /usr/bin/coverageBed /usr/bin/coverageBed
COPY --from=bioinformatics_base /usr/bin/bedtools /usr/bin/bedtools
COPY --from=bioinformatics_base ${star_dir}/source/STAR ${star_dir}/source/STAR
#===========================#
# Installing tools #
#===========================#
RUN mkdir -p /scripts /resources /results /STAR_tmp
RUN chmod ugo+wx /results /STAR_tmp
COPY ERVmapping.sh /scripts
COPY templates/ERValign.sh /scripts
COPY templates/ERVcount.sh /scripts
COPY hg38cut_L1_ERV.sorteda.bed /resources/ERVmap.bed
#Set Working Directory
WORKDIR /scripts
ENTRYPOINT [ "/scripts/ERVmapping.sh" ]