#! Dockerfile for installing CNVkit!# # Pull base image. FROM ubuntu:20.04 # Python version ARG python_version="3.9.0" ARG htslib_version="1.16" ARG samtools_version="1.16.1" ARG r_version="4.1.1" # Noninteractive environment ENV DEBIAN_FRONTEND=noninteractive # Install prerequisites for Python. RUN apt-get update && apt-get install -y build-essential checkinstall \ libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev \ tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev wget gcc tabix liblzma-dev # Install prerequisits for R RUN apt-get update -y && apt-get upgrade -y && apt-get install -y \ git \ clang \ g++ \ gcc \ bzip2 \ pandoc \ ca-certificates \ software-properties-common \ apt-transport-https \ build-essential \ libv8-dev \ libgsl-dev \ libcurl4-openssl-dev \ curl #Downloading, unpacking and deleting .tgz python file. WORKDIR /usr/src RUN wget https://www.python.org/ftp/python/${python_version}/Python-${python_version}.tgz && \ tar xzf /usr/src/Python-${python_version}.tgz && rm /usr/src/Python-${python_version}.tgz #Install Python and remove tmp files. WORKDIR /usr/src/Python-${python_version} RUN ./configure && make altinstall # Install pip. RUN wget https://bootstrap.pypa.io/get-pip.py RUN python3.9 get-pip.py RUN pip3 install pandas RUN apt-get install libatlas-base-dev gfortran -y RUN pip3 install --upgrade pandas RUN pip3 install numpy RUN pip3 install --upgrade numexpr RUN pip3 install scipy RUN pip3 install --upgrade scipy RUN pip3 install matplotlib RUN pip3 install reportlab RUN pip3 install argparse RUN pip3 install pysam RUN pip3 install biopython pyfaidx reportlab pyvcf --upgrade RUN pip3 install --upgrade cython # Install CNVKit RUN pip3 install cnvkit # Define working directory. WORKDIR /opt #Install R RUN apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 RUN apt-get clean && apt-get autoclean && apt-get update RUN add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/' RUN apt-get update -y && apt-get upgrade -y && apt-get install -y --no-install-recommends r-base-dev # r-base=${r_version}* \ # r-recommended=${r_version}* RUN wget -c https://cran.r-project.org/src/base/R-4/R-${r_version}.tar.gz && tar -xf R-${r_version}.tar.gz WORKDIR /opt/R-${r_version} RUN ./configure && make -j9 && make install WORKDIR /opt/ # Install R packages RUN echo 'options(repos = c(CRAN = "https://cloud.r-project.org"))' >> /opt/packages.R RUN echo 'install.packages("BiocManager", version = "3.14", dependencies = TRUE)' >> /opt/packages.R RUN echo 'install.packages("docopt", dependencies = TRUE)' >> /opt/packages.R RUN Rscript /opt/packages.R # Installing Bioconductor packages RUN echo 'BiocManager::install("DNAcopy", version = "3.14")' >> /opt/bioc_packages.R RUN Rscript /opt/bioc_packages.R WORKDIR /opt/ # Install htslib RUN apt-get install -y autoconf RUN wget https://github.com/samtools/htslib/releases/download/${htslib_version}/htslib-${htslib_version}.tar.bz2 RUN tar -xjf htslib-${htslib_version}.tar.bz2 WORKDIR /opt/htslib-${htslib_version} RUN autoreconf -i && ./configure RUN make && make install WORKDIR /opt/ # Install samtools RUN wget https://github.com/samtools/samtools/releases/download/${samtools_version}/samtools-${samtools_version}.tar.bz2 RUN tar -xjf samtools-${samtools_version}.tar.bz2 WORKDIR /opt/samtools-${samtools_version} RUN autoheader RUN autoconf -Wno-syntax && ./configure RUN make && make install WORKDIR /opt/ # Install bcftools RUN wget https://github.com/samtools/bcftools/releases/download/${htslib_version}/bcftools-${htslib_version}.tar.bz2 RUN tar -xjf bcftools-${htslib_version}.tar.bz2 WORKDIR /opt/bcftools-${htslib_version} RUN autoheader RUN autoconf -Wno-syntax && ./configure RUN make && make install WORKDIR /opt/ # Remove compressed files RUN rm -r htslib-${htslib_version}.tar.bz2 RUN rm -r samtools-${samtools_version}.tar.bz2 RUN rm -r bcftools-${htslib_version}.tar.bz2 # Set python same as python3.10 RUN ln -sf /usr/local/bin/python3.9 /usr/local/bin/python RUN ln -sf /usr/local/bin/python3.9 /usr/local/bin/python3 # Copy Dockerfile. COPY Dockerfile /opt/