-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBacDock
249 lines (192 loc) · 7.43 KB
/
BacDock
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
FROM ubuntu:xenial
RUN apt-get update --fix-missing -qq && apt-get install -y -q \
aufs-tools \
automake \
build-essential \
bowtie2 \
cmake \
curl \
g++ \
openjdk-8-jre \
openjdk-8-jdk \
locales \
libncurses5-dev \
libncursesw5-dev \
libcurl4-openssl-dev \
libbz2-dev \
libx11-dev \
pkg-config \
zlib1g-dev \
bzip2 \
r-base \
default-jre \
git-core \
bc \
python3 \
python3-pip \
python-pip \
unzip \
wget \
xutils-dev \
&& apt-get clean \
&& apt-get purge
RUN pip install --upgrade pip
RUN pip install numpy
RUN pip install scipy
RUN pip install biopython
RUN pip install git+https://github.com/katholt/srst2
RUN pip install RSeQC
RUN pip install multiqc
RUN pip install venn
RUN pip install pandas
# install Picard Tools
RUN curl -fksSL https://github.com/broadinstitute/picard/releases/download/2.9.0/picard.jar > /usr/local/bin/picard.jar && \
chmod +x /usr/local/bin/picard.jar
# install VCFtools
RUN curl -fksSL https://github.com/vcftools/vcftools/releases/download/v0.1.14/vcftools-0.1.14.tar.gz | tar xz && \
cd vcftools-0.1.14 && \
./configure; make; make insta
# install STAR
RUN curl -fksSL https://github.com/alexdobin/STAR/archive/2.5.2b.tar.gz | tar xz && \
cp STAR-2.5.2b/bin/Linux_x86_64/* /usr/local/bin
# Install freebayes
#RUN git clone --recursive https://github.com/ekg/freebayes
#RUN cd freebayes && make; make install
# install bwe-mem
RUN git clone https://github.com/lh3/bwa.git && cd bwa; make; cp bwa /usr/local/bin
# Install BCFTools
#RUN git clone git://github.com/samtools/htslib.git; cd htslib && make && make install
#RUN git clone git://github.com/samtools/bcftools.git; cd bcftools; autoheader && autoconf && ./configure --enable-libgsl --enable-perl-filters; make
# Install SnpEff
#RUN curl -L http://sourceforge.net/projects/snpeff/files/snpEff_latest_core.zip > snpEff_latest_core.zip && unzip snpEff_latest_core.zip
# Install convbioseq
RUN easy_install biopython
RUN easy_install bioscripts.convert
# Install RAxML
RUN git clone https://github.com/stamatak/standard-RAxML.git && cd standard-RAxML* && \
make -f Makefile.AVX.gcc && \
rm *.o && \
make -f Makefile.AVX.PTHREADS.gcc
# RUN pip install VCF-kit
# RUN vk setup
## Install R packages for ggplot2
RUN R -e 'install.packages( c("reshape2","optparse", "BiocManager"), repos="http://cloud.r-project.org/");' && \
apt-get update && apt-get install r-cran-ggplot2 -y -q
RUN R -e 'BiocManager::install("dupRadar");'
# Install SRA toolkit
#RUN wget "https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.9.2/sratoolkit.2.9.2-ubuntu64.tar.gz" && \
# tar -xzf sratoolkit.2.9.2-ubuntu64.tar.gz
#ENV PATH "$PATH:/sratoolkit.2.9.2-ubuntu64/bin/:/vcf2fasta/"
# Install trimmomatic
RUN curl -L http://www.usadellab.org/cms/uploads/supplementary/Trimmomatic/Trimmomatic-0.38.zip > Trimmomatic-0.38.zip && unzip Trimmomatic-0.38.zip
################################################################################################
# Install Jellyfish
RUN cd /opt && \
wget https://github.com/gmarcais/Jellyfish/releases/download/v2.2.6/jellyfish-2.2.6.tar.gz && \
tar -xvf jellyfish-2.2.6.tar.gz && \
cd jellyfish-2.2.6 && \
./configure && \
make -j 4 && \
ln -s /opt/jellyfish-2.2.6/bin/jellyfish /usr/bin && \
cd / && \
rm /opt/jellyfish-2.2.6.tar.gz
# Install kSNP3 and dependencies
RUN cd /opt && \
apt-get install -y tcsh && \
rm -rf /var/lib/apt/lists/* && \
cd /opt && \
git clone https://github.com/cdeanj/kSNP3.git && \
mv kSNP3 /usr/local && \
cd /
# Install ResistomeAnalyzer
RUN cd /opt && \
git clone https://github.com/cdeanj/resistomeanalyzer.git && \
cd resistomeanalyzer && \
make && \
ln -s /opt/resistomeanalyzer/resistome /usr/bin && \
cd /
# Install CoverageSampler
RUN cd /opt && \
git clone https://github.com/cdeanj/coverage_sampler.git && \
cd coverage_sampler && \
make && \
ln -s /opt/coverage_sampler/csa /usr/bin && \
cd /
# CD-HIT
RUN git clone https://github.com/weizhongli/cdhit.git && \
cd cdhit &&\
make MAX_SEQ=10000000 && \
cd
# FastQC
ENV DST=/tmp
ENV URL=https://github.com/agordon/libgtextutils/releases/download/0.7/
RUN wget $URL/libgtextutils-0.7.tar.gz -O $DST/libgtextutils-0.7.tar.gz && \
tar -xvf $DST/libgtextutils-0.7.tar.gz -C $DST && \
rm $DST/libgtextutils-0.7.tar.gz && \
cd $DST/libgtextutils-0.7 && \
./configure && \
make && \
make install && \
cd / && \
rm -rf $DST/libgtextutils-0.7
WORKDIR /
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH /opt/conda/bin:$PATH
RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \
libglib2.0-0 libxext6 libsm6 libxrender1 \
git mercurial subversion
RUN wget --quiet https://repo.anaconda.com/archive/Anaconda3-5.3.0-Linux-x86_64.sh -O ~/anaconda.sh && \
/bin/bash ~/anaconda.sh -b -p /opt/conda && \
rm ~/anaconda.sh && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc
RUN apt-get install -y curl grep sed dpkg && \
TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'` && \
curl -L "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" > tini.deb && \
dpkg -i tini.deb && \
rm tini.deb && \
apt-get clean
RUN conda install -c bioconda fastqc
RUN conda install -c bioconda picard=2.18.27
RUN conda install -c bioconda conda-forge::r-data.table=1.12.0
RUN conda install -c bioconda conda-forge::r-gplots=3.0.1.1
RUN conda install -c bioconda conda-forge::r-markdown=0.9
RUN conda install -c bioconda csvtk=0.17.0
RUN conda install -c conda-forge gsl
RUN conda install -c bioconda snpeff
RUN conda install -c bioconda trim-galore
RUN conda install -c bioconda cutadapt
RUN conda install -c bioconda fastx_toolkit
RUN conda install -c bioconda gffread=0.9.12
RUN conda install -c bioconda deeptools=3.2.0
RUN conda install -c bioconda sra-tools
RUN conda install -c bioconda bioconductor-dupradar=1.12.1
RUN conda install -c bioconda samtools
# Alignment
RUN conda install -c bioconda clustalo
RUN conda install -c bioconda muscle
RUN conda install -c bioconda mafft
# Phylogenetics
RUN conda install -c bioconda freebayes
RUN conda install -c bioconda beast
RUN conda install -c bioconda phyml
# Clustering
RUN curl -O -L https://sourceforge.net/projects/samtools/files/samtools/0.1.18/samtools-0.1.18.tar.bz2 && tar xvfj samtools-0.1.18.tar.bz2 && cd samtools-0.1.18 && make
# Visualisation
RUN conda install -c bioconda circos
# Install Figtree
RUN cd /opt && \
git clone https://github.com/cdeanj/figtree.git && \
chmod u+x figtree/lib/figtree.jar && \
cd ~
# Install vcf2fasta
RUN git clone https://github.com/jambler24/vcf2fasta.git && cd vcf2fasta && chmod a+x process_samples.py && chmod a+x vcf2fasta.py
RUN ln -s /vcf2fasta/vcf2fasta.py /usr/local/bin/vcf2fasta.py
RUN ln -s /vcf2fasta/process_samples.py /usr/local/bin/process_samples.py
# Build this image
#docker build -t bacterial_genomics -f BacDock .
# To build sing image
#docker run -v /var/run/docker.sock:/var/run/docker.sock -v /Volumes/External/bac_genomics:/output --privileged -t --rm singularityware/docker2singularity:v2.6 -m "/shared_fs /custom_mountpoint2" bacterial_genomics:latest
# To SCP
# scp /Volumes/External/bac_genomics/<image> [email protected]:/cbio/users/jambler/images/