bioinformatics/panpatch:0.3
Version sha256.eb19e3bbfc04e5eecd5a5e2ece2a00c13ca3fd6e7d9de7f9c55d5dc479ebe570
Image size: 3.7 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/panpatch:0.3
Shell into the container
singularity shell library://bioinformatics/panpatch:0.3
Run the container
singularity run library://bioinformatics/panpatch:0.3
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/panpatch:0.3
Shell into the container
apptainer shell library://bioinformatics/panpatch:0.3
Run the container
apptainer run library://bioinformatics/panpatch:0.3
panpatch 0.3 by Glenn Hickey (https://github.com/glennhickey/panpatch).
This image packages the unmodified upstream v0.3 static x86_64 release binary. IDIA
builds and maintains the image only; report panpatch bugs upstream
(https://github.com/glennhickey/panpatch/issues). Report image problems to
support@ilifu.ac.za.
panpatch uses a Minigraph-Cactus pangenome graph (built with --chrom-vg full) to patch
gaps in, and scaffold, slightly fragmented assemblies into T2T chromosomes. Minigraph-
Cactus is not in this image.
Usage:
singularity run panpatch_0.3.sif --help
cd /path/to/graphs
singularity run panpatch_0.3.sif \
*.full.vg -r REF_SAMPLE -p -s TARGET_SAMPLE -s DONOR_SAMPLE \
--bed patched.bed -f patched > patched.report 2> patched.stderr
The *.full.vg glob is expanded by your host shell, so run it in the graphs directory
(the current directory is bound by default) or name each file. -f takes a prefix and
writes one FASTA per haplotype: patched.hap1.fa, patched.hap2.fa, ...
No graphs or assemblies are included. Bind your own with --bind /host/path:/data.
The base is busybox, so the image has a POSIX shell and basic tools for small
pipelines.
Licence: panpatch itself is under the MIT licence (/opt/panpatch/LICENSE). The static
binary also includes third-party libraries (libbdsg, libhandlegraph, sdsl-lite and
others, via libbdsg-easy) under their own licences; their texts and sources are in the
upstream source archive panpatch-src-v0.3.tar.gz on
https://github.com/glennhickey/panpatch/releases/tag/v0.3.
Citation: upstream doesn't give one yet. Cite the repository URL and version.
Bootstrap: docker
From: debian:13-slim
Stage: build
%post
export PANPATCH_VERSION=0.3
export PANPATCH_SHA256=6bd3d9408ffff64522e0e564613188b91604e7fb095afdd896fc7b1c0e88d090
export PANPATCH_LICENSE_SHA256=100cb99a56071dbb7493ffb5622ce7a431959220c07e168bcec10ffadfc4121e
export DEBIAN_FRONTEND=noninteractive
apt-get update -y
apt-get install -y --no-install-recommends ca-certificates curl
mkdir -p /tmp/dl /opt/panpatch/bin
cd /tmp/dl || exit 1
# Upstream's prebuilt, statically linked x86_64 release binary.
curl -fsSL -o panpatch "https://github.com/glennhickey/panpatch/releases/download/v${PANPATCH_VERSION}/panpatch"
curl -fsSL -o LICENSE "https://raw.githubusercontent.com/glennhickey/panpatch/v${PANPATCH_VERSION}/LICENSE"
printf '%s panpatch\n%s LICENSE\n' "${PANPATCH_SHA256}" "${PANPATCH_LICENSE_SHA256}" | sha256sum -c - || exit 1
# NOTE: not stripped on purpose, so the image ships the upstream binary byte for byte
# (it is only 4.4 MB).
install -m 0755 panpatch /opt/panpatch/bin/panpatch
install -m 0644 LICENSE /opt/panpatch/LICENSE
cd / || exit 1
rm -rf /tmp/dl
Bootstrap: docker
From: busybox:1.37
Stage: final
%files from build
/opt/panpatch /opt/panpatch
%environment
export PATH=/opt/panpatch/bin:$PATH
%labels
Maintainer IDIA <support@ilifu.ac.za>
Version 0.3
Source https://github.com/glennhickey/panpatch
License MIT (panpatch itself); statically linked third-party libraries carry their own licences
Authors Glenn Hickey (https://github.com/glennhickey)
%help
panpatch 0.3 by Glenn Hickey (https://github.com/glennhickey/panpatch).
This image packages the unmodified upstream v0.3 static x86_64 release binary. IDIA
builds and maintains the image only; report panpatch bugs upstream
(https://github.com/glennhickey/panpatch/issues). Report image problems to
support@ilifu.ac.za.
panpatch uses a Minigraph-Cactus pangenome graph (built with --chrom-vg full) to patch
gaps in, and scaffold, slightly fragmented assemblies into T2T chromosomes. Minigraph-
Cactus is not in this image.
Usage:
singularity run panpatch_0.3.sif --help
cd /path/to/graphs
singularity run panpatch_0.3.sif \
*.full.vg -r REF_SAMPLE -p -s TARGET_SAMPLE -s DONOR_SAMPLE \
--bed patched.bed -f patched > patched.report 2> patched.stderr
The *.full.vg glob is expanded by your host shell, so run it in the graphs directory
(the current directory is bound by default) or name each file. -f takes a prefix and
writes one FASTA per haplotype: patched.hap1.fa, patched.hap2.fa, ...
No graphs or assemblies are included. Bind your own with --bind /host/path:/data.
The base is busybox, so the image has a POSIX shell and basic tools for small
pipelines.
Licence: panpatch itself is under the MIT licence (/opt/panpatch/LICENSE). The static
binary also includes third-party libraries (libbdsg, libhandlegraph, sdsl-lite and
others, via libbdsg-easy) under their own licences; their texts and sources are in the
upstream source archive panpatch-src-v0.3.tar.gz on
https://github.com/glennhickey/panpatch/releases/tag/v0.3.
Citation: upstream doesn't give one yet. Cite the repository URL and version.
%runscript
exec panpatch "$@"
%test
export PATH=/opt/panpatch/bin:$PATH
# panpatch has no --version. --help prints its usage to stderr and exits 0. Checking
# for an option added in v0.3 shows this is the release we expect.
help_text=$(panpatch --help 2>&1) || exit 1
echo "$help_text" | grep -q 'Use a pangenome alignment' || exit 1
echo "$help_text" | grep -q -- '--flank-window' || exit 1
# No arguments: usage, and a non-zero exit.
if panpatch > /dev/null 2>&1; then
exit 1
fi
Download bioinformatics-panpatch_0.3.def
#!/bin/sh
exec panpatch "$@"
#!/bin/sh
export PATH=/opt/panpatch/bin:$PATH
# panpatch has no --version. --help prints its usage to stderr and exits 0. Checking
# for an option added in v0.3 shows this is the release we expect.
help_text=$(panpatch --help 2>&1) || exit 1
echo "$help_text" | grep -q 'Use a pangenome alignment' || exit 1
echo "$help_text" | grep -q -- '--flank-window' || exit 1
# No arguments: usage, and a non-zero exit.
if panpatch > /dev/null 2>&1; then
exit 1
fi
# /.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/panpatch/bin:$PATH