Skip to content

Commit

Permalink
adding version 1.19 for samtools/bcftools/htslib (#830)
Browse files Browse the repository at this point in the history
* adding version 1.19

* added plugins

* added list plugins

* Update README.md

fix internal bcftools links

---------

Co-authored-by: Kutluhan Incekara <[email protected]>
  • Loading branch information
erinyoung and Kincekara authored Jan 11, 2024
1 parent e31a234 commit 1787fa4
Show file tree
Hide file tree
Showing 7 changed files with 344 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [Augur](https://github.com/nextstrain/augur) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/augur)](https://hub.docker.com/r/staphb/augur) | <ul><li>6.3.0</li><li>7.0.2</li><li>8.0.0</li><li>9.0.0</li><li>16.0.3</li></ul> | https://github.com/nextstrain/augur |
| [Auspice](https://github.com/nextstrain/auspice) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/auspice)](https://hub.docker.com/r/staphb/auspice) | <ul><li>2.12.0</li></ul> | https://github.com/nextstrain/auspice |
| [BBTools](https://hub.docker.com/r/staphb/bbtools/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/bbtools)](https://hub.docker.com/r/staphb/bbtools) | <ul><li>38.76</li><li>38.86</li><li>38.95</li><li>38.96</li><li>38.97</li><li>38.98</li><li>38.99</li><li>39.00</li><li>39.01</li></ul> | https://jgi.doe.gov/data-and-tools/bbtools/ |
| [bcftools](https://hub.docker.com/r/staphb/bcftools/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/bcftools)](https://hub.docker.com/r/staphb/bcftools) | <ul><li>1.10.2</li><li>1.11</li><li>1.12</li><li>1.13</li><li>1.14</li><li>1.15</li><li>1.16</li><li>1.17</li><li>[1.18](bcftools/1.18/)</li></ul> | https://github.com/samtools/bcftools |
| [bcftools](https://hub.docker.com/r/staphb/bcftools/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/bcftools)](https://hub.docker.com/r/staphb/bcftools) | <ul><li>[1.10.2](./bcftools/1.10.2/)</li><li>[1.11](./bcftools/1.11/)</li><li>[1.12](./bcftools/1.12/)</li><li>[1.13](./bcftools/1.13/)</li><li>[1.14](./bcftools/1.14/)</li><li>[1.15](./bcftools/1.15/)</li><li>[1.16](./bcftools/1.16/)</li><li>[1.17](./bcftools/1.17/)</li><li>[1.18](bcftools/1.18/)</li><li>[1.19](./bcftools/1.19/)</li></ul> | https://github.com/samtools/bcftools |
| [bedtools](https://hub.docker.com/r/staphb/bedtools/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/bedtools)](https://hub.docker.com/r/staphb/bedtools) | <ul><li>2.29.2</li><li>2.30.0</li><li>[2.31.0](bedtools/2.31.0/)</li><li>[2.31.1](bedtools/2.31.1/)</li></ul> | https://bedtools.readthedocs.io/en/latest/ <br/>https://github.com/arq5x/bedtools2 |
| [berrywood-report-env](https://hub.docker.com/r/staphb/berrywood-report-env/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/berrywood-report-env)](https://hub.docker.com/r/staphb/berrywood-report-env) | <ul><li>1.0</li></ul> | none |
| [blast+](https://hub.docker.com/r/staphb/blast/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/blast)](https://hub.docker.com/r/staphb/blast) | <ul><li>[2.13.0](blast/2.13.0/)</li><li>[2.14.0](blast/2.14.0/)</li><li>[2.14.1](blast/2.14.1/)</li><li>[2.15.0](blast/2.15.0/)</li></ul> | https://www.ncbi.nlm.nih.gov/books/NBK279690/ |
Expand Down Expand Up @@ -161,7 +161,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [gfastats](https://hub.docker.com/r/staphb/gfastats) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/gfastats)](https://hub.docker.com/r/staphb/gfastats) | <ul><li>1.3.6</li></ul> | https://github.com/vgl-hub/gfastats |
| [hmmer](https://hub.docker.com/r/staphb/hmmer) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/hmmer)](https://hub.docker.com/r/staphb/hmmer) | <ul><li>[3.3](hmmer/3.3/)</li><li>[3.3.2](hmmer/3.3.2/)</li></ul> | http://hmmer.org/ |
| [homopolish](https://hub.docker.com/r/staphb/homopolish) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/homopolish)](https://hub.docker.com/r/staphb/homopolish) | <ul><li>0.4.1</li></ul> | https://github.com/ythuang0522/homopolish/ |
| [htslib](https://hub.docker.com/r/staphb/htslib) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/htslib)](https://hub.docker.com/r/staphb/htslib) | <ul><li>1.14</li><li>1.15</li><li>1.16</li><li>1.17</li><li>[1.18](htslib/1.18/)</li></ul> | https://www.htslib.org/ |
| [htslib](https://hub.docker.com/r/staphb/htslib) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/htslib)](https://hub.docker.com/r/staphb/htslib) | <ul><li>[1.14](./htslib/1.14)</li><li>[1.15](./htslib/1.15)</li><li>[1.16](./htslib/1.16)</li><li>[1.17](./htslib/1.17)</li><li>[1.18](./htslib/1.18/)</li><li>[1.19](./htslib/1.19/)</li></ul> | https://www.htslib.org/ |
| [iqtree](https://hub.docker.com/r/staphb/iqtree/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/iqtree)](https://hub.docker.com/r/staphb/iqtree) | <ul><li>1.6.7</li></ul> | http://www.iqtree.org/ |
| [iqtree2](https://hub.docker.com/r/staphb/iqtree2/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/iqtree2)](https://hub.docker.com/r/staphb/iqtree2) | <ul><li>2.1.2</li><li>2.2.2.2</li><li>[2.2.2.6](iqtree2/2.2.2.6/)</li></ul> | http://www.iqtree.org/ |
| [IRMA](https://hub.docker.com/r/staphb/irma/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/irma)](https://hub.docker.com/r/staphb/irma) | <ul><li>1.0.2</li><li>1.0.3</li><li>1.1.2</li><li>1.1.3</li></ul> | https://wonder.cdc.gov/amd/flu/irma/|
Expand Down Expand Up @@ -229,7 +229,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [ResFinder](https://hub.docker.com/r/staphb/resfinder/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/resfinder)](https://hub.docker.com/r/staphb/resfinder) | <ul><li>4.1.1</li></ul> | https://bitbucket.org/genomicepidemiology/resfinder/src/master/ |
| [Roary](https://hub.docker.com/r/staphb/roary/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/roary)](https://hub.docker.com/r/staphb/roary) | <ul><li>3.12.0</li><li>3.13.0</li></ul> | https://github.com/sanger-pathogens/Roary |
| [SalmID](https://hub.docker.com/r/staphb/salmid) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/salmid)](https://hub.docker.com/r/staphb/salmid) | <ul><li>0.1.23</li></ul> | https://github.com/hcdenbakker/SalmID |
| [Samtools](https://hub.docker.com/r/staphb/samtools) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/samtools)](https://hub.docker.com/r/staphb/samtools) | <ul><li>1.9</li><li>1.10</li><li>1.11</li><li>1.12</li><li>1.13</li><li>1.14</li><li>1.15</li><li>1.16</li><li>1.16.1</li><li>1.17</li><li>[1.17-2023-06](samtools/1.17-2023-06/)</li><li>[1.18](samtools/1.18/)</li></ul> | https://github.com/samtools/samtools |
| [Samtools](https://hub.docker.com/r/staphb/samtools) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/samtools)](https://hub.docker.com/r/staphb/samtools) | <ul><li>[1.9](./samtools/1.9/)</li><li>[1.10](./samtools/1.10/)</li><li>[1.11](./samtools/1.11/)</li><li>[1.12](./samtools/1.12/)</li><li>[1.13](./samtools/1.13/)</li><li>[1.14](./samtools/1.14/)</li><li>[1.15](./samtools/1.15/)</li><li>[1.16](./samtools/1.16/)</li><li>[1.16.1](./samtools/1.16.1/)</li><li>[1.17](./samtools/1.17/)</li><li>[1.17-2023-06](./samtools/1.17-2023-06/)</li><li>[1.18](./samtools/1.18/)</li><li>[1.19](./samtools/1.19/)</li></ul> | https://github.com/samtools/samtools |
| [SeqKit](https://hub.docker.com/r/staphb/SeqKit) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/seqkit)](https://hub.docker.com/r/staphb/seqkit) | <ul><li>2.3.1</li></ul> | https://github.com/shenwei356/seqkit |
| [SeqSero](https://hub.docker.com/r/staphb/seqsero/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/seqsero)](https://hub.docker.com/r/staphb/seqsero) | <ul><li>1.0.1</li></ul> | https://github.com/denglab/SeqSero |
| [SeqSero2](https://hub.docker.com/r/staphb/seqsero2/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/seqsero2)](https://hub.docker.com/r/staphb/seqsero2) | <ul><li>0.1.0</li><li>1.0.0</li><li>1.0.2</li><li>1.1.0</li><li>1.1.1</li><li>1.2.1</li></ul> | https://github.com/denglab/SeqSero2/ |
Expand Down
102 changes: 102 additions & 0 deletions bcftools/1.19/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# for easy upgrade later. ARG variables only persist during build time
ARG BCFTOOLS_VER="1.19"

FROM ubuntu:jammy as builder

# re-instantiate variable
ARG BCFTOOLS_VER

# install dependencies, cleanup apt garbage
RUN apt-get update && apt-get install --no-install-recommends -y \
wget \
ca-certificates \
perl \
bzip2 \
autoconf \
automake \
make \
gcc \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
libcurl4-gnutls-dev \
libssl-dev \
libperl-dev \
libgsl0-dev \
procps && \
rm -rf /var/lib/apt/lists/* && apt-get autoclean

# download, compile, and install bcftools
RUN wget https://github.com/samtools/bcftools/releases/download/${BCFTOOLS_VER}/bcftools-${BCFTOOLS_VER}.tar.bz2 && \
tar -xjf bcftools-${BCFTOOLS_VER}.tar.bz2 && \
rm -v bcftools-${BCFTOOLS_VER}.tar.bz2 && \
cd bcftools-${BCFTOOLS_VER} && \
make && \
make install && \
make test

### start of app stage ###
FROM ubuntu:jammy as app

# re-instantiate variable
ARG BCFTOOLS_VER

# putting the labels in
LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="bcftools"
LABEL software.version="${BCFTOOLS_VER}"
LABEL description="Variant calling and manipulating files in the Variant Call Format (VCF) and its binary counterpart BCF"
LABEL website="https://github.com/samtools/bcftools"
LABEL license="https://github.com/samtools/bcftools/blob/develop/LICENSE"
LABEL maintainer="Erin Young"
LABEL maintainer.email="[email protected]"
LABEL maintainer2="Curtis Kapsak"
LABEL maintainer2.email="[email protected]"

# install dependencies required for running bcftools
# https://github.com/samtools/bcftools/blob/develop/INSTALL#L29
RUN apt-get update && apt-get install --no-install-recommends -y \
perl \
zlib1g \
libncurses5 \
bzip2 \
liblzma-dev \
libcurl4-gnutls-dev \
procps \
&& apt-get autoclean && rm -rf /var/lib/apt/lists/* && \
mkdir /data

WORKDIR /bcftools/plugins

# copy in bcftools executables from builder stage
COPY --from=builder /usr/local/bin/* /usr/local/bin/
COPY --from=builder /bcftools-${BCFTOOLS_VER}/plugins/* /bcftools/plugins

# set locale settings for singularity compatibility
ENV LC_ALL=C BCFTOOLS_PLUGINS='/bcftools/plugins'

# set final working directory
WORKDIR /data

# default command is to pull up help optoins
CMD ["bcftools", "--help"]

### start of test stage ###
FROM app as test

# running --help and listing plugins
RUN bcftools --help && bcftools plugin -lv

# install wget for downloading test files
RUN apt-get update && apt-get install --no-install-recommends -y wget ca-certificates

RUN echo "downloading test SC2 BAM and FASTA and running bcftools mpileup and bcftools call test commands..." && \
wget -q https://raw.githubusercontent.com/artic-network/artic-ncov2019/master/primer_schemes/nCoV-2019/V4/SARS-CoV-2.reference.fasta && \
wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/tests/SARS-CoV-2/SRR13957123.primertrim.sorted.bam && \
bcftools mpileup -A -d 200 -B -Q 0 -f SARS-CoV-2.reference.fasta SRR13957123.primertrim.sorted.bam | \
bcftools call -mv -Ov -o SRR13957123.vcf

# FYI Test suite "make test" is performed in the builder stage since app and
# test stages do not include bcftools source code.
# This is to avoid having to re-download source code simply to run test suite
18 changes: 18 additions & 0 deletions bcftools/1.19/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# bcftools container

Main tool:

* [https://www.htslib.org/](https://www.htslib.org/)
* [GitHub](https://github.com/samtools/bcftools)

Additional tools:

* perl 5.34.0

## Example Usage

```bash
bcftools mpileup -A -d 200 -B -Q 0 -f {reference_genome} {bam} | bcftools call -mv -Ov -o bcftools_variants/{sample}.vcf
```

Better documentation can be found at [https://www.htslib.org/doc/bcftools.html](https://www.htslib.org/doc/bcftools.html)
85 changes: 85 additions & 0 deletions htslib/1.19/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# for easy upgrade later. ARG variables only persist during build time
ARG HTSLIB_VER="1.19"

FROM ubuntu:jammy as builder

ARG HTSLIB_VER

# install dependencies, cleanup apt garbage
# It's helpful when they're all listed on https://github.com/samtools/htslib/blob/develop/INSTALL
RUN apt-get update && apt-get install --no-install-recommends -y \
wget \
ca-certificates \
make \
bzip2 \
autoconf \
automake \
make \
gcc \
perl \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
libcurl4-gnutls-dev \
libssl-dev \
procps && \
rm -rf /var/lib/apt/lists/* && apt-get autoclean

# get htslib, compile, install, run test suite
RUN wget -q https://github.com/samtools/htslib/releases/download/${HTSLIB_VER}/htslib-${HTSLIB_VER}.tar.bz2 && \
tar -vxjf htslib-${HTSLIB_VER}.tar.bz2 && \
rm -v htslib-${HTSLIB_VER}.tar.bz2 && \
cd htslib-${HTSLIB_VER} && \
make && \
make install && \
make test

### start of app stage ###
FROM ubuntu:jammy as app

ARG HTSLIB_VER

LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="htslib"
LABEL software.version="${HTSLIB_VER}"
LABEL description="A C library for reading/writing high-throughput sequencing data"
LABEL website="https://github.com/samtools/htslib"
LABEL license="https://github.com/samtools/htslib/blob/develop/LICENSE"
LABEL maintainer="Erin Young"
LABEL maintainer.email="[email protected]"
LABEL maintainer2="Curtis Kapsak"
LABEL maintainer2.email="[email protected]"

# install runtime dependencies & cleanup apt garbage
# installed as recommend here: https://github.com/samtools/htslib/blob/develop/INSTALL#L31
RUN apt-get update && apt-get install --no-install-recommends -y \
bzip2 \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
libcurl4-gnutls-dev \
ca-certificates \
&& apt-get autoclean && rm -rf /var/lib/apt/lists/*

# copy in htslib executables from builder stage
COPY --from=builder /usr/local/bin/* /usr/local/bin/

# set locale settings for singularity compatibility
ENV LC_ALL=C

# set working directory
WORKDIR /data

# default command is to show help options
CMD ["htsfile", "--help"]

### start of test stage ###
FROM app as test

# check that these three executables are available
RUN bgzip --help && tabix --help && htsfile --help

# FYI Test suite "make test" now performed in the builder stage since app and
# test stages do not include htslib source code.
# This is to avoid having to re-download source code simply to run test suite
26 changes: 26 additions & 0 deletions htslib/1.19/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# htslib container

Main tool:

* [https://www.htslib.org/](https://www.htslib.org/)
* [GitHub](https://github.com/samtools/htslib)

Additional tools:

* perl 5.34.0

## Example Usage

```bash
# determine file formats for various BAM and SAM files
$ htsfile tests/SARS-CoV-2/SRR13957123.primertrim.sorted.bam
tests/SARS-CoV-2/SRR13957123.primertrim.sorted.bam: BAM version 1 compressed sequence data

$ htsfile ce_tag_padded.sam
ce_tag_padded.sam: SAM version 1.4 sequence text

# compresses sample.fastq to sample.fastq.gz in BGZF format (blocked GNU Zip Format)
$ bgzip sample.fastq
```

Better documentation can be found at [https://www.htslib.org/doc/samtools.html](https://www.htslib.org/doc/samtools.html)
90 changes: 90 additions & 0 deletions samtools/1.19/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
ARG SAMTOOLS_VER="1.19"

FROM ubuntu:jammy as builder

ARG SAMTOOLS_VER

# install dependencies required for compiling samtools
RUN apt-get update && apt-get install --no-install-recommends -y \
libncurses5-dev \
libbz2-dev \
liblzma-dev \
libcurl4-gnutls-dev \
zlib1g-dev \
libssl-dev \
gcc \
wget \
make \
perl \
bzip2 \
gnuplot \
ca-certificates

# download, compile, and install samtools
RUN wget https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VER}/samtools-${SAMTOOLS_VER}.tar.bz2 && \
tar -xjf samtools-${SAMTOOLS_VER}.tar.bz2 && \
cd samtools-${SAMTOOLS_VER} && \
./configure && \
make && \
make install

### start of app stage ###
FROM ubuntu:jammy as app

ARG SAMTOOLS_VER

LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="samtools"
LABEL software.version="${SAMTOOLS_VER}"
LABEL description="Tools (written in C using htslib) for manipulating next-generation sequencing data"
LABEL website="https://github.com/samtools/samtools"
LABEL license="https://github.com/samtools/samtools/blob/develop/LICENSE"
LABEL maintainer="Shelby Bennett"
LABEL maintainer.email="[email protected]"
LABEL maintainer2="Curtis Kapsak"
LABEL maintainer2.email="[email protected]"
LABEL maintainer3="Erin Young"
LABEL maintainer3.email="[email protected]"
LABEL maintainer4="Kutluhan Incekara"
LABEL maintainer4.email="[email protected]"

ARG DEBIAN_FRONTEND=noninteractive

# install dependencies required for running samtools
# 'gnuplot' required for plot-ampliconstats
RUN apt-get update && apt-get install --no-install-recommends -y \
perl \
zlib1g \
libncurses5 \
bzip2 \
liblzma-dev \
libcurl4-gnutls-dev \
gnuplot \
&& apt-get autoclean && rm -rf /var/lib/apt/lists/*

# copy in samtools executables from builder stage
COPY --from=builder /usr/local/bin/* /usr/local/bin/

ENV LC_ALL=C

# final working directory is /data
WORKDIR /data

# default command is to pull up help options
CMD ["samtools", "--help"]

### start of test stage ###
FROM app as test

# install wget for downloading test files
RUN apt-get update && apt-get install --no-install-recommends -y wget ca-certificates

RUN wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/tests/SARS-CoV-2/SRR13957123.consensus.fa && \
wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/tests/SARS-CoV-2/SRR13957123.primertrim.sorted.bam && \
wget -q https://raw.githubusercontent.com/artic-network/artic-ncov2019/master/primer_schemes/nCoV-2019/V3/nCoV-2019.primer.bed && \
samtools stats SRR13957123.primertrim.sorted.bam && \
samtools faidx SRR13957123.consensus.fa && \
samtools ampliconstats nCoV-2019.primer.bed SRR13957123.primertrim.sorted.bam > SRR13957123_ampliconstats.txt && \
plot-ampliconstats plot SRR13957123_ampliconstats.txt && \
ls
20 changes: 20 additions & 0 deletions samtools/1.19/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# samtools container

Main tool:

* [https://www.htslib.org/](https://www.htslib.org/)
* [GitHub](https://github.com/samtools/samtools)

Additional tools:

* perl 5.34.0

## Example Usage

```bash
samtools ampliconclip -b bed.file input.bam

samtools sort -T /tmp/aln.sorted -o aln.sorted.bam aln.bam
```

Better documentation can be found at [https://www.htslib.org/doc/samtools.html](https://www.htslib.org/doc/samtools.html)

0 comments on commit 1787fa4

Please sign in to comment.