bioinformatics/snvstory:3.0.2
Version sha256.cd08dafcf7e7d89da326772c38052504eaa8e1dbcce3b47e038dc6df64803b7b
Image size: 402.4 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/snvstory:3.0.2
Shell into the container
singularity shell library://bioinformatics/snvstory:3.0.2
Run the container
singularity run library://bioinformatics/snvstory:3.0.2
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/snvstory:3.0.2
Shell into the container
apptainer shell library://bioinformatics/snvstory:3.0.2
Run the container
apptainer run library://bioinformatics/snvstory:3.0.2
SNVstory 3.0.2 (IGM Churchill Ancestry), from Nationwide Children's Hospital. Infers
genetic ancestry from germline variants in a VCF.
The model resources aren't in the image. Download them once with
aws s3 sync s3://igm-public-dropbox/snvstory/resource_dir/ resource_dir/ --no-sign-request
(the image has the AWS CLI: singularity exec snvstory_3.0.2.sif aws ...).
Usage:
singularity run snvstory_3.0.2.sif --path input.vcf.gz --resource /path/to/resource_dir \
--output-dir output_dir --genome-ver 38 --mode WES
Documentation: https://github.com/nch-igm/snvstory
Bootstrap: docker
From: continuumio/miniconda3:4.8.2
%labels
Maintainer IDIA <support@ilifu.ac.za>
Version 3.0.2
Commit 10cbd69b4a316f5d964533ae5bdcc80b13c84759
Source https://github.com/nch-igm/snvstory
%help
SNVstory 3.0.2 (IGM Churchill Ancestry), from Nationwide Children's Hospital. Infers
genetic ancestry from germline variants in a VCF.
The model resources aren't in the image. Download them once with
aws s3 sync s3://igm-public-dropbox/snvstory/resource_dir/ resource_dir/ --no-sign-request
(the image has the AWS CLI: singularity exec snvstory_3.0.2.sif aws ...).
Usage:
singularity run snvstory_3.0.2.sif --path input.vcf.gz --resource /path/to/resource_dir \
--output-dir output_dir --genome-ver 38 --mode WES
Documentation: https://github.com/nch-igm/snvstory
%environment
export PATH=/opt/conda/bin:${PATH}
export LC_ALL=C
export NUMBA_VERSION=0.48
export PYTHONPATH=/opt/Ancestry
export TMP_DIR=/data
# umap's numba functions are cached on disk, by default next to their source in
# site-packages, which is read-only in the image ("cannot cache function 'rdist': no
# locator available"). Per user, so users sharing a node don't collide.
NUMBA_CACHE_DIR="${NUMBA_CACHE_DIR:-${TMPDIR:-/tmp}/numba-cache-$(id -u)}"
export NUMBA_CACHE_DIR
%post
# Follows the upstream Dockerfile at this commit, cloning the source instead of COPYing it.
SNVSTORY_COMMIT=10cbd69b4a316f5d964533ae5bdcc80b13c84759
export PATH=/opt/conda/bin:${PATH}
export NUMBA_VERSION=0.48
# NOTE: pip, where upstream uses `conda install -c conda-forge` with the same pins. That
# 2020 conda's solve against today's conda-forge didn't finish on the CI runner before
# GitHub shut it down. pip gets the same versions as wheels for this image's Python 3.7;
# numba and llvmlite are pinned to the 0.48 that NUMBA_VERSION names, since pip would
# otherwise pick a numba that wants a newer numpy. python-dateutil and PyYAML are pinned
# below what requirements.txt's botocore (<3.0) and awscli (<5.5) accept; unpinned, pip
# takes dateutil 3.0.0 and PyYAML 6.
pip install --no-cache-dir \
matplotlib==3.2.1 xgboost==1.0.2 \
pandas==1.0.1 numpy==1.18.1 \
scipy==1.4.1 umap-learn==0.4.2 \
scikit-learn==0.24.1 \
bokeh==2.4.3 \
numba==0.48.0 llvmlite==0.31.0 \
python-dateutil==2.8.2 PyYAML==5.4.1
# NOTE: no apt-get. The base is Debian buster, whose mirrors now 404 (it moved to
# archive.debian.org), and the base image already has git.
git clone https://github.com/nch-igm/snvstory.git /tmp/snvstory
git -C /tmp/snvstory checkout "${SNVSTORY_COMMIT}"
mkdir -p /opt/Ancestry
pip install --no-cache-dir -r /tmp/snvstory/requirements.txt
mv /tmp/snvstory/igm_churchill_ancestry /opt/Ancestry/igm_churchill_ancestry
rm -rf /tmp/snvstory
%runscript
# PYTHONPATH (in %environment) finds the module, so relative paths stay the user's.
exec python3 -m igm_churchill_ancestry "$@"
%test
python3 -m igm_churchill_ancestry --help
Download bioinformatics-snvstory_3.0.2.def
#!/bin/sh
# PYTHONPATH (in %environment) finds the module, so relative paths stay the user's.
exec python3 -m igm_churchill_ancestry "$@"
#!/bin/sh
python3 -m igm_churchill_ancestry --help
# /.singularity.d/env/10-docker2singularity.sh
#!/bin/sh
export PATH="/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export LANG="${LANG:-"C.UTF-8"}"
export LC_ALL="${LC_ALL:-"C.UTF-8"}"
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow
export PATH=/opt/conda/bin:${PATH}
export LC_ALL=C
export NUMBA_VERSION=0.48
export PYTHONPATH=/opt/Ancestry
export TMP_DIR=/data
# umap's numba functions are cached on disk, by default next to their source in
# site-packages, which is read-only in the image ("cannot cache function 'rdist': no
# locator available"). Per user, so users sharing a node don't collide.
NUMBA_CACHE_DIR="${NUMBA_CACHE_DIR:-${TMPDIR:-/tmp}/numba-cache-$(id -u)}"
export NUMBA_CACHE_DIR