-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
executable file
·199 lines (167 loc) · 5.67 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
FROM ubuntu:18.04
LABEL This Dockerfile is for HAMRLNC. It is maintained by Harry Li <[email protected]> & Chosen Obih <[email protected]>
ENV DEBIAN_FRONTEND=noninteractive
USER root
RUN apt-get update && apt-get install -y g++ \
build-essential \
make \
git \
libcurl4 \
libcurl4-openssl-dev \
libssl-dev \
libncurses5-dev \
libsodium-dev \
libmariadb-client-lgpl-dev \
libbz2-dev \
liblzma-dev \
libssl-dev \
zlib1g-dev \
libcurl4-openssl-dev \
openssl \
default-jdk \
lbzip2 \
unzip \
bzip2 \
tzdata \
perl \
wget \
bcftools \
curl
RUN ldconfig
RUN apt-get install -y locales && locale-gen en_US.UTF-8
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
# Install system dependencies for R and R packages
RUN apt-get update && apt-get install -y \
software-properties-common \
dirmngr \
gnupg \
libxml2-dev \
libfontconfig1-dev \
libharfbuzz-dev \
libfribidi-dev \
libfreetype6-dev \
libpng-dev \
libtiff5-dev \
libjpeg-dev \
libpq-dev
# Manually add the GPG key for the CRAN repository
RUN apt-key adv --fetch-keys https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc
RUN add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'
# Install R
RUN apt-get update && apt-get install -y r-base
# Install BiocManager in R
RUN R -e "options(repos = list(CRAN = 'http://cran.rstudio.com')); install.packages('BiocManager')"
# Install Biostrings package using BiocManager and log the output
RUN R -e "BiocManager::install('Biostrings', ask=FALSE)" \
&& R -e "packageVersion('Biostrings')"
# Install additional R packages
RUN R -e "install.packages(c('dplyr', 'RPostgreSQL', 'httr', 'openssl', 'splitstackshape', 'getopt'))"
# Downlaod and install conda
RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \
wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py39_23.11.0-2-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh
ENV PATH /opt/conda/bin:$PATH
# Conda channels
RUN conda config --add channels conda-forge && \
conda config --add channels bioconda && \
conda config --add channels r
# Conda packages
RUN conda install cutadapt==4.9 -c bioconda -y && \
conda install bedops==2.4.41 -c bioconda -y && \
conda install bedtools==2.31.1 -c bioconda -y && \
conda install trim-galore==0.6.10 -c bioconda -y && \
conda install bedtools==2.31.0 -c bioconda -y && \
conda install star==2.7.10a -c bioconda -y && \
conda install gffread==0.12.7 -y && \
conda install gffcompare==0.12.6 -c bioconda -y && \
conda install subread==2.0.1 -c bioconda -y && \
conda install stringtie==2.1.5 -c bioconda -y && \
conda install bioawk==1.0 -c bioconda -y && \
conda install python -y && \
conda install numpy==1.21.5 -y && \
conda install pandas==1.3.5 -y && \
conda install pysam==0.22.1 -y && \
conda install last==1454-0 -c bioconda -y && \
conda install diamond==0.9.10 -c bioconda -y && \
conda install transdecoder==5.5.0 -c bioconda -y && \
conda install matplotlib-base -c conda-forge -y && \
conda install seqkit==2.8.2 -c bioconda -y
#Install biopython
RUN pip3 install biopython
# Required files
WORKDIR /
ENV BINPATH /usr/bin
# cpan
RUN curl -L http://cpanmin.us | perl - App::cpanminus
RUN cpanm URI/Escape.pm
# rFAM database
RUN apt-get install infernal
RUN mkdir Rfam && cd Rfam
RUN wget http://ftp.ebi.ac.uk/pub/databases/Rfam/14.10/Rfam.cm.gz && \
gunzip Rfam.cm.gz && \
wget http://ftp.ebi.ac.uk/pub/databases/Rfam/14.10/Rfam.clanin && \
cmpress Rfam.cm && \
cd ..
RUN R -e "install.packages('tidyr')"
# CPC2
RUN wget https://github.com/gao-lab/CPC2_standalone/archive/refs/tags/v1.0.1.tar.gz && \
gzip -dc v1.0.1.tar.gz | tar xf - && \
cd CPC2_standalone-1.0.1 && \
cd libs/libsvm && \
gzip -dc libsvm-3.18.tar.gz | tar xf - && \
cd libsvm-3.18 && \
make clean && make
WORKDIR /
## HAMR (python 3 compatible)
RUN git clone https://github.com/harrlol/HAMR.git
RUN chmod +x /HAMR/hamr.py
RUN cp /HAMR/hamr.py $BINPATH
# GATK (4.3.0.0)
RUN wget https://github.com/broadinstitute/gatk/releases/download/4.3.0.0/gatk-4.3.0.0.zip && \
unzip gatk-4.3.0.0.zip && rm gatk-4.3.0.0.zip
ENV PATH="/gatk-4.3.0.0:${PATH}"
# request
RUN apt-get update
RUN apt-get install -y libgdal-dev
RUN apt-get install python3-venv -y
RUN pip3 install requests
# jq
RUN apt-get install -y jq
# panther
RUN git clone https://github.com/pantherdb/pantherapi-pyclient.git && \
cd pantherapi-pyclient && \
python3 -m venv env && \
. env/bin/activate && \
pip3 install -r requirements.txt
WORKDIR /
RUN wget --output-document sratoolkit.tar.gz https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/3.1.1/sratoolkit.3.1.1-ubuntu64.tar.gz && \
tar -vxzf sratoolkit.tar.gz
RUN apt-get install bc -y
#HTSLIB
RUN wget https://github.com/samtools/htslib/releases/download/1.17/htslib-1.17.tar.bz2 && \
tar -xvjf htslib-1.17.tar.bz2 && \
cd htslib-1.17 && \
./configure --prefix=/usr/bin && \
make && \
make install
WORKDIR /
# additional R packages
RUN R -e "install.packages(c('reshape2', 'janitor', 'ggplot2', 'readr', 'pheatmap'))"
ADD /scripts/*.py /scripts/
ADD /scripts/*.R /scripts/
RUN chmod +x /scripts/*.R && cp -r /scripts/ $BINPATH
ENV scripts /scripts
ADD util /util/
RUN chmod +x /util/*.pl && cp -r /util/ $BINPATH
ENV util /util
# Setting paths to all the softwares
ENV PATH /evolinc_docker/cufflinks-2.2.1.Linux_x86_64/:$PATH
ENV PATH /usr/bin/:$PATH
ENV PATH /HAMR/hamr.py:$PATH
ENV PATH /HAMR/:$PATH
ENV PATH /sratoolkit.3.1.1-ubuntu64/bin:$PATH
# HAMRLNC wrapper script
ADD HAMRLNC.sh $BINPATH
RUN chmod +x $BINPATH/HAMRLNC.sh
ENTRYPOINT ["HAMRLNC.sh"]