Skip to content

Instantly share code, notes, and snippets.

@jmarshall
Created September 21, 2018 14:23
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmarshall/adc75969306354f4398896f1fc1f4865 to your computer and use it in GitHub Desktop.
Save jmarshall/adc75969306354f4398896f1fc1f4865 to your computer and use it in GitHub Desktop.
Basic Dockerfile for fully-featured HTSlib/SAMtools/BCFtools
ARG ubuntu_version=latest
FROM ubuntu:${ubuntu_version}
USER root
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
libbz2-dev \
libcurl4-openssl-dev \
libgsl0-dev \
liblzma-dev \
libncurses5-dev \
libperl-dev \
libssl-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp
ARG htsversion=1.9
RUN curl -L https://github.com/samtools/htslib/releases/download/${htsversion}/htslib-${htsversion}.tar.bz2 | tar xj && \
(cd htslib-${htsversion} && ./configure --enable-plugins --with-plugin-path='$(libexecdir)/htslib:/usr/libexec/htslib' && make install) && \
ldconfig && \
curl -L https://github.com/samtools/samtools/releases/download/${htsversion}/samtools-${htsversion}.tar.bz2 | tar xj && \
(cd samtools-${htsversion} && ./configure --with-htslib=system && make install) && \
curl -L https://github.com/samtools/bcftools/releases/download/${htsversion}/bcftools-${htsversion}.tar.bz2 | tar xj && \
(cd bcftools-${htsversion} && ./configure --enable-libgsl --enable-perl-filters --with-htslib=system && make install) && \
git clone --depth 1 git://github.com/samtools/htslib-plugins && \
(cd htslib-plugins && make PLUGINS='hfile_cip.so hfile_mmap.so' install)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment