-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile_ubunta
93 lines (81 loc) · 3.32 KB
/
Dockerfile_ubunta
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
FROM ubuntu:16.04
# Metadata
LABEL base.image="ubuntu"
LABEL software="ScaR"
LABEL description="A scaffold realignment approach for fusion detection"
LABEL software.version="20191117"
LABEL tags="Genomics"
LABEL version="vX"
LABEL documentation=""
LABEL website="https://github.com/senzhaocode/ScaR"
LABEL license="GPL"
# Set the samtools, hisat2 and r
USER root
# install compiler, library, python, perl and set environment
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
&& apt-get update -y \
&& apt-get install -y \
gcc \
g++ \
zlib1g-dev \
libbz2-dev \
libcurl4-openssl-dev \
unzip \
vim \
r-base \
wget \
python-pip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# install samtools v1.7
RUN wget https://github.com/samtools/samtools/releases/download/1.7/samtools-1.7.tar.bz2 \
&& tar xjf samtools-1.7.tar.bz2 \
&& cd samtools-1.7 \
&& ./configure && make \
&& mv samtools /usr/bin/ \
&& cd .. \
&& rm -rf samtools-1.7*
# install Hisat2 v2.1.0
RUN cd / && wget ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/downloads/hisat2-2.1.0-Linux_x86_64.zip \
&& unzip hisat2-2.1.0-Linux_x86_64.zip \
&& rm -rf hisat2-2.1.0-Linux_x86_64.zip
ENV PATH=$PATH:/hisat2-2.1.0
# install STAR-2.7.2d
RUN cd / && wget https://github.com/alexdobin/STAR/archive/2.7.2d.tar.gz \
&& tar -vxf 2.7.2d.tar.gz \
&& rm -rf 2.7.2d.tar.gz
ENV PATH=$PATH:/STAR-2.7.2d/bin/Linux_x86_64_static
# install ScaR
RUN mkdir /ScaR && mkdir /ScaR/lib && mkdir /ScaR/examples
ENV PATH=$PATH:/ScaR
COPY examples/script_for_docker.pl evaluate.pl /ScaR/
RUN mv /ScaR/script_for_docker.pl /ScaR/select_read.pl
RUN chmod 777 /ScaR/select_read.pl
RUN chmod 777 /ScaR/evaluate.pl
COPY lib/*.pm /ScaR/lib/
ENV PERL5LIB=$PERL5LIB:/ScaR/lib
COPY examples/partner_gene_sim.pl /ScaR/examples/
# Set index and reference annotation
RUN mkdir /data && chmod 777 /data
RUN mkdir /reference && mkdir /reference/partner_gene_sim
COPY examples/partner_gene_sim/*.fasta /reference/partner_gene_sim/
RUN cd /reference \
&& wget "ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/data/grch38_tran.tar.gz" \
&& tar -xvf grch38_tran.tar.gz \
&& mv grch38_tran/genome_tran.* . \
&& rm -rf grch38_tran.tar.gz \
&& rm -rf grch38_tran \
&& wget "https://zenodo.org/record/4036439/files/ensembl_transcript.fa?download=1" && mv "ensembl_transcript.fa?download=1" ensembl_transcript.fa \
&& wget "https://zenodo.org/record/4036439/files/gencode_transcript.fa?download=1" && mv "gencode_transcript.fa?download=1" gencode_transcript.fa \
&& wget "https://zenodo.org/record/4036439/files/ucsc_transcript.fa?download=1" && mv "ucsc_transcript.fa?download=1" ucsc_transcript.fa \
&& wget "https://zenodo.org/record/4036439/files/ucsc_refGene.txt?download=1" && mv "ucsc_refGene.txt?download=1" ucsc_refGene.txt \
&& wget "https://zenodo.org/record/4036439/files/Gene_hg38.txt?download=1" && mv "Gene_hg38.txt?download=1" Gene_hg38.txt \
&& wget "https://zenodo.org/record/4036439/files/GRCh38.primary_assembly.genome.fa?download=1" && mv "GRCh38.primary_assembly.genome.fa?download=1" GRCh38.primary_assembly.genome.fa
# Final setting
RUN apt-get clean autoclean
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN rm -rf /var/lib/{dpkg,cache,log}
VOLUME /data
WORKDIR /data/
CMD ["perl", "/ScaR/select_read.pl"]
CMD ["perl", "/ScaR/evaluate.pl"]