Sign inSign up

michaelfranklin/bwasamtools

By michaelfranklin

•Updated almost 7 years ago

BWA + Samtools to allow piping between bwa mem and samtools view

Image
0

7.3K

michaelfranklin/bwasamtools repository overview

For workflows, instead of having two steps (where BWA mem can produce SAM files that are terabytes), pipe it directly to samtools view.

In the version tag, the first is the BWA version, the second is the Samtools version. Eg: 0.7.17-1.9 is BWA (0.7.17) and Samtools (1.9). These were the most up to date version when this was published (2019-05-09).

Dockerfile:

# Merge BWA and SAMTOOLS together to allow us to pipe bwa mem to samtools view

FROM ubuntu:16.04

RUN apt-get update -qq \
  && apt-get install -qq bzip2 gcc g++ make zlib1g-dev wget libncurses5-dev liblzma-dev libbz2-dev

ENV BWA_VERSION 0.7.17
ENV SAMTOOLS_VERSION 1.9


RUN cd /opt/ \
	&& wget https://github.com/lh3/bwa/releases/download/v${BWA_VERSION}/bwa-${BWA_VERSION}.tar.bz2 \
	&& tar -xjf bwa-${BWA_VERSION}.tar.bz2 \
	&& rm -f bwa-${BWA_VERSION}.tar.bz2 \
	&& cd /opt/bwa-${BWA_VERSION}/ \
	&& make

RUN cd /opt/ \
	&& wget https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2 \
	&& tar -xjf samtools-${SAMTOOLS_VERSION}.tar.bz2 \
	&& rm -rf samtools-${SAMTOOLS_VERSION}.tar.bz2  \
	&& cd samtools-${SAMTOOLS_VERSION}/ \
	&& make && make install

ENV PATH="/opt/bwa-${BWA_VERSION}/:/opt/samtools-${SAMTOOLS_VERSION}/:${PATH}"

Tag summary

Content type

Image

Digest

Size

162.1 MB

Last updated

almost 7 years ago

docker pull michaelfranklin/bwasamtools:0.7.17-1.10