Add HTSlib image

This commit is contained in:
Thomas A. Christensen II 2021-09-07 09:47:43 -05:00
parent ed4bc3a895
commit 0362a4b037
Signed by: millironx
GPG key ID: 139C07724802BC5D
2 changed files with 70 additions and 0 deletions

13
htslib/README.md Normal file
View file

@ -0,0 +1,13 @@
# HTSLib
[![Container source](https://img.shields.io/static/v1?label=Container%20Source&message=GitHub&color=lightgrey&logo=github&style=flat-square)](https://github.com/MillironX/singularity-builds/tree/master/htslib)
[![VarScan source](https://img.shields.io/static/v1?label=HTSlib%20Source&message=GitHub&color=lightgrey&logo=github&style=flat-square)](https://github.com/samtools/htslib)
[![Version 1.13](https://img.shields.io/static/v1?label=Latest%20version&message=1.13&color=yellowgreen&logo=linuxcontainers&style=flat-square)](https://cloud.sylabs.io/library/millironx/default/htslib)
[![Docs](https://img.shields.io/static/v1?label=Docs&message=web&color=blue&style=flat-square)](https://www.htslib.org/)
[![Alpine base](https://img.shields.io/static/v1?label=Base%20image&message=Alpine&color=0d597f&logo=alpinelinux&style=flat-square)](https://www.alpinelinux.org/)
HTSlib is an implementation of a unified C library for accessing common file formats, such as SAM, CRAM and VCF, used for high-throughput sequencing data, and is the core library used by samtools and bcftools.
## Tools installed
none

57
htslib/htslib.def Normal file
View file

@ -0,0 +1,57 @@
Bootstrap: library
From: default/alpine:3.14.0
%post
# Get the actual dependencies
apk add --no-cache zlib bash
# Get the build dependencies
apk add --no-cache --virtual .build-deps musl-dev g++ make zlib-dev bzip2-dev xz-dev curl-dev
# Make versioning easier
HTSLIB_VERSION='1.13'
# Download the source tarball and build
cd /tmp || exit 1
wget https://github.com/samtools/htslib/releases/download/$HTSLIB_VERSION/htslib-$HTSLIB_VERSION.tar.bz2
tar xjvf htslib-$HTSLIB_VERSION.tar.bz2
cd htslib-$HTSLIB_VERSION || exit 1
make && make install
cd .. || exit 1
rm -rf htslib-$SAMTOOLS_VERSION*
cd || exit 1
# Cleanup build packages
apk del --no-cache .build-deps
%test
test_command () {
if ! command -v "${1}"; then
echo "command ${1} not found!"
export FAILED_TESTS=1
fi
}
test_command bash
test_command ps
if [ -n "$FAILED_TESTS" ]; then
exit 1
fi
%labels
Author 25492070+MillironX@users.noreply.github.com
SoftwareVersion 1.13
SingularityDefinitionVersion 1
%help
HTSlib
======
HTSlib is an implementation of a unified C library for accessing common file
formats, such as SAM, CRAM and VCF, used for high-throughput sequencing data,
and is the core library used by samtools and bcftools.
For more help, see
- <https://www.htslib.org>
- <https://github.com/MillironX/singularity-builds>