From 2a507ba0cbb545e91238dbf800b48b3fca170f3b Mon Sep 17 00:00:00 2001 From: Erin Young Date: Wed, 25 Sep 2024 18:17:14 +0000 Subject: [PATCH] adding samtools version 1.21 --- README.md | 2 +- samtools/1.21/Dockerfile | 100 +++++++++++++++++++++++++++++++++++++++ samtools/1.21/README.md | 30 ++++++++++++ 3 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 samtools/1.21/Dockerfile create mode 100644 samtools/1.21/README.md diff --git a/README.md b/README.md index bda448883..ef2fc5c8e 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ To learn more about the docker pull rate limits and the open source software pro | [bakta](https://hub.docker.com/r/staphb/bakta)
[![docker pulls](https://badgen.net/docker/pulls/staphb/bakta)](https://hub.docker.com/r/staphb/bakta) | | https://github.com/oschwengers/bakta | | [bandage](https://hub.docker.com/r/staphb/bandage)
[![docker pulls](https://badgen.net/docker/pulls/staphb/bandage)](https://hub.docker.com/r/staphb/bandage) | | https://rrwick.github.io/Bandage/ | | [BBTools](https://hub.docker.com/r/staphb/bbtools/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/bbtools)](https://hub.docker.com/r/staphb/bbtools) | | https://jgi.doe.gov/data-and-tools/bbtools/ | -| [bcftools](https://hub.docker.com/r/staphb/bcftools/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/bcftools)](https://hub.docker.com/r/staphb/bcftools) | | https://github.com/samtools/bcftools | +| [bcftools](https://hub.docker.com/r/staphb/bcftools/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/bcftools)](https://hub.docker.com/r/staphb/bcftools) | | https://github.com/samtools/bcftools | | [bedtools](https://hub.docker.com/r/staphb/bedtools/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/bedtools)](https://hub.docker.com/r/staphb/bedtools) | | https://bedtools.readthedocs.io/en/latest/
https://github.com/arq5x/bedtools2 | | [berrywood-report-env](https://hub.docker.com/r/staphb/berrywood-report-env/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/berrywood-report-env)](https://hub.docker.com/r/staphb/berrywood-report-env) | | none | | [blast+](https://hub.docker.com/r/staphb/blast/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/blast)](https://hub.docker.com/r/staphb/blast) | | https://www.ncbi.nlm.nih.gov/books/NBK279690/ | diff --git a/samtools/1.21/Dockerfile b/samtools/1.21/Dockerfile new file mode 100644 index 000000000..8b7be7bd7 --- /dev/null +++ b/samtools/1.21/Dockerfile @@ -0,0 +1,100 @@ +ARG SAMTOOLS_VER="1.21" + +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 \ + libdeflate-dev \ + gcc \ + wget \ + make \ + perl \ + bzip2 \ + gnuplot \ + ca-certificates + +# download, compile, and install samtools +RUN wget -q 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 && \ + make test + +### 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="shelby.bennett@dgs.virginia.gov" +LABEL maintainer2="Curtis Kapsak" +LABEL maintainer2.email="kapsakcj@gmail.com" +LABEL maintainer3="Erin Young" +LABEL maintainer3.email="eriny@utah.gov" +LABEL maintainer4="Kutluhan Incekara" +LABEL maintainer4.email="kutluhan.incekara@ct.gov" + +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 \ + liblzma5 \ + libcurl3-gnutls \ + libdeflate0 \ + 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 + +ARG SAMTOOLS_VER + +# check PATH +RUN samtools --help + +# install make and wget for downloading test files +RUN apt-get update && apt-get install --no-install-recommends -y wget ca-certificates + +WORKDIR /test + +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 diff --git a/samtools/1.21/README.md b/samtools/1.21/README.md new file mode 100644 index 000000000..1317ccb5d --- /dev/null +++ b/samtools/1.21/README.md @@ -0,0 +1,30 @@ +# samtools container + +Main tool: [samtools](https://www.htslib.org/) + +Code repository: https://github.com/samtools/samtools + +Additional tools: + +* perl 5.34.0 + +Basic information on how to use this tool: +- executable: samtools +- help: --help +- version: --version +- description: Utilities for the Sequence Alignment/Map (SAM) format + +Additional information: + +This container includes samtools v1.20 compiled with **libdeflate** for a better cloud performance. + +Full documentation: https://www.htslib.org/doc/samtools.html + +## Example Usage + +```bash +samtools ampliconclip -b bed.file input.bam + +samtools sort -T /tmp/aln.sorted -o aln.sorted.bam aln.bam +``` +