Add Samtools

julia_bam-readcounts
parent cd967e5d0a
commit 27208e9755
Signed by: millironx
GPG Key ID: 139C07724802BC5D

@ -0,0 +1,15 @@
# Samtools
[![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/samtools)
[![VarScan source](https://img.shields.io/static/v1?label=Samtools%20Source&message=GitHub&color=lightgrey&logo=github&style=flat-square)](https://github.com/samtools/samtools)
[![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/samtools)
[![Docs](https://img.shields.io/static/v1?label=Docs&message=man/web&color=blue&style=flat-square)](https://www.htslib.org/doc/samtools.html)
[![Alpine base](https://img.shields.io/static/v1?label=Base%20image&message=Alpine&color=0d597f&logo=alpinelinux&style=flat-square)](https://www.alpinelinux.org/)
Samtools is a set of utilities that manipulate alignments in the SAM (Sequence Alignment/Map), BAM, and CRAM formats. It converts between the formats, does sorting, merging and indexing, and can retrieve reads in any regions swiftly.
## Tools installed
### samtools
- `samtools`

@ -0,0 +1,63 @@
Bootstrap: library
From: default/alpine:3.14.0
%post
# Get the actual dependencies
apk add --no-cache ncurses libbz2 xz zlib bash
# Get the build dependencies
apk add --no-cache --virtual .build-deps ncurses-dev musl-dev g++ make zlib-dev bzip2-dev xz-dev
# Make versioning easier
SAMTOOLS_VERSION='1.13'
# Download the source tarball and build
cd /tmp || exit 1
wget https://github.com/samtools/samtools/releases/download/$SAMTOOLS_VERSION/samtools-$SAMTOOLS_VERSION.tar.bz2
tar xjvf samtools-$SAMTOOLS_VERSION.tar.bz2
cd samtools-$SAMTOOLS_VERSION || exit 1
./configure
make && make install
cd .. || exit 1
rm -rf samtools-$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
test_command samtools
if [ -n "$FAILED_TESTS" ]; then
exit 1
fi
%runscript
samtools "$@"
%labels
Author 25492070+MillironX@users.noreply.github.com
SoftwareVersion 1.13
SingularityDefinitionVersion 1
%help
Samtools
========
Samtools is a set of utilities that manipulate alignments in the SAM
(Sequence Alignment/Map), BAM, and CRAM formats. It converts between the
formats, does sorting, merging and indexing, and can retrieve reads in any
regions swiftly.
For more help, see
- <https://www.htslib.org/doc/samtools.html>
- <https://github.com/MillironX/singularity-builds>
Loading…
Cancel
Save