bioinformatics/vg:1.78.0
Version sha256.1e24bca9f068d91a831ac2e74a3b0dafba99f6f2c133d2dee0938b93ce5fdd22
Image size: 48.6 MB
For more on pulling from the registry, see the ilifu documentation.
First, once: add the registry and make it your default
singularity remote add --no-login idia-registry https://sregistry.idia.ac.za
singularity remote use idia-registry
If you added it before, as the ilifu docs describe, remote add says it already exists: just run remote use.
Log in, for a private collection
singularity remote login idia-registry
Paste a token from your token page when asked. Public collections need no login.
Pull the container
singularity pull library://bioinformatics/vg:1.78.0
Shell into the container
singularity shell library://bioinformatics/vg:1.78.0
Run the container
singularity run library://bioinformatics/vg:1.78.0
First, once: add the registry and make it your default
apptainer remote add --no-login idia-registry https://sregistry.idia.ac.za
apptainer remote use idia-registry
If you added it before, as the ilifu docs describe, remote add says it already exists: just run remote use.
Log in, for a private collection
apptainer remote login idia-registry
Paste a token from your token page when asked. Public collections need no login.
Pull the container
apptainer pull library://bioinformatics/vg:1.78.0
Shell into the container
apptainer shell library://bioinformatics/vg:1.78.0
Run the container
apptainer run library://bioinformatics/vg:1.78.0
vg 1.78.0 by the vg team (https://github.com/vgteam/vg).
This image packages the unmodified upstream v1.78.0 ("Sharptooth") static x86_64 release
binary. IDIA builds and maintains the image only; report vg bugs upstream
(https://github.com/vgteam/vg/issues, or the forum at https://www.biostars.org/tag/vg/).
Report image problems to support@ilifu.ac.za.
Usage:
singularity run vg_1.78.0.sif version
singularity exec vg_1.78.0.sif vg construct -r ref.fa -v variants.vcf.gz > graph.vg
singularity run --bind /path/to/indexes:/data vg_1.78.0.sif giraffe -t 8 \
-Z /data/graph.gbz -f reads.fq.gz > aligned.gam
No graphs, indexes or reference data are included. Bind your own with
--bind /host/path:/data. vg writes temporary files to $TMPDIR (default /tmp); point it
at scratch space for large indexing jobs.
Licence: vg's own code is under the MIT licence (/opt/vg/LICENSE). The static binary
also bundles third-party libraries (sdsl-lite, htslib, gbwt, gcsa2, elfutils, jemalloc
and others) under their own licences. sdsl-lite is GPL-3.0-or-later
(/opt/vg/LICENSE.sdsl-lite, full text in /opt/vg/LICENSE.GPL-3.0), so the binary as a
whole is distributed under the GPL-3.0-or-later terms: you may use it freely, but if you
redistribute it or a modified version you must do so under the GPL with corresponding
source. The corresponding source, with every bundled library's licence, is the upstream
archive vg-v1.78.0.tar.gz on https://github.com/vgteam/vg/releases/tag/v1.78.0.
Citation (from upstream's README):
vg: Garrison E et al. Nat Biotechnol 36:875-879 (2018), doi:10.1038/nbt.4227
vg giraffe: Siren J et al. Science 374:abg8871 (2021), doi:10.1126/science.abg8871
vg call (SVs): Hickey G et al. Genome Biol 21:35 (2020), doi:10.1186/s13059-020-1941-7
GBZ: Siren J, Paten B. Bioinformatics 38:5012-5018 (2022), doi:10.1093/bioinformatics/btac656
See https://github.com/vgteam/vg#citing-vg for the full list (long-read Giraffe,
deconstruct, snarls, haplotypes).
Bootstrap: docker
From: debian:13-slim
Stage: build
%post
export VG_VERSION=1.78.0
export VG_SHA256=5ddfee24c34f3656b0e71a5c2ffb65275781a7353d9147ae6b5d7323029c7799
export VG_LICENSE_SHA256=7c3fe1c48ef0594c8d6728353d9325b5f4335eceea5bda3734820d7478bdeaef
# sdsl-lite commit pinned as vg v1.78.0's deps/sdsl-lite submodule.
export SDSL_COMMIT=993857a820887787ddaf0ab678eca2d3ab30b741
export SDSL_COPYING_SHA256=40b26f0d6959e33102b4ed3c905e41f9366ef0479e68e4b76e2d170f4ebc0606
export GPL3_SHA256=fb981668c18a279e285fc4d83fba1e836cc84dd4daa73c9697d3cfd2d8aca6e0
export DEBIAN_FRONTEND=noninteractive
apt-get update -y
apt-get install -y --no-install-recommends ca-certificates curl
mkdir -p /tmp/dl /opt/vg/bin
cd /tmp/dl || exit 1
# Upstream's prebuilt, statically linked x86_64 release binary.
curl -fsSL -o vg "https://github.com/vgteam/vg/releases/download/v${VG_VERSION}/vg"
curl -fsSL -o LICENSE "https://raw.githubusercontent.com/vgteam/vg/v${VG_VERSION}/LICENSE"
curl -fsSL -o COPYING.sdsl-lite \
"https://raw.githubusercontent.com/vgteam/sdsl-lite/${SDSL_COMMIT}/COPYING"
# sdsl-lite's COPYING is only a GPL notice, so ship the full GPL-3.0 text as well.
curl -fsSL -o GPL-3.0.txt \
"https://raw.githubusercontent.com/spdx/license-list-data/v3.28.0/text/GPL-3.0-or-later.txt"
printf '%s vg\n%s LICENSE\n%s COPYING.sdsl-lite\n%s GPL-3.0.txt\n' \
"${VG_SHA256}" "${VG_LICENSE_SHA256}" "${SDSL_COPYING_SHA256}" "${GPL3_SHA256}" \
| sha256sum -c - || exit 1
# NOTE: not stripped on purpose. vg prints symbolised stack traces (backward-cpp) on a
# crash, which upstream asks for in bug reports, and we ship the binary unmodified.
install -m 0755 vg /opt/vg/bin/vg
install -m 0644 LICENSE /opt/vg/LICENSE
install -m 0644 COPYING.sdsl-lite /opt/vg/LICENSE.sdsl-lite
install -m 0644 GPL-3.0.txt /opt/vg/LICENSE.GPL-3.0
cd / || exit 1
rm -rf /tmp/dl
Bootstrap: docker
From: debian:13-slim
Stage: final
%files from build
/opt/vg /opt/vg
%environment
export PATH=/opt/vg/bin:$PATH
%labels
Maintainer IDIA <support@ilifu.ac.za>
Version 1.78.0
Source https://github.com/vgteam/vg
License MIT AND GPL-3.0-or-later (vg is MIT; the static binary bundles GPL-3.0-or-later sdsl-lite and other third-party libraries)
Authors The vg team (https://github.com/vgteam) and contributors; original author Erik Garrison
%help
vg 1.78.0 by the vg team (https://github.com/vgteam/vg).
This image packages the unmodified upstream v1.78.0 ("Sharptooth") static x86_64 release
binary. IDIA builds and maintains the image only; report vg bugs upstream
(https://github.com/vgteam/vg/issues, or the forum at https://www.biostars.org/tag/vg/).
Report image problems to support@ilifu.ac.za.
Usage:
singularity run vg_1.78.0.sif version
singularity exec vg_1.78.0.sif vg construct -r ref.fa -v variants.vcf.gz > graph.vg
singularity run --bind /path/to/indexes:/data vg_1.78.0.sif giraffe -t 8 \
-Z /data/graph.gbz -f reads.fq.gz > aligned.gam
No graphs, indexes or reference data are included. Bind your own with
--bind /host/path:/data. vg writes temporary files to $TMPDIR (default /tmp); point it
at scratch space for large indexing jobs.
Licence: vg's own code is under the MIT licence (/opt/vg/LICENSE). The static binary
also bundles third-party libraries (sdsl-lite, htslib, gbwt, gcsa2, elfutils, jemalloc
and others) under their own licences. sdsl-lite is GPL-3.0-or-later
(/opt/vg/LICENSE.sdsl-lite, full text in /opt/vg/LICENSE.GPL-3.0), so the binary as a
whole is distributed under the GPL-3.0-or-later terms: you may use it freely, but if you
redistribute it or a modified version you must do so under the GPL with corresponding
source. The corresponding source, with every bundled library's licence, is the upstream
archive vg-v1.78.0.tar.gz on https://github.com/vgteam/vg/releases/tag/v1.78.0.
Citation (from upstream's README):
vg: Garrison E et al. Nat Biotechnol 36:875-879 (2018), doi:10.1038/nbt.4227
vg giraffe: Siren J et al. Science 374:abg8871 (2021), doi:10.1126/science.abg8871
vg call (SVs): Hickey G et al. Genome Biol 21:35 (2020), doi:10.1186/s13059-020-1941-7
GBZ: Siren J, Paten B. Bioinformatics 38:5012-5018 (2022), doi:10.1093/bioinformatics/btac656
See https://github.com/vgteam/vg#citing-vg for the full list (long-read Giraffe,
deconstruct, snarls, haplotypes).
%runscript
exec vg "$@"
%test
export PATH=/opt/vg/bin:$PATH
vg version | grep -q '^vg version v1\.78\.0' || exit 1
workdir=$(mktemp -d) || exit 1
cat > "$workdir/ref.fa" <<'EOF'
>chr1
ACGTACGTTAGCTAGCTAGGCTAGCATCGATCGATCGATGCATGCATCGATCGTAGCTAGCTAGCATGCA
EOF
vg construct -r "$workdir/ref.fa" > "$workdir/graph.vg" || exit 1
vg stats -l "$workdir/graph.vg" | grep -q '^length 70$' || exit 1
rm -rf "$workdir"
Download bioinformatics-vg_1.78.0.def
#!/bin/sh
exec vg "$@"
#!/bin/sh
export PATH=/opt/vg/bin:$PATH
vg version | grep -q '^vg version v1\.78\.0' || exit 1
workdir=$(mktemp -d) || exit 1
cat > "$workdir/ref.fa" <<'EOF'
>chr1
ACGTACGTTAGCTAGCTAGGCTAGCATCGATCGATCGATGCATGCATCGATCGTAGCTAGCTAGCATGCA
EOF
vg construct -r "$workdir/ref.fa" > "$workdir/graph.vg" || exit 1
vg stats -l "$workdir/graph.vg" | grep -q '^length 70$' || exit 1
rm -rf "$workdir"
# /.singularity.d/env/10-docker2singularity.sh
#!/bin/sh
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow
export PATH=/opt/vg/bin:$PATH