forked from chanzuckerberg/czid-dag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
138 lines (115 loc) · 5.66 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
# Set the base image
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
# File Author / Maintainer
MAINTAINER Yun-Fang Juan yunfang@chanzuckerberg.com
# Add packages, update image, and clear cache
RUN apt-get update && apt-get install -y build-essential curl wget python-pip python-dev python-scipy python-redis gdebi-core zip unzip g++ zlib1g-dev gcc pkg-config apt-utils make perl cmake libbz2-dev
RUN pip install --upgrade pip
RUN pip install htseq==0.6.1p1
RUN pip install awscli --upgrade
RUN pip install redis biopython pysam
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:jonathonf/python-3.6
RUN apt-get update && apt-get install -y python3.6
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
WORKDIR /tmp
# install STAR
RUN curl -L https://github.com/alexdobin/STAR/archive/2.5.3a.tar.gz | tar xz
RUN mv STAR-2.5.3a/bin/Linux_x86_64_static/* /usr/local/bin
RUN rm -rf STAR-2.5.3a
# Compile and install bowtie
RUN wget https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.3.2/bowtie2-2.3.2-source.zip
RUN unzip bowtie2-2.3.2-source.zip
WORKDIR /tmp/bowtie2-2.3.2
RUN make -j 16 NO_TBB=1 # we may want tbb (for "superior thread scaling") later, so will need to find a way to compile without "NO_TBB=1"
RUN mv -t /usr/local/bin/ bowtie2 bowtie2-align-l bowtie2-align-s bowtie2-build bowtie2-build-l bowtie2-build-s bowtie2-inspect bowtie2-inspect-l bowtie2-inspect-s
WORKDIR /tmp
# install samtools
RUN apt-get install -y libncurses-dev libbz2-dev
RUN wget https://github.com/samtools/samtools/releases/download/1.5/samtools-1.5.tar.bz2
RUN tar -jxf samtools-1.5.tar.bz2
WORKDIR /tmp/samtools-1.5
RUN ./configure --disable-lzma
RUN make -j 16
RUN mv samtools /usr/local/bin/
WORKDIR /tmp
# Compile and install PriceSeqFilter
RUN wget http://derisilab.ucsf.edu/software/price/PriceSource140408.tar.gz
RUN tar -xzf PriceSource140408.tar.gz
WORKDIR /tmp/PriceSource140408
RUN make -j 16
RUN mv PriceSeqFilter /usr/local/bin/
WORKDIR /tmp
# Compile and install cdhit-dup tools
RUN wget https://github.com/weizhongli/cdhit/archive/V4.6.8.zip
RUN unzip V4.6.8.zip
WORKDIR /tmp/cdhit-4.6.8
RUN make -j 16
WORKDIR /tmp/cdhit-4.6.8/cd-hit-auxtools
RUN make -j 16
RUN mv cd-hit-dup /usr/local/bin/
WORKDIR /tmp
# Compile and install Fastax tools
#RUN wget http://launchpadlibrarian.net/161878011/libgtextutils0_0.7-1_amd64.deb
#RUN wget http://launchpadlibrarian.net/162265652/fastx-toolkit_0.0.14-1_amd64.deb
#RUN gdebi --non-interactive libgtextutils0_0.7-1_amd64.deb
#RUN gdebi --non-interactive fastx-toolkit_0.0.14-1_amd64.deb
# For aegea
RUN apt-get install -y python3-pip
RUN pip3 install awscli-cwlogs==1.4.0 keymaker==0.2.1 boto3==1.4.3 awscli==1.11.44 dynamoq==0.0.5 tractorbeam==0.1.3
RUN pip3 install pysam biopython
#RUN echo iptables-persistent iptables-persistent/autosave_v4 boolean true | debconf-set-selections
RUN apt-get update && apt-get install -y iptables-persistent debian-goodies bridge-utils pixz cryptsetup-bin mdadm btrfs-tools libffi-dev libssl-dev libxml2-dev libxslt1-dev libyaml-dev libcurl4-openssl-dev libjemalloc-dev libzip-dev libsnappy-dev liblz4-dev libgmp-dev libmpfr-dev libhts-dev libsqlite3-dev libncurses5-dev htop pydf jq httpie python-dev python-cffi python-pip python-setuptools python-wheel python-virtualenv python-requests python-yaml python3-dev python3-cffi python3-pip python3-setuptools python3-wheel python3-requests python3-yaml nfs-common unzip build-essential cmake libtool autoconf ruby sysstat dstat numactl gdebi-core sqlite3 stunnel moreutils curl wget git aria2 sift
RUN apt-get install -y bsdtar alien
# For de-novo assembly
WORKDIR /tmp/spades_build
RUN git clone https://github.com/ablab/spades.git
WORKDIR /tmp/spades_build/spades
RUN git checkout spades_3.11.0
WORKDIR /tmp/spades_build/spades/assembler
RUN PREFIX=/usr/local ./spades_compile.sh
RUN /usr/local/bin/spades.py --test
# For nonhost fastq filtering
WORKDIR /tmp/seqtk_build
RUN git clone https://github.com/lh3/seqtk.git
WORKDIR /tmp/seqtk_build/seqtk
RUN make && make install
WORKDIR /tmp
# Compile and install gmap/gsnap
RUN wget http://research-pub.gene.com/gmap/src/gmap-gsnap-2017-11-15.tar.gz
RUN mkdir gmap-gsnap && tar xf gmap-gsnap-2017-11-15.tar.gz -C gmap-gsnap --strip-components 1
WORKDIR /tmp/gmap-gsnap
RUN ./configure --prefix=/usr/local
RUN make -j 16 && make check && make install
RUN rm -rf /tmp/gmap-gsnap /tmp/gmap-gsnap-2017-11-15.tar.gz
RUN gsnapl --version
# For srst2, install forked srst2 python 3 compatible repo
RUN pip install scipy
RUN pip install git+https://github.com/chanzuckerberg/srst2
# TODO: Test both pip installations, consider keeping pip use consistent
RUN pip3 install pandas
# Blast command line
RUN wget -N ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.6.0/ncbi-blast-2.6.0+-1.x86_64.rpm
RUN alien -i ncbi-blast-2.6.0+-1.x86_64.rpm
RUN rm -rf ncbi-blast-2.6.0+-1.x86_64.rpm
# For adapter trimming
RUN apt install python-cutadapt
WORKDIR /tmp
RUN wget http://www.usadellab.org/cms/uploads/supplementary/Trimmomatic/Trimmomatic-0.38.zip
RUN unzip Trimmomatic-0.38.zip
RUN mv Trimmomatic-0.38/trimmomatic-0.38.jar /usr/local/bin/
RUN apt-get update && apt-get install -y default-jre
# For phylogenetic trees
WORKDIR /tmp
RUN wget https://sourceforge.net/projects/ksnp/files/kSNP3.1_Linux_package.zip
RUN unzip -o kSNP3.1_Linux_package.zip
WORKDIR /tmp/kSNP3.1_Linux_package/kSNP3
RUN cp -r * /usr/local/bin/
RUN sed -i 's:set kSNP=/usr/local/kSNP3:set kSNP=/usr/local/bin:g' /usr/local/bin/kSNP3 # edit the kSNP3 executable so it looks for other executables in /usr/local/bin
RUN apt install tcsh
RUN kSNP3
# Cleanup
RUN rm -rf /tmp/*
WORKDIR /