bioinformatics/indelible:1.1.3
Version sha256.a95f1c6646e5a03d5c5e7516e1c6f9cc2fb2a81c8b20910758f632fcc67d61d8
Image size: 202.2 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/indelible:1.1.3
Shell into the container
singularity shell library://bioinformatics/indelible:1.1.3
Run the container
singularity run library://bioinformatics/indelible:1.1.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/indelible:1.1.3
Shell into the container
apptainer shell library://bioinformatics/indelible:1.1.3
Run the container
apptainer run library://bioinformatics/indelible:1.1.3
InDelible 1.1.3 by Alejandro Sifrim, Eugene Gardner and the Hurles group, Wellcome Sanger Institute (https://github.com/HurlesGroupSanger/indelible).
This image packages the unmodified upstream v1.1.3 release. IDIA builds and maintains the
image only; report bugs in InDelible itself at
https://github.com/HurlesGroupSanger/indelible/issues. The full documentation is upstream's
README, also in the image at /opt/indelible/src/README.md.
InDelible is licensed under the GNU GPL v3; the licence text is in /opt/indelible/LICENSE.
The annotation data shipped with it (Ensembl exons, ExAC constraint, HGNC genes, DDG2P,
the InDelible allele-frequency database) is upstream's, from data_hg19.zip and
data_hg38.zip, and the third-party resources in it keep their own terms.
If you use InDelible, upstream asks you to cite:
Gardner EJ, Sifrim A, Lindsay SJ, et al. Detecting cryptic clinically relevant
structural variation in exome-sequencing data increases diagnostic yield for
developmental disorders. Am J Hum Genet 108(11), 2186-2194 (2021).
https://doi.org/10.1016/j.ajhg.2021.09.010
Contents:
/opt/indelible/src indelible.py and its package (on PATH as indelible.py)
/opt/indelible/data/hg19 upstream's GRCh37 data, with the repeats BLAST database built
/opt/indelible/data/hg38 upstream's GRCh38 data, likewise
/opt/indelible/config.hg19.yml, config.hg38.yml
upstream's example configs, pointed at the data above.
Copy one out and edit it to change parameters.
Python 3.7 with upstream's pinned packages (scikit-learn 0.21.3, which the bundled random
forest needs, pandas 0.25.1, pysam 0.18.0, Biopython 1.74...) is in /opt/indelible/venv.
The helper tools come from Debian 12: bwa 0.7.17, BLAST+ 2.12.0, bedtools 2.30.0 and
tabix/bgzip (htslib 1.16).
The reference genome is not included. Bind in your own FASTA (GRCh37 hs37d5 or GRCh38),
with its .fai and a bwa index next to it, and your BAM/CRAM files, e.g. with -B /scratch.
Usage (the runscript is indelible.py):
singularity run -B /scratch indelible.sif complete \
--config /opt/indelible/config.hg38.yml \
--i /scratch/proband.cram --m /scratch/mother.cram --p /scratch/father.cram \
--o /scratch/out/ --r /scratch/ref/GRCh38_full_analysis_set.fa \
--priors /opt/indelible/data/hg38/Indelible_db_10k.hg38.bed --tb 4
singularity run indelible.sif --help
singularity run indelible.sif complete --help
Bootstrap: docker
From: python:3.7.17-slim-bookworm
Stage: build
%post
set -eu
export DEBIAN_FRONTEND=noninteractive PIP_NO_CACHE_DIR=1 PIP_DISABLE_PIP_VERSION_CHECK=1
apt-get update
apt-get install -y --no-install-recommends ca-certificates curl unzip
mkdir -p /src
cd /src || exit 1
curl -fsSLo indelible-1.1.3.tar.gz https://github.com/HurlesGroupSanger/indelible/archive/refs/tags/v1.1.3.tar.gz
sha256sum -c <<'SUMS'
6697c7d05c4b4c514f3509ac4044b8245f7a71cdc04cde1b928368e47a1eb973 indelible-1.1.3.tar.gz
SUMS
tar -xzf indelible-1.1.3.tar.gz
# The code, licence, README and example configs. The stale .pyc files, the test BAMs,
# the Dockerfile and the vr-runner scripts stay out.
mkdir -p /opt/indelible/src /opt/indelible/data/hg19 /opt/indelible/data/hg38
cd /src/indelible-1.1.3 || exit 1
cp -r indelible indelible.py LICENSE README.md example_config.hg19.yml example_config.hg38.yml \
/opt/indelible/src/
find /opt/indelible/src -name '*.pyc' -delete
find /opt/indelible/src -depth -type d -name __pycache__ -exec rm -rf {} +
chmod 0755 /opt/indelible/src/indelible.py
cp LICENSE /opt/indelible/LICENSE
# Upstream's annotation data. The two zips share file names (but not always contents,
# e.g. random_forest.17IX2019.pkl), so each build goes in its own directory.
unzip -q data/data_hg19.zip -d /opt/indelible/data/hg19
unzip -q data/data_hg38.zip -d /opt/indelible/data/hg38
# Ready-to-use configs: upstream's examples with ./data/ pointed at the image's data.
sed 's#"\./data/#"/opt/indelible/data/hg19/#' example_config.hg19.yml > /opt/indelible/config.hg19.yml
sed 's#"\./data/#"/opt/indelible/data/hg38/#' example_config.hg38.yml > /opt/indelible/config.hg38.yml
if grep -q '\./data/' /opt/indelible/config.hg19.yml /opt/indelible/config.hg38.yml; then
echo "A config still points at ./data/" >&2
exit 1
fi
# Upstream's pins (requirements.txt plus numpy 1.17.2 from its Dockerfile), with their
# dependencies pinned to versions that support CPython 3.7. Every file is hash-checked;
# the hashes are PyPI's, checked by downloading each file. All but pyfaidx and
# intervaltree (pure Python, sdist only) are cp37 manylinux wheels, so nothing is
# compiled. Cython isn't needed, since nothing is built from C sources.
python3 -m venv /opt/indelible/venv
cat > /tmp/build-requirements.txt <<'REQS'
setuptools==68.0.0 \
--hash=sha256:11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f
wheel==0.42.0 \
--hash=sha256:177f9c9b0d45c47873b619f5b650346d632cdc35fb5e4d25058e09c9e581433d
REQS
cat > /tmp/requirements.txt <<'REQS'
numpy==1.17.2 \
--hash=sha256:10132aa1fef99adc85a905d82e8497a580f83739837d7cbd234649f2e9b9dc58
pandas==0.25.1 \
--hash=sha256:d8930772adccb2882989ab1493fa74bd87d47c8ac7417f5dd3dd834ba8c24dc9
python-dateutil==2.9.0.post0 \
--hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427
pytz==2024.2 \
--hash=sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725
six==1.16.0 \
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
pyfaidx==0.5.5.2 \
--hash=sha256:9ac22bdc7b9c5d995d32eb9dc278af9ba970481636ec75c0d687d38c26446caa
pysam==0.18.0 \
--hash=sha256:cfffad99cf3968cf85aadb70a8a02303f9172ea21abe02d587c44f808c504f52
scipy==1.3.1 \
--hash=sha256:89dd6a6d329e3f693d1204d5562dd63af0fd7a17854ced17f9cbc37d5b853c8d
scikit-learn==0.21.3 \
--hash=sha256:8d319b71c449627d178f21c57614e21747e54bb3fc9602b6f42906c3931aa320
joblib==0.14.1 \
--hash=sha256:bdb4fd9b72915ffb49fde2229ce482dd7ae79d842ed8c2b4c932441495af1403
PyYAML==5.4 \
--hash=sha256:8b818b6c5a920cbe4203b5a6b14256f0e5244338244560da89b7b0f1313ea4b6
biopython==1.74 \
--hash=sha256:a117596b366e2226e2bf0adaf87f32cda495357c398b1b2ca2ada9f54c386718
intervaltree==3.0.2 \
--hash=sha256:cb4f61c81dcb4fea6c09903f3599015a83c9bdad1f0bbd232495e6681e19e273
sortedcontainers==2.4.0 \
--hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0
REQS
/opt/indelible/venv/bin/pip install --require-hashes --no-deps --only-binary=:all: \
-r /tmp/build-requirements.txt
# --no-build-isolation builds the two sdists with the hash-checked setuptools and wheel
# above, instead of fetching unpinned ones.
/opt/indelible/venv/bin/pip install --require-hashes --no-deps --no-build-isolation \
--only-binary=:all: --no-binary=pyfaidx,intervaltree -r /tmp/requirements.txt
/opt/indelible/venv/bin/pip check
/opt/indelible/venv/bin/pip uninstall -y wheel pip
# The wheels' bundled test suites and byte-code caches aren't needed to run.
site_packages=/opt/indelible/venv/lib/python3.7/site-packages
find "${site_packages}" -depth -type d -name tests -path '*/site-packages/*' -exec rm -rf {} +
find /opt/indelible/venv -depth -type d -name __pycache__ -exec rm -rf {} +
Bootstrap: docker
From: python:3.7.17-slim-bookworm
Stage: final
%files from build
/opt/indelible /opt/indelible
%labels
Maintainer IDIA <support@ilifu.ac.za>
Version 1.1.3
Source https://github.com/HurlesGroupSanger/indelible
License GPL-3.0-only
Authors Alejandro Sifrim, Eugene Gardner and the Hurles group, Wellcome Sanger Institute
%help
InDelible 1.1.3 by Alejandro Sifrim, Eugene Gardner and the Hurles group, Wellcome Sanger Institute (https://github.com/HurlesGroupSanger/indelible).
This image packages the unmodified upstream v1.1.3 release. IDIA builds and maintains the
image only; report bugs in InDelible itself at
https://github.com/HurlesGroupSanger/indelible/issues. The full documentation is upstream's
README, also in the image at /opt/indelible/src/README.md.
InDelible is licensed under the GNU GPL v3; the licence text is in /opt/indelible/LICENSE.
The annotation data shipped with it (Ensembl exons, ExAC constraint, HGNC genes, DDG2P,
the InDelible allele-frequency database) is upstream's, from data_hg19.zip and
data_hg38.zip, and the third-party resources in it keep their own terms.
If you use InDelible, upstream asks you to cite:
Gardner EJ, Sifrim A, Lindsay SJ, et al. Detecting cryptic clinically relevant
structural variation in exome-sequencing data increases diagnostic yield for
developmental disorders. Am J Hum Genet 108(11), 2186-2194 (2021).
https://doi.org/10.1016/j.ajhg.2021.09.010
Contents:
/opt/indelible/src indelible.py and its package (on PATH as indelible.py)
/opt/indelible/data/hg19 upstream's GRCh37 data, with the repeats BLAST database built
/opt/indelible/data/hg38 upstream's GRCh38 data, likewise
/opt/indelible/config.hg19.yml, config.hg38.yml
upstream's example configs, pointed at the data above.
Copy one out and edit it to change parameters.
Python 3.7 with upstream's pinned packages (scikit-learn 0.21.3, which the bundled random
forest needs, pandas 0.25.1, pysam 0.18.0, Biopython 1.74...) is in /opt/indelible/venv.
The helper tools come from Debian 12: bwa 0.7.17, BLAST+ 2.12.0, bedtools 2.30.0 and
tabix/bgzip (htslib 1.16).
The reference genome is not included. Bind in your own FASTA (GRCh37 hs37d5 or GRCh38),
with its .fai and a bwa index next to it, and your BAM/CRAM files, e.g. with -B /scratch.
Usage (the runscript is indelible.py):
singularity run -B /scratch indelible.sif complete \
--config /opt/indelible/config.hg38.yml \
--i /scratch/proband.cram --m /scratch/mother.cram --p /scratch/father.cram \
--o /scratch/out/ --r /scratch/ref/GRCh38_full_analysis_set.fa \
--priors /opt/indelible/data/hg38/Indelible_db_10k.hg38.bed --tb 4
singularity run indelible.sif --help
singularity run indelible.sif complete --help
%environment
export PATH=/opt/indelible/venv/bin:/opt/indelible/src:${PATH}
export LC_ALL=C.UTF-8
%post
set -eu
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y --no-install-recommends bwa ncbi-blast+ bedtools tabix
apt-get clean
rm -rf /var/lib/apt/lists/*
# The repeats BLAST database, as upstream's README and Dockerfile build it.
for build in hg19 hg38; do
cd "/opt/indelible/data/${build}" || exit 1
makeblastdb -in repeats.fasta -dbtype nucl
done
%runscript
exec /opt/indelible/venv/bin/python /opt/indelible/src/indelible.py "$@"
%test
set -eu
PATH=/opt/indelible/venv/bin:/opt/indelible/src:${PATH}
export PATH
# '#!/usr/bin/env python' must find the venv's Python 3.7.
python --version 2>&1 | grep -q '^Python 3\.7\.'
indelible.py --help | grep -q 'InDelible v1\.1\.3'
indelible.py complete --help | grep -q -- '--priors'
python -I -c 'import sklearn, pandas, numpy, scipy, pysam, pyfaidx, yaml, Bio, intervaltree
assert sklearn.__version__ == "0.21.3", sklearn.__version__
assert pandas.__version__ == "0.25.1", pandas.__version__
assert numpy.__version__ == "1.17.2", numpy.__version__
assert pysam.__version__ == "0.18.0", pysam.__version__
assert Bio.__version__ == "1.74", Bio.__version__'
cd /opt/indelible/src || exit 1
python -c 'import indelible'
# The bundled random forests are bz2-compressed pickles (upstream's
# score_positions.load_forest opens them with bz2.BZ2File) and unpickle with this scikit-learn.
for build in hg19 hg38; do
python -I -c 'import bz2, pickle, sys; clf = pickle.load(bz2.BZ2File(sys.argv[1], "rb")); print(type(clf).__name__)' \
"/opt/indelible/data/${build}/random_forest.17IX2019.pkl" | grep -q 'RandomForestClassifier'
test -s "/opt/indelible/data/${build}/repeats.fasta.nsq"
done
python -I -c 'import yaml, os, sys
for path in sys.argv[1:]:
config = yaml.safe_load(open(path))
for key in ("ddg2p_bed", "ensembl_exons", "random_forest_model", "exac_constraint", "hgnc_synonyms", "hgnc_file", "repeatdb"):
assert os.path.isfile(config[key]), (path, key, config[key])' \
/opt/indelible/config.hg19.yml /opt/indelible/config.hg38.yml
bwa 2>&1 | grep -q 'Version: 0\.7\.17'
blastn -version | grep -q '^blastn: 2\.'
bedtools --version | grep -q '^bedtools v2\.'
tabix --version | grep -q '^tabix (htslib)'
test -s /opt/indelible/LICENSE
Download bioinformatics-indelible_1.1.3.def
#!/bin/sh
exec /opt/indelible/venv/bin/python /opt/indelible/src/indelible.py "$@"
#!/bin/sh
set -eu
PATH=/opt/indelible/venv/bin:/opt/indelible/src:${PATH}
export PATH
# '#!/usr/bin/env python' must find the venv's Python 3.7.
python --version 2>&1 | grep -q '^Python 3\.7\.'
indelible.py --help | grep -q 'InDelible v1\.1\.3'
indelible.py complete --help | grep -q -- '--priors'
python -I -c 'import sklearn, pandas, numpy, scipy, pysam, pyfaidx, yaml, Bio, intervaltree
assert sklearn.__version__ == "0.21.3", sklearn.__version__
assert pandas.__version__ == "0.25.1", pandas.__version__
assert numpy.__version__ == "1.17.2", numpy.__version__
assert pysam.__version__ == "0.18.0", pysam.__version__
assert Bio.__version__ == "1.74", Bio.__version__'
cd /opt/indelible/src || exit 1
python -c 'import indelible'
# The bundled random forests are bz2-compressed pickles (upstream's
# score_positions.load_forest opens them with bz2.BZ2File) and unpickle with this scikit-learn.
for build in hg19 hg38; do
python -I -c 'import bz2, pickle, sys; clf = pickle.load(bz2.BZ2File(sys.argv[1], "rb")); print(type(clf).__name__)' \
"/opt/indelible/data/${build}/random_forest.17IX2019.pkl" | grep -q 'RandomForestClassifier'
test -s "/opt/indelible/data/${build}/repeats.fasta.nsq"
done
python -I -c 'import yaml, os, sys
for path in sys.argv[1:]:
config = yaml.safe_load(open(path))
for key in ("ddg2p_bed", "ensembl_exons", "random_forest_model", "exac_constraint", "hgnc_synonyms", "hgnc_file", "repeatdb"):
assert os.path.isfile(config[key]), (path, key, config[key])' \
/opt/indelible/config.hg19.yml /opt/indelible/config.hg38.yml
bwa 2>&1 | grep -q 'Version: 0\.7\.17'
blastn -version | grep -q '^blastn: 2\.'
bedtools --version | grep -q '^bedtools v2\.'
tabix --version | grep -q '^tabix (htslib)'
test -s /opt/indelible/LICENSE
# /.singularity.d/env/10-docker2singularity.sh
#!/bin/sh
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export LANG="${LANG:-"C.UTF-8"}"
export GPG_KEY="${GPG_KEY:-"0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D"}"
export PYTHON_VERSION="${PYTHON_VERSION:-"3.7.17"}"
export PYTHON_PIP_VERSION="${PYTHON_PIP_VERSION:-"23.0.1"}"
export PYTHON_SETUPTOOLS_VERSION="${PYTHON_SETUPTOOLS_VERSION:-"57.5.0"}"
export PYTHON_GET_PIP_URL="${PYTHON_GET_PIP_URL:-"https://github.com/pypa/get-pip/raw/9af82b715db434abb94a0a6f3569f43e72157346/public/get-pip.py"}"
export PYTHON_GET_PIP_SHA256="${PYTHON_GET_PIP_SHA256:-"45a2bb8bf2bb5eff16fdd00faef6f29731831c7c59bd9fc2bf1f3bed511ff1fe"}"
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow
export PATH=/opt/indelible/venv/bin:/opt/indelible/src:${PATH}
export LC_ALL=C.UTF-8