-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpeppro.Dockerfile
282 lines (251 loc) · 9.28 KB
/
peppro.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# Pull base image
FROM phusion/baseimage:master
# Who maintains this image
LABEL maintainer Jason Smith "jasonsmith@virginia.edu"
# Version info
LABEL version 0.10.0
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
# Install dependencies
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes \
curl \
cmake \
default-jre \
default-jdk \
git \
gsl-bin \
libbz2-dev \
libgsl-dbg \
libgsl-dev \
libcommons-math3-java \
libcurl4-gnutls-dev \
libjbzip2-java \
libpng-dev \
liblua5.1-0-dev \
libisal-dev \
libdeflate-dev \
libssl-dev \
libtbb2 \
libtbb-dev \
libbam-dev \
libssl-dev \
libtbb2 \
libtbb-dev \
lua-filesystem-dev \
lua-lpeg-dev \
lua-md5-dev \
libexpat1-dev \
libtre-dev \
libcairo2-dev \
libpango1.0-dev \
libsqlite3-dev \
libxml2-dev \
openssl \
pigz=2.4-1 \
python3.8 \
python3-pip \
python3-dev \
software-properties-common \
build-essential \
rustc \
wget \
zlib1g \
zlib1g-dev
# Install MySQL server
RUN DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes mysql-server \
mysql-client \
libmysqlclient-dev
# Install python tools
RUN python3.8 -m pip install -U pip
RUN pip install attmap>=0.12.9 && \
pip install cython>=0.29 && \
pip install cykhash && \
pip install jinja2>=2.11.2 && \
pip install jsonschema>=3.0.1 && \
pip install logmuse>=0.2.5 && \
pip install numpy>=1.17 && \
pip install https://github.com/pepkit/looper/zipball/master && \
pip install pararead && \
pip install pandas>=0.20.2 && \
pip install peppy>=0.31.0 && \
pip install piper>=0.12.1 && \
pip install psutil>=5.6.3 && \
pip install pysam>=0.13 && \
pip install pyyaml>=3.13 && \
pip install refgenconf>=0.7.0 && \
pip install refgenie>=0.9.3 && \
pip install ubiquerg>=0.6.1 && \
pip install yacman>=0.6.7 && \
pip install cutadapt
# Install R
RUN apt update -qq && \
DEBIAN_FRONTEND=noninteractive apt --assume-yes install --no-install-recommends dirmngr
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 && \
add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
RUN DEBIAN_FRONTEND=noninteractive apt-get --assume-yes install r-base r-base-dev r-base-core r-recommended && \
echo "r <- getOption('repos'); r['CRAN'] <- 'http://cran.us.r-project.org'; options(repos = r);" > ~/.Rprofile
RUN Rscript -e "install.packages('argparser')" && \
Rscript -e "install.packages('optigrab')" && \
Rscript -e "install.packages('data.table')" && \
Rscript -e "install.packages('xml2')" && \
Rscript -e "install.packages('roxygen2')" && \
Rscript -e "install.packages('rversions')" && \
Rscript -e "install.packages('callr')" && \
Rscript -e "install.packages('pkgbuild')" && \
Rscript -e "install.packages('rcmdcheck')" && \
Rscript -e "install.packages('testthat')" && \
Rscript -e "install.packages('devtools')"
RUN Rscript -e "devtools::install_github('pepkit/pepr')" && \
Rscript -e "install.packages('data.table')" && \
Rscript -e "install.packages('BiocManager')" && \
Rscript -e "BiocManager::install('GenomicRanges')" && \
Rscript -e "BiocManager::install('BSgenome')" && \
Rscript -e "BiocManager::install('GenomicFeatures')" && \
Rscript -e "BiocManager::install('ensembldb')" && \
Rscript -e "BiocManager::install('ExperimentHub')" && \
Rscript -e "devtools::install_github('databio/GenomicDistributions')" && \
Rscript -e "install.packages('http://big.databio.org/GenomicDistributionsData/GenomicDistributionsData_0.0.2.tar.gz', repos=NULL)" &&\
Rscript -e "install.packages('ggrepel')" && \
Rscript -e "install.packages('ggplot2')" && \
Rscript -e "install.packages('gplots')" && \
Rscript -e "install.packages('grid')" && \
Rscript -e "install.packages('gtable')" && \
Rscript -e "install.packages('scales')" && \
Rscript -e "install.packages('stringr')" && \
Rscript -e "devtools::install_github('databio/peppro/PEPPROr/', ref = 'master')"
# Install htslib
WORKDIR /home/src/
RUN wget https://github.com/samtools/htslib/releases/download/1.12/htslib-1.12.tar.bz2 && \
tar xf htslib-1.12.tar.bz2 && \
cd /home/src/htslib-1.12 && \
./configure --prefix /home/src/ && \
make && \
make install
# Install samtools
WORKDIR /home/src/
RUN wget https://github.com/samtools/samtools/releases/download/1.12/samtools-1.12.tar.bz2 && \
tar xf samtools-1.12.tar.bz2 && \
cd /home/src/samtools-1.12 && \
./configure && \
make && \
make install && \
ln -s /home/src/samtools-1.12/samtools /usr/bin/
# Install bedtools
RUN DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes \
ant \
bedtools>=2.29.2
# Install bowtie2
WORKDIR /home/src/
RUN wget -O bowtie2-2.4.2-source.zip 'https://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.4.2/bowtie2-2.4.2-source.zip?ts=gAAAAABgfxZxKMUjBU0A0XjfO55q36KUoO9RRemjzTT_WCDpSSZCy8NtKrFODKV4xS_135KTiIdnBSaqmvHuQw9l6nqM2EULvw%3D%3D&r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fbowtie-bio%2Ffiles%2Fbowtie2%2F2.4.2%2Fbowtie2-2.4.2-source.zip%2Fdownload' && \
unzip bowtie2-2.4.2-source.zip && \
cd /home/src/bowtie2-2.4.2 && \
make && \
make install && \
ln -s /home/src/bowtie2-2.4.2/bowtie2 /usr/bin/
# Install seqkit
WORKDIR /home/src/
RUN wget https://github.com/shenwei356/seqkit/releases/download/v0.10.1/seqkit_linux_amd64.tar.gz && \
tar -zxvf seqkit_linux_amd64.tar.gz && \
ln -s /home/src/seqkit /usr/bin/
# Install fastp
WORKDIR /home/src/
RUN git clone https://github.com/OpenGene/fastp.git && \
cd fastp && \
make && \
make install && \
ln -s /home/src/fastp/fastp /usr/bin/
# Install seqtk
WORKDIR /home/src/
RUN git clone https://github.com/lh3/seqtk.git && \
cd seqtk && \
make && \
ln -s /home/src/seqtk/seqtk /usr/bin/
# Install preseq
WORKDIR /home/src/
RUN wget https://github.com/smithlabcode/preseq/releases/download/v3.1.2/preseq-3.1.2.tar.gz && \
tar xf preseq-3.1.2.tar.gz && \
cd preseq-3.1.2 && \
mkdir build && cd build && \
../configure --enable-hts \
CPPFLAGS=-I"/home/src/include" \
LDFLAGS="-L/home/src/lib -Wl,-R/home/src/lib" && \
make && \
make install
# Install UCSC tools
WORKDIR /home/tools/
RUN wget http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/wigToBigWig && \
wget http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/bigWigCat && \
chmod +x /home/tools/wigToBigWig && \
chmod +x /home/tools/bigWigCat && \
ln -s /home/tools/wigToBigWig /usr/bin/ && \
ln -s /home/tools/bigWigCat /usr/bin/
# Install FLASH
WORKDIR /home/src/
RUN wget -O FLASH-1.2.11.tar.gz http://ccb.jhu.edu/software/FLASH/FLASH-1.2.11-Linux-x86_64.tar.gz && \
tar xf FLASH-1.2.11.tar.gz && \
ln -s /home/src/FLASH-1.2.11-Linux-x86_64/flash /usr/bin/
# Install fastq_pair
WORKDIR /home/src/
RUN git clone https://github.com/linsalrob/fastq-pair.git && \
cd fastq-pair/ &&\
mkdir build && cd build && \
cmake /home/src/fastq-pair/ && \
make && \
make install
# OPTIONAL REQUIREMENTS
# Install fastqc
WORKDIR /home/tools/
RUN wget https://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.9.zip && \
unzip fastqc_v0.11.9.zip && \
cd /home/tools/FastQC && \
chmod 755 fastqc && \
ln -s /home/tools/FastQC/fastqc /usr/bin/
# Install fqdedup
WORKDIR /home/tools/
RUN git clone https://github.com/guertinlab/fqdedup.git && \
cd fqdedup && \
cargo build --release && \
ln -s /home/tools/fqdedup/target/release/fqdedup /usr/bin/
# Install fastx_toolkit
WORKDIR /home/tools/
RUN git clone https://github.com/agordon/libgtextutils.git && \
cd libgtextutils && \
./reconf && \
./configure && \
make && \
make install && \
cd /home/tools/ && \
git clone https://github.com/agordon/fastx_toolkit && \
cd fastx_toolkit && \
./reconf && \
sed -i 's/-Werror//g' configure.ac && \
./configure && \
make && \
make install
# Install genometools
WORKDIR /home/tools/
RUN wget http://genometools.org/pub/genometools-1.6.1.tar.gz && \
tar xf genometools-1.6.1.tar.gz && \
cd /home/tools/genometools-1.6.1 && \
make useshared=yes && \
make install
# Install seqOutBias
WORKDIR /home/tools/
RUN wget -O seqOutBias-v1.3.0.tar.gz 'https://github.com/guertinlab/seqOutBias/archive/refs/tags/v1.3.0.tar.gz' && \
tar xf seqOutBias-v1.3.0.tar.gz && \
cd seqOutBias-1.3.0 && \
cargo build --release && \
ln -s /home/tools/seqOutBias-1.3.0/target/release/seqOutBias /usr/bin/
# Set environment variables
ENV PATH=/home/tools/bin:/home/tools/:/home/tools/bin/kentUtils/:/home/src/bowtie2-2.4.2:/home/src/skewer:/home/src/samtools-1.12:/home/src/htslib-1.12:$PATH \
R_LIBS_USER=/usr/local/lib/R/site-library/ \
PYTHONPATH=/usr/local/lib/python3.8/dist-packages:$PYTHONPATH
# Set Python3 as python
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
# Define default command
WORKDIR /home/
CMD ["/bin/bash"]
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*