haplotyper-battle-royale/modules/viquas/Dockerfile

59 lines
1.7 KiB
Docker
Raw Normal View History

FROM ubuntu:bionic
ENV R_VERSION=3.6.3
ENV ROCKER_VERSION=4.1.1
ENV R_HOME=/usr/local/lib/R
ENV TZ=Etc/UTC
ENV SAMTOOLS_VERSION=1.2
# Install R basic dependencies
RUN apt-get update && \
apt-get install --no-install-recommends -y \
sed \
curl \
ca-certificates
RUN curl -L "https://github.com/rocker-org/rocker-versioned2/archive/refs/tags/R${ROCKER_VERSION}.tar.gz" | tar xvz
RUN ./rocker-versioned2-R${ROCKER_VERSION}/scripts/install_R.sh
RUN rm -rf rocker-versioned2-R${ROCKER_VERSION}
# Install BioPerl
RUN apt-get update && \
apt-get install --no-install-recommends -y \
curl \
perl \
cpanminus \
build-essential \
make \
libexpat1-dev \
libssl-dev \
zlib1g-dev
RUN cpanm -n -v Bio::Seq Bio::SeqIO Perl4::CoreLibs
# Install R packages
RUN install2.r --error --skipinstalled BiocManager
RUN R -e "BiocManager::install(c('Biostrings', 'seqinr'))"
# Install samtools
RUN apt-get update && \
apt-get install --no-install-recommends -y libncurses5-dev
RUN curl -L "https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2" | tar xvj
RUN cd samtools-${SAMTOOLS_VERSION} && make && make install && cd ..
RUN rm -rf samtools-${SAMTOOLS_VERSION}
# Cleanup
RUN apt-get remove -y \
build-essential \
make
# Install Viquas
RUN apt-get update && apt-get install --no-install-recommends -y curl
RUN mkdir /viquas && curl -L "https://master.dl.sourceforge.net/project/viquas/ViQuaS1.3.tar.gz" | tar xvz -C /viquas --strip-components=1
RUN apt-get remove -y curl
# Add wrapper script
COPY viquas /usr/bin/viquas
RUN chmod +x /usr/bin/viquas
RUN mkdir /work
ENTRYPOINT [ "viquas" ]