From d0deed39b6b971508ef9dedbef1ca423c61c8d75 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 17 Aug 2021 11:59:29 -0500 Subject: [PATCH] Add minimap2 --- minimap_plus/README.md | 27 +++++++++++++ minimap_plus/minimap_plus.def | 74 +++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 minimap_plus/README.md create mode 100644 minimap_plus/minimap_plus.def diff --git a/minimap_plus/README.md b/minimap_plus/README.md new file mode 100644 index 0000000..4c3e25f --- /dev/null +++ b/minimap_plus/README.md @@ -0,0 +1,27 @@ +# minimap2 (plus goodies) + +[![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/minimap_plus) +[![minimap2 source](https://img.shields.io/static/v1?label=minimap2%20Source&message=GitHub&color=lightgrey&logo=github&style=flat-square)](https://github.com/lh3/minimap2) +[![Version 2.22](https://img.shields.io/static/v1?label=Latest%20version&message=2.22&color=yellowgreen&logo=linuxcontainers&style=flat-square)](https://cloud.sylabs.io/library/millironx/default/minimap_plus) +[![Docs](https://img.shields.io/static/v1?label=Docs&message=web&color=blue&style=flat-square)](https://lh3.github.io/minimap2/) +[![Alpine base](https://img.shields.io/static/v1?label=Base%20image&message=Alpine&color=0d597f&logo=alpinelinux&style=flat-square)](https://www.alpinelinux.org/) + +Minimap2 is a versatile sequence alignment program that aligns DNA or mRNA sequences against a large reference database. + +## Tools installed + +### minimap2 + +- `minimap2` + +### samtools + +- `samtools` + +### Perl + +- `perl` + +### samclip + +- `samclip` diff --git a/minimap_plus/minimap_plus.def b/minimap_plus/minimap_plus.def new file mode 100644 index 0000000..8f81aa1 --- /dev/null +++ b/minimap_plus/minimap_plus.def @@ -0,0 +1,74 @@ +Bootstrap: library +From: millironx/default/samtools:1.13 + +%post + # Get the actual dependencies + apk add --no-cache perl + + # Get the build dependencies + apk add --no-cache --virtual .build-deps musl-dev g++ make zlib-dev + + # Part 1: Install minimap2 + # ======================== + + # Make versioning easier + MINIMAP2_VERSION='2.22' + + # Download the source tarball and build + cd /tmp || exit 1 + wget https://github.com/lh3/minimap2/releases/download/v$MINIMAP2_VERSION/minimap2-$MINIMAP2_VERSION.tar.bz2 + tar xjvf minimap2-$MINIMAP2_VERSION.tar.bz2 + cd minimap2-$MINIMAP2_VERSION || exit 1 + make + install -D -m 0755 minimap2 -t /usr/bin + cd .. || exit 1 + rm -rf minimap2-$MINIMAP2_VERSION* + cd || exit 1 + + # Part 2: Install samclip + SAMCLIP_VERSION='0.4.0' + cd /usr/bin || exit 1 + wget https://raw.githubusercontent.com/tseemann/samclip/v$SAMCLIP_VERSION/samclip + chmod a+x samclip + 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 + test_command minimap2 + test_command samclip + + if [ -n "$FAILED_TESTS" ]; then + exit 1 + fi + +%runscript + minimap2 "$@" + +%labels + Author 25492070+MillironX@users.noreply.github.com + SoftwareVersion 2.22 + SingularityDefinitionVersion 1 + +%help + minimap2 + ======== + + Minimap2 is a versatile sequence alignment program that aligns DNA or mRNA + sequences against a large reference database. + + For more help, see + - + - + -