-
Notifications
You must be signed in to change notification settings - Fork 48
/
Dockerfile
executable file
·64 lines (49 loc) · 3.45 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
FROM ubuntu:16.04
USER root
# Add dependencies
RUN apt-get update && apt-get install -y libxml2 libxml2-dev libcurl4-gnutls-dev r-cran-rgl git libssl-dev curl
RUN mkdir /tmp/downloads
RUN curl -sSL -o tmp.tar.gz --retry 10 https://github.com/samtools/htslib/archive/1.7.tar.gz && \
mkdir /tmp/downloads/htslib && \
tar -C /tmp/downloads/htslib --strip-components 1 -zxf tmp.tar.gz && \
make -C /tmp/downloads/htslib && \
rm -f /tmp/downloads/tmp.tar.gz
ENV HTSLIB /tmp/downloads/htslib
RUN curl -sSL -o tmp.tar.gz --retry 10 https://github.com/cancerit/alleleCount/archive/v4.0.0.tar.gz && \
mkdir /tmp/downloads/alleleCount && \
tar -C /tmp/downloads/alleleCount --strip-components 1 -zxf tmp.tar.gz && \
cd /tmp/downloads/alleleCount/c && \
mkdir bin && \
make && \
cp /tmp/downloads/alleleCount/c/bin/alleleCounter /usr/local/bin/. && \
cd /tmp/downloads && \
rm -rf /tmp/downloads/alleleCount /tmp/downloads/tmp.tar.gz
RUN curl -sSL -o tmp.tar.gz --retry 10 https://mathgen.stats.ox.ac.uk/impute/impute_v2.3.2_x86_64_static.tgz && \
mkdir /tmp/downloads/impute2 && \
tar -C /tmp/downloads/impute2 --strip-components 1 -zxf tmp.tar.gz && \
cp /tmp/downloads/impute2/impute2 /usr/local/bin && \
rm -rf /tmp/downloads/impute2 /tmp/downloads/tmp.tar.gz
RUN R -q -e 'source("http://bioconductor.org/biocLite.R"); biocLite(c("gtools", "optparse", "devtools","RColorBrewer","ggplot2","gridExtra","readr","doParallel","foreach", "splines"))'
RUN R -q -e 'devtools::install_github("Crick-CancerGenomics/ascat/ASCAT")'
RUN mkdir -p /opt/battenberg
COPY . /opt/battenberg/
RUN R -q -e 'install.packages("/opt/battenberg", repos=NULL, type="source")'
# modify paths to reference files
RUN cat /opt/battenberg/inst/example/battenberg_wgs.R | \
sed 's|IMPUTEINFOFILE = \".*|IMPUTEINFOFILE = \"/opt/battenberg_reference/1000genomes_2012_v3_impute/impute_info.txt\"|' | \
sed 's|G1000PREFIX = \".*|G1000PREFIX = \"/opt/battenberg_reference/1000genomes_2012_v3_loci/1000genomesAlleles2012_chr\"|' | \
sed 's|G1000PREFIX_AC = \".*|G1000PREFIX_AC = \"/opt/battenberg_reference/1000genomes_2012_v3_loci/1000genomesloci2012_chr\"|' | \
sed 's|GCCORRECTPREFIX = \".*|GCCORRECTPREFIX = \"/opt/battenberg_reference/1000genomes_2012_v3_gcContent/1000_genomes_GC_corr_chr_\"|' | \
sed 's|PROBLEMLOCI = \".*|PROBLEMLOCI = \"/opt/battenberg_reference/battenberg_problem_loci/probloci_270415.txt.gz\"|' | \
sed 's|REPLICCORRECTPREFIX = \".*|REPLICCORRECTPREFIX = \"/opt/battenberg_reference/battenberg_wgs_replic_correction_1000g_v3/1000_genomes_replication_timing_chr_\"|' > /usr/local/bin/battenberg_wgs.R
RUN cp /opt/battenberg/inst/example/filter_sv_brass.R /usr/local/bin/filter_sv_brass.R
RUN cp /opt/battenberg/inst/example/battenberg_cleanup.sh /usr/local/bin/battenberg_cleanup.sh
#RUN cat /opt/battenberg/inst/example/battenberg_snp6.R | \
# sed 's|IMPUTEINFOFILE = \".*|IMPUTEINFOFILE = \"/opt/battenberg_reference/1000genomes_2012_v3_impute/impute_info.txt\"|' | \
# sed 's|G1000PREFIX = \".*|G1000PREFIX = \"/opt/battenberg_reference/1000genomes_2012_v3_loci/1000genomesAlleles2012_chr\"|' | \
# sed 's|SNP6_REF_INFO_FILE = \".*|SNP6_REF_INFO_FILE = \"/opt/battenberg_reference/battenberg_snp6/snp6_ref_info_file.txt\"|' > /usr/local/bin/battenberg_snp6.R
## USER CONFIGURATION
RUN adduser --disabled-password --gecos '' ubuntu && chsh -s /bin/bash && mkdir -p /home/ubuntu
USER ubuntu
WORKDIR /home/ubuntu
CMD ["/bin/bash"]