-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
141 lines (119 loc) · 4.73 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
#modified from robsyme/nf-repeatmasking-onbuild
FROM ubuntu:14.04
RUN apt-get update && apt-get install -qqy \
wget \
hmmer \
unzip \
build-essential
# Install TRF (for RepeatScout)
WORKDIR /usr/local/bin
RUN wget http://tandem.bu.edu/trf/downloads/trf407b.linux64 && mv trf*.linux64 trf && chmod +x trf
# Basic workdir
WORKDIR /usr/local
# Install nseg (for RepeatScout)
RUN mkdir nseg && \
cd nseg && \
wget ftp://ftp.ncbi.nih.gov/pub/seg/nseg/* && \
make && \
mv nseg ../bin && \
mv nmerge ../bin
# Install RepeatScout
RUN wget http://bix.ucsd.edu/repeatscout/RepeatScout-1.0.5.tar.gz && \
tar -xvf RepeatScout* && \
rm RepeatScout*.tar.gz && \
mv RepeatScout* RepeatScout && \
cd RepeatScout && \
make
# Install RMBlast
RUN wget ftp://ftp.ncbi.nlm.nih.gov/blast/executables/rmblast/2.2.28/ncbi-rmblastn-2.2.28-x64-linux.tar.gz && \
tar -xzvf ncbi-rmblastn* && \
rm ncbi-rmblastn*.tar.gz && \
mv ncbi-rmblastn*/bin/rmblastn bin && \
rm -rf ncbi-rmblastn
# Install Blast+
RUN wget 'ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.6.0/ncbi-blast-2.6.0+-x64-linux.tar.gz' && \
tar -xzvf ncbi-blast* && \
find ncbi-blast* -type f -executable -exec mv {} bin \; && \
rm -rf ncbi-blast*
# Install RepeatMasker
RUN wget http://www.repeatmasker.org/RepeatMasker-open-4-0-6.tar.gz \
&& tar -xzvf RepeatMasker-open*.tar.gz \
&& rm -f RepeatMasker-open*.tar.gz \
&& perl -0p -e 's/\/usr\/local\/hmmer/\/usr\/bin/g;' \
-e 's/\/usr\/local\/rmblast/\/usr\/local\/bin/g;' \
-e 's/DEFAULT_SEARCH_ENGINE = "crossmatch"/DEFAULT_SEARCH_ENGINE = "ncbi"/g;' \
-e 's/TRF_PRGM = ""/TRF_PRGM = "\/usr\/local\/bin\/trf"/g;' RepeatMasker/RepeatMaskerConfig.tmpl > RepeatMasker/RepeatMaskerConfig.pm
# Fix RepeatMasker's strange shebang lines
RUN cd /usr/local/RepeatMasker \
&& perl -i -0pe 's/^#\!.*perl.*/#\!\/usr\/bin\/env perl/g' \
RepeatMasker \
DateRepeats \
ProcessRepeats \
RepeatProteinMask \
DupMasker \
util/queryRepeatDatabase.pl \
util/queryTaxonomyDatabase.pl \
util/rmOutToGFF3.pl \
util/rmToUCSCTables.pl
# Install RIPcal
RUN wget http://downloads.sourceforge.net/project/ripcal/RIPCAL/RIPCAL_2.0/ripcal2_install.zip \
&& unzip ripcal*.zip \
&& rm ripcal*.zip \
&& mv ripcal* ripcal \
&& cd ripcal \
&& chmod +x perl/*
# Install RECON
RUN wget http://www.repeatmasker.org/RepeatModeler/RECON-1.08.tar.gz \
&& tar -xvf RECON* \
&& rm RECON*.tar.gz \
&& mv RECON* recon \
&& cd recon/src \
&& make \
&& make install \
&& perl -i -0pe 's/\$path = "";/\$path = "\/usr\/local\/RECON-1.08\/bin";/g' ../scripts/\recon.pl
# Install RepeatModeler deps
RUN apt-get install -qqy libjson-perl liburi-perl liblwp-useragent-determined-perl
# Install RepeatModeler
RUN wget http://www.repeatmasker.org/RepeatModeler/RepeatModeler-open-1.0.10.tar.gz \
&& tar -xvf RepeatModeler-*.tar.gz \
&& rm RepeatModeler-*.tar.gz \
&& mv RepeatModeler-*/ RepeatModeler \
&& cd RepeatModeler \
&& perl -i -0pe 's/^#\!.*/#\!\/usr\/bin\/env perl/g' \
configure \
BuildDatabase \
Refiner \
RepeatClassifier \
RepeatModeler \
TRFMask \
util/dfamConsensusTool.pl \
util/renameIds.pl \
util/viewMSA.pl \
&& cat RepModelConfig.pm.tmpl \
| perl -p -e 's/\$RMBLAST_DIR +=.*;$/\$RMBLAST_DIR = "\/usr\/local\/bin";/g' \
| perl -p -e 's/\$RECON_DIR +=.*;$/\$RECON_DIR = "\/usr\/local\/recon\/bin";/g' \
| perl -p -e 's/\$RSCOUT_DIR +=.*;$/\$RSCOUT_DIR = "\/usr\/local\/RepeatScout";/g' \
> RepModelConfig.pm
# Install mDUST (MITE-Hunter prereq)
RUN wget ftp://occams.dfci.harvard.edu/pub/bio/tgi/software/seqclean/mdust.tar.gz \
&& tar -xvf mdust.tar.gz \
&& rm mdust.tar.gz \
&& cd mdust \
&& make
# Install Muscle and blast2 (MITE-Hunter prereqs)
RUN apt-get install -qqy muscle blast2
# Install Genometools
RUN apt-get install -qqy genometools bioperl
# Install Aragon
RUN apt-get install -qqy aragorn
# I can't bundle the girinst RepBase libraries with the docker image,
# so you'll need to get them yourself. Download them from
# http://www.girinst.org/server/RepBase/protected/repeatmaskerlibraries/RepBaseRepeatMaskerEdition-20170127.tar.gz
# Install bioruby
RUN apt-get install -qqy ruby ruby-bio
ONBUILD WORKDIR /usr/local/RepeatMasker
ONBUILD ADD repeatmaskerlibraries.tar.gz /usr/local/RepeatMasker
ONBUILD RUN cd /usr/local/RepeatMasker && util/buildRMLibFromEMBL.pl Libraries/RMRBSeqs.embl > Libraries/RepeatMasker.lib \
&& makeblastdb -dbtype nucl -in Libraries/RepeatMasker.lib > /dev/null 2>&1 \
&& makeblastdb -dbtype prot -in Libraries/RepeatPeps.lib > /dev/null 2>&1
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/RepeatMasker:/usr/local/RepeatScout:/usr/local/recon/bin:/usr/local/RepeatModeler:/usr/local/mdust:/usr/local/mitehunter