-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
156 lines (111 loc) · 4.29 KB
/
Copy pathDockerfile
File metadata and controls
156 lines (111 loc) · 4.29 KB
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
#######################################################
# Dockerfile for the genotype QC pipeline at EpiCompBio
# https://github.com/EpiCompBio/genotype_tools
#######################################################
####################################################
# Base image is from Ubuntu 16.04 aka 'Xenial Xerus'
# Provide Python 2.7.12
####################################################
# TO DO: will need to update to py3.5
FROM ubuntu:16.04
##########
# Contact:
##########
MAINTAINER David Mosen <d.mosen-ansorena@imperial.ac.uk>
MAINTAINER Antonio Berlanga-Taylor <a.berlanga@imperial.ac.uk>
# See David M.'s ITMAP example and cgat Dockerfiles:
# https://github.com/CGATOxford/cgat/blob/master/Dockerfile
# CGATPipelines doesn't have a Dockerfile (?), check:
# https://github.com/CGATOxford/CGATPipelines/blob/master/INSTALL
#########################
# Update/install packages
#########################
RUN apt-get update && apt-get install -y \
apt-transport-https \
curl \
git \
graphviz \
libxml2-dev \
libcurl4-openssl-dev \
python-pip \
software-properties-common \
sudo \
unzip \
vim \
bzip2 \
fixincludes \
wget && \
rm -rf /var/lib/apt/lists/*
# System dependencies needed for CGAT packages/dependencies:
# bzip2 \
# fixincludes
############
# CGAT tools
############
# Install CGAT code
RUN wget --no-check-certificate https://raw.github.com/CGATOxford/cgat/master/install-CGAT-tools.sh && \
mkdir /shared && \
bash install-CGAT-tools.sh --cgat-devel --zip --location /shared
# TO DO: install CGATPipelines
#########################
# Install Python packages
#########################
# install RUFFUS:
# TO DO: Not needed as should be in requirements for cgat tools and CGATPipelines
# Leaving for now though
RUN pip install --upgrade pip
RUN pip install ruffus --upgrade
###############################
# Install external dependencies
###############################
# install PLINK:
ENV PLINK_VERSION 1.9
ENV PLINK_NO plink170113
ENV PLINK_HOME /usr/local/plink
RUN wget https://www.cog-genomics.org/static/bin/$PLINK_NO/plink_linux_x86_64.zip && \
unzip plink_linux_x86_64.zip -d /usr/local/ && \
rm plink_linux_x86_64.zip && \
cd /usr/local/bin && \
ln -s $PLINK_HOME plink
#########################################################
# Install R (currently 3.3.2) and friends:
#########################################################
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 && \
add-apt-repository 'deb [arch=amd64,i386] https://cran.rstudio.com/bin/linux/ubuntu xenial/'
RUN apt-get update && apt-get install -y r-base r-cran-littler
# Create install script for packages that uses biocLite:
RUN echo '#!/usr/bin/env r' > /usr/local/bin/install.r && \
echo 'library(utils)' >> /usr/local/bin/install.r && \
echo 'source("https://bioconductor.org/biocLite.R")' >> /usr/local/bin/install.r && \
echo 'lib.loc <- "/usr/local/lib/R/site-library"' >> /usr/local/bin/install.r && \
echo 'biocLite(commandArgs(TRUE), lib.loc)' >> /usr/local/bin/install.r && \
chmod 755 /usr/local/bin/install.r
# install required R packages:
RUN Rscript /usr/local/bin/install.r \
ggplot2 \
plyr \
qqman \
data.table \
geneplotter \
SNPRelate
# TO DO: install aberrant and FlashPCA
#########################################################
# housekeeping; may not be necessary:
#########################################################
ENV USER datasci
ENV HOME /home/$USER
RUN useradd -ms /bin/bash $USER && \
echo "$USER:DaTaSc1" | chpasswd && \
adduser $USER sudo
#########################################################
# Set the default action to print plink's options
#########################################################
# TO DO: Set environment variables (this is from cgat tools):
# ENV PATH=/shared/conda-install/envs/cgat-devel/bin:$PATH
# TO DO: set up entrypoint for specific pipeline
#ENTRYPOINT ["plink"]
#CMD ["--help"]
# Add an entry point to the cgat command (?):
# ENTRYPOINT ["/shared/conda-install/envs/cgat-devel/bin/cgat"]
# TO DO: Create a shared folder between docker container and host
#VOLUME ["/shared/data"]