| 1 |
################################################################# |
| 2 |
# Dockerfile |
| 3 |
# |
| 4 |
# Software: bwa, bwa-meth, samtools |
| 5 |
# Software Version: 0.7.17, 0.20, 1.7 |
| 6 |
# Description: Alpine bwa and bwa-meth Image |
| 7 |
# Website: https://github.com/lh3/bwa |
| 8 |
# https://github.com/brentp/bwa-meth |
| 9 |
# Provides: bwa|bwa-meth.py|samtools |
| 10 |
# Base Image: alpine:python |
| 11 |
# Build Cmd: docker build -t jdidion/bwabase:latest . |
| 12 |
# Pull Cmd: docker pull jdidion/bwabase |
| 13 |
# Run Cmd: docker run --rm jdidion/bwabase bwa |
| 14 |
# docker run --rm jdidion/bwabase python bwa-meth.py |
| 15 |
################################################################# |
| 16 |
FROM phusion/baseimage:latest |
| 17 |
WORKDIR /tmp |
| 18 |
|
| 19 |
ENV BUILD_PACKAGES \ |
| 20 |
build-essential \ |
| 21 |
g++ \ |
| 22 |
libbz2-dev \ |
| 23 |
zlib1g-dev \ |
| 24 |
liblzma-dev \ |
| 25 |
git \ |
| 26 |
wget |
| 27 |
ENV RUNTIME_PACKAGES \ |
| 28 |
libncurses5-dev \ |
| 29 |
libncursesw5-dev \ |
| 30 |
python3-pip \ |
| 31 |
time |
| 32 |
ENV BWA_VERSION 0.7.17 |
| 33 |
ENV BWA_URL "https://github.com/lh3/bwa/releases/download/v${BWA_VERSION}/bwa-${BWA_VERSION}.tar.bz2" |
| 34 |
ENV SAMTOOLS_VERSION 1.7 |
| 35 |
ENV SAMTOOLS_URL "https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2" |
| 36 |
|
| 37 |
RUN apt-get update && apt-get install --yes \ |
| 38 |
$BUILD_PACKAGES \ |
| 39 |
$RUNTIME_PACKAGES \ |
| 40 |
&& ln -s /usr/bin/python3 /usr/bin/python \ |
| 41 |
&& ln -s /usr/bin/pip3 /usr/bin/pip \ |
| 42 |
&& wget -q -O - $BWA_URL | tar -jxv \ |
| 43 |
&& cd bwa-${BWA_VERSION} \ |
| 44 |
&& sed -i '1i#include <stdint.h>' kthread.c \ |
| 45 |
&& sed -i[.bak] "s/u_int32_t/uint32_t/g" *.c \ |
| 46 |
&& sed -i[.bak] "s/u_int32_t/uint32_t/g" *.h \ |
| 47 |
&& make \ |
| 48 |
&& mv /tmp/bwa-${BWA_VERSION}/bwa /usr/local/bin \ |
| 49 |
&& cd .. \ |
| 50 |
&& git clone --recursive https://github.com/brentp/bwa-meth \ |
| 51 |
&& cd bwa-meth \ |
| 52 |
&& python setup.py install \ |
| 53 |
&& wget -q -O - $SAMTOOLS_URL | tar -jxv \ |
| 54 |
&& cd samtools-${SAMTOOLS_VERSION} \ |
| 55 |
&& ./configure --prefix=/usr/local/ --without-curses \ |
| 56 |
&& make \ |
| 57 |
&& make install \ |
| 58 |
&& rm -Rf /tmp/samtools-${SAMTOOLS_VERSION} |
| 59 |
|
| 60 |
RUN apt-get remove --purge -y $BUILD_PACKAGES \ |
| 61 |
&& rm -rf /var/lib/apt/lists/* \ |
| 62 |
&& rm -rf /tmp/* |