Skip to content

Commit 3e3785a

Browse files
erinyoungKincekara
andauthored
updating htslib to 1.21 (#1060)
* updating htslib to 1.21 * Update README.md v.1.20 -> v.1.21 --------- Co-authored-by: Kutluhan Incekara <46578029+Kincekara@users.noreply.github.com>
1 parent 79c98a6 commit 3e3785a

File tree

3 files changed

+133
-1
lines changed

3 files changed

+133
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ To learn more about the docker pull rate limits and the open source software pro
177177
| [heatcluster](https://hub.docker.com/r/staphb/heatcluster) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/heatcluster)](https://hub.docker.com/r/staphb/heatcluster) | <ul><li>[1.0.2c](./heatcluster/1.0.2c/)</li></ul> | https://github.com/DrB-S/heatcluster/tree/main |
178178
| [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><li>[3.4](./hmmer/3.4/)</li></ul> | http://hmmer.org/ |
179179
| [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/ |
180-
| [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><li>[1.20](./htslib/1.20/)</li><li>[1.20.c](./htslib/1.20.c/)</li></ul> | https://www.htslib.org/ |
180+
| [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><li>[1.20](./htslib/1.20/)</li><li>[1.20.c](./htslib/1.20.c/)</li><li>[1.21](./htslib/1.21/)</li></ul> | https://www.htslib.org/ |
181181
| [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/ |
182182
| [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><li>[2.2.2.7](iqtree2/2.2.2.7/)</li><li>[2.3.1](iqtree2/2.3.1/)</li><li>[2.3.4](iqtree2/2.3.4/)</li></ul> | http://www.iqtree.org/ |
183183
| [IPA](https://hub.docker.com/r/staphb/pbipa) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/pbipa)](https://hub.docker.com/r/staphb/pbipa) | <ul><li>[1.8.0](./pbipa/1.8.0/)</li></ul> | https://github.com/PacificBiosciences/pbipa |

htslib/1.21/Dockerfile

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# for easy upgrade later. ARG variables only persist during build time
2+
ARG HTSLIB_VER="1.21"
3+
4+
FROM ubuntu:jammy as builder
5+
6+
ARG HTSLIB_VER
7+
8+
# install dependencies, cleanup apt garbage
9+
# It's helpful when they're all listed on https://github.com/samtools/htslib/blob/develop/INSTALL
10+
RUN apt-get update && apt-get install --no-install-recommends -y \
11+
wget \
12+
ca-certificates \
13+
make \
14+
bzip2 \
15+
autoconf \
16+
automake \
17+
make \
18+
gcc \
19+
perl \
20+
zlib1g-dev \
21+
libbz2-dev \
22+
liblzma-dev \
23+
libcurl4-gnutls-dev \
24+
libssl-dev \
25+
libdeflate-dev \
26+
procps && \
27+
rm -rf /var/lib/apt/lists/* && apt-get autoclean
28+
29+
# get htslib, compile, install, run test suite
30+
RUN wget -q https://github.com/samtools/htslib/releases/download/${HTSLIB_VER}/htslib-${HTSLIB_VER}.tar.bz2 && \
31+
tar -vxjf htslib-${HTSLIB_VER}.tar.bz2 && \
32+
rm -v htslib-${HTSLIB_VER}.tar.bz2 && \
33+
cd htslib-${HTSLIB_VER} && \
34+
./configure && \
35+
make && \
36+
make install && \
37+
make test
38+
39+
### start of app stage ###
40+
FROM ubuntu:jammy as app
41+
42+
ARG HTSLIB_VER
43+
44+
LABEL base.image="ubuntu:jammy"
45+
LABEL dockerfile.version="1"
46+
LABEL software="htslib"
47+
LABEL software.version="${HTSLIB_VER}"
48+
LABEL description="A C library for reading/writing high-throughput sequencing data"
49+
LABEL website="https://github.com/samtools/htslib"
50+
LABEL license="https://github.com/samtools/htslib/blob/develop/LICENSE"
51+
LABEL maintainer="Erin Young"
52+
LABEL maintainer.email="eriny@utah.gov"
53+
LABEL maintainer2="Curtis Kapsak"
54+
LABEL maintainer2.email="kapsakcj@gmail.com"
55+
56+
# install runtime dependencies & cleanup apt garbage
57+
# installed as recommend here: https://github.com/samtools/htslib/blob/develop/INSTALL#L31
58+
RUN apt-get update && apt-get install --no-install-recommends -y \
59+
bzip2 \
60+
zlib1g \
61+
libbz2-1.0 \
62+
liblzma5 \
63+
libcurl3-gnutls \
64+
libdeflate0 \
65+
ca-certificates \
66+
&& apt-get autoclean && rm -rf /var/lib/apt/lists/*
67+
68+
# copy in htslib executables from builder stage
69+
COPY --from=builder /usr/local/bin/* /usr/local/bin/
70+
COPY --from=builder /usr/local/lib/ /usr/local/lib/
71+
COPY --from=builder /usr/local/include/ /usr/local/include/
72+
73+
# set locale settings for singularity compatibility
74+
ENV LC_ALL=C
75+
76+
# set working directory
77+
WORKDIR /data
78+
79+
# default command is to show help options
80+
CMD ["htsfile", "--help"]
81+
82+
### start of test stage ###
83+
FROM app as test
84+
85+
# check that these three executables are available
86+
RUN bgzip --help && tabix --help && htsfile --help
87+
88+
RUN apt-get update && apt-get install --no-install-recommends -y wget
89+
90+
# use on actual files
91+
RUN wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_1.fastq.gz && \
92+
gunzip SRR13957123_1.fastq.gz && \
93+
bgzip SRR13957123_1.fastq
94+
95+
# FYI Test suite "make test" now performed in the builder stage since app and
96+
# test stages do not include htslib source code.
97+
# This is to avoid having to re-download source code simply to run test suite

htslib/1.21/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# htslib container
2+
3+
Main tool: [htslib](https://www.htslib.org/)
4+
5+
Code repository: https://github.com/samtools/htslib
6+
7+
Additional tools:
8+
9+
* perl 5.34.0
10+
11+
Basic information on how to use this tool:
12+
- executable: htsfile
13+
- help: --help
14+
- version: --version
15+
- description: The htsfile utility attempts to identify what kind of high-throughput sequencing data files the specified files are, and provides minimal viewing capabilities for some kinds of data file.
16+
17+
Additional information:
18+
19+
This container includes htslib v1.21 compiled with **libdeflate** for a better cloud performance.
20+
21+
Full documentation: https://www.htslib.org/doc/samtools.html
22+
23+
## Example Usage
24+
25+
```bash
26+
# determine file formats for various BAM and SAM files
27+
$ htsfile tests/SARS-CoV-2/SRR13957123.primertrim.sorted.bam
28+
tests/SARS-CoV-2/SRR13957123.primertrim.sorted.bam: BAM version 1 compressed sequence data
29+
30+
$ htsfile ce_tag_padded.sam
31+
ce_tag_padded.sam: SAM version 1.4 sequence text
32+
33+
# compresses sample.fastq to sample.fastq.gz in BGZF format (blocked GNU Zip Format)
34+
$ bgzip sample.fastq
35+
```

0 commit comments

Comments
 (0)