bioinformatics/prsice:2.3.5
Version sha256.83d9f5c8d9075daab3ca282f63dea58a6960fa14a3708cd3f3678d092e39a89a
Image size: 4.8 GB
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/prsice:2.3.5
Shell into the container
singularity shell library://bioinformatics/prsice:2.3.5
Run the container
singularity run library://bioinformatics/prsice:2.3.5
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/prsice:2.3.5
Shell into the container
apptainer shell library://bioinformatics/prsice:2.3.5
Run the container
apptainer run library://bioinformatics/prsice:2.3.5
PRSice-2 2.3.5 by Shing Wan Choi and Paul F. O'Reilly (https://github.com/choishingwan/PRSice).
This image packages the unmodified upstream release (the static PRSice_linux binary and
PRSice.R). IDIA builds and maintains the image only; report bugs in PRSice itself at
https://github.com/choishingwan/PRSice/issues. Documentation: https://choishingwan.net/PRSice/
PRSice is licensed under the GNU GPL v3 or later; the licence text is in /opt/prsice/LICENSE.
If you use it, upstream asks you to cite:
Choi SW, O'Reilly PF. PRSice-2: Polygenic Risk Score software for biobank-scale data.
GigaScience 8(7), giz082 (2019). https://doi.org/10.1093/gigascience/giz082
The image is built on IDIA's R 4.6.1 / RStudio image, so R with ggplot2, data.table
and optparse is included for PRSice.R's plots. The base's R, Rscript and rstudio apps
are still available.
Usage (bind your data, e.g. -B /scratch, and run from a writable directory):
singularity run prsice.sif --base gwas.assoc --target genotypes --out result
singularity run --app prsice_r prsice.sif --base gwas.assoc --target genotypes --out result
The prsice_r app runs "Rscript /opt/prsice/PRSice.R --prsice /opt/prsice/bin/PRSice",
which runs PRSice and then draws the plots. No reference or example data is included:
bind your own base GWAS and target genotypes into the container with -B.
This image has 5 apps. Pick one to see how to use it.
singularity run --app R library://bioinformatics/prsice:2.3.5
This works once you've added the registry as a remote (see the CLI tab). Add the app's arguments after the command. With Apptainer, start it with apptainer instead.
Runs
exec R "${@}"
singularity run --app Rscript library://bioinformatics/prsice:2.3.5
This works once you've added the registry as a remote (see the CLI tab). Add the app's arguments after the command. With Apptainer, start it with apptainer instead.
Runs
exec Rscript "${@}"
singularity run --app prsice library://bioinformatics/prsice:2.3.5
This works once you've added the registry as a remote (see the CLI tab). Add the app's arguments after the command. With Apptainer, start it with apptainer instead.
Help
Runs the PRSice binary alone, the same as the image's runscript: clumps the base GWAS
against the target genotypes, builds polygenic scores over a range of p-value thresholds
and regresses each on the phenotype. Writes <out>.summary, .prsice, .best and .log but no
plots; use the prsice_r app for those. The target is a PLINK .bed/.bim/.fam prefix (or
--type bgen).
singularity run --app prsice prsice.sif --base gwas.assoc.gz --target genotypes \
--stat OR --binary-target T --thread 4 --out result
Docs: https://github.com/choishingwan/PRSice/blob/2.3.5/docs/command_detail.md
Runs
exec /opt/prsice/bin/PRSice "$@"
singularity run --app prsice_r library://bioinformatics/prsice:2.3.5
This works once you've added the registry as a remote (see the CLI tab). Add the app's arguments after the command. With Apptainer, start it with apptainer instead.
Help
Runs upstream's PRSice.R wrapper with "--prsice /opt/prsice/bin/PRSice" already set: it
passes the PRSice options through, runs the analysis, then draws the bar and high-res
plots (PNG by default, --device to change) with the included ggplot2. Add --quantile N
for a quantile plot, or --plot to redraw the plots from an earlier run's output.
singularity run --app prsice_r prsice.sif --base gwas.assoc.gz --target genotypes \
--stat OR --binary-target T --thread 4 --quantile 10 --out result
Docs: https://github.com/choishingwan/PRSice/blob/2.3.5/docs/step_by_step.md
Runs
exec Rscript /opt/prsice/PRSice.R --prsice /opt/prsice/bin/PRSice "$@"
singularity run --app rstudio library://bioinformatics/prsice:2.3.5
This works once you've added the registry as a remote (see the CLI tab). Add the app's arguments after the command. With Apptainer, start it with apptainer instead.
Runs
if [ -z "${RSTUDIO_PASSWORD}" ]; then
RSTUDIO_PASSWORD=$( tr -cd '[:alnum:]' < /dev/urandom | fold -w30 | head -n1 )
export RSTUDIO_PASSWORD
echo "The environment variable RSTUDIO_PASSWORD was not set, so your password has been chosen for you. It's: ${RSTUDIO_PASSWORD}"
fi
PORT=$( python -c 'import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()' )
HOST=$( /bin/hostname )
echo "Running rserver on port ${PORT}"
echo "To connect to this server run this on your local machine:"
echo " ssh -A ${USER}@${HOST} -o \"ProxyCommand=ssh ${USER}@slurm.ilifu.ac.za nc ${HOST} 22\" -L8081:localhost:${PORT}"
echo "then visit http://localhost:8081 in your browser and use the username \"${USER}\" to login with the password \"${RSTUDIO_PASSWORD}\""
echo "(You may need to choose a different port (other than 8081), so remember to change this in both the ssh and browser)"
exec rserver --server-user ${USER} --auth-none 0 --auth-pam-helper rstudio_auth --secure-cookie-key-file ${HOME}/.RStudio.rserver/secure-cookie.key --www-port ${PORT} --server-data-dir ${HOME}/.RStudio.rserver/data "${@}"
Bootstrap: docker
From: debian:13-slim
Stage: build
%post
set -eu
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y --no-install-recommends ca-certificates curl unzip binutils
mkdir -p /src /opt/prsice/bin
cd /src || exit 1
curl -fsSLo PRSice_linux.zip https://github.com/choishingwan/PRSice/releases/download/2.3.5/PRSice_linux.zip
curl -fsSLo LICENSE https://raw.githubusercontent.com/choishingwan/PRSice/2.3.5/LICENSE
# optparse moves to CRAN's Archive once a newer release comes out.
curl -fsSLo optparse_1.8.2.tar.gz https://cran.r-project.org/src/contrib/optparse_1.8.2.tar.gz \
|| curl -fsSLo optparse_1.8.2.tar.gz https://cran.r-project.org/src/contrib/Archive/optparse/optparse_1.8.2.tar.gz
sha256sum -c <<'SUMS'
25a143edcf966225abf7b716aeff04b9386317973a981e3f1cc533ae48d6cae7 PRSice_linux.zip
589ed823e9a84c56feb95ac58e7cf384626b9cbf4fda2a907bc36e103de1bad2 LICENSE
281d862ece19bf2815e04449779d339e4f108b7a08d69ae7942b47a1592d98ff optparse_1.8.2.tar.gz
SUMS
# Only the binary and the plotting script: the ~50 MB of toy data stays out.
unzip -q PRSice_linux.zip PRSice_linux PRSice.R
install -m 0755 PRSice_linux /opt/prsice/bin/PRSice
strip /opt/prsice/bin/PRSice
install -m 0644 PRSice.R /opt/prsice/PRSice.R
install -m 0644 LICENSE /opt/prsice/LICENSE
Bootstrap: library
Library: https://sregistry.idia.ac.za
From: ci-bot/rstudio/r4.6.1:2026.07.1-147
Stage: final
%files from build
/opt/prsice /opt/prsice
# Not /tmp: %post runs with the host's /tmp bind-mounted over the image's /tmp.
/src/optparse_1.8.2.tar.gz /usr/local/src/optparse_1.8.2.tar.gz
%labels
Maintainer IDIA <support@ilifu.ac.za>
Version 2.3.5
Source https://github.com/choishingwan/PRSice
License GPL-3.0-or-later
Authors Shing Wan Choi and Paul F. O'Reilly
%help
PRSice-2 2.3.5 by Shing Wan Choi and Paul F. O'Reilly (https://github.com/choishingwan/PRSice).
This image packages the unmodified upstream release (the static PRSice_linux binary and
PRSice.R). IDIA builds and maintains the image only; report bugs in PRSice itself at
https://github.com/choishingwan/PRSice/issues. Documentation: https://choishingwan.net/PRSice/
PRSice is licensed under the GNU GPL v3 or later; the licence text is in /opt/prsice/LICENSE.
If you use it, upstream asks you to cite:
Choi SW, O'Reilly PF. PRSice-2: Polygenic Risk Score software for biobank-scale data.
GigaScience 8(7), giz082 (2019). https://doi.org/10.1093/gigascience/giz082
The image is built on IDIA's R 4.6.1 / RStudio image, so R with ggplot2, data.table
and optparse is included for PRSice.R's plots. The base's R, Rscript and rstudio apps
are still available.
Usage (bind your data, e.g. -B /scratch, and run from a writable directory):
singularity run prsice.sif --base gwas.assoc --target genotypes --out result
singularity run --app prsice_r prsice.sif --base gwas.assoc --target genotypes --out result
The prsice_r app runs "Rscript /opt/prsice/PRSice.R --prsice /opt/prsice/bin/PRSice",
which runs PRSice and then draws the plots. No reference or example data is included:
bind your own base GWAS and target genotypes into the container with -B.
%environment
export PATH=/opt/prsice/bin:${PATH}
%post
set -eu
mkdir -p /usr/local/lib/R/site-library
# Install into the image's site library, not /library, which users may bind over.
R CMD INSTALL --library=/usr/local/lib/R/site-library /usr/local/src/optparse_1.8.2.tar.gz
rm -f /usr/local/src/optparse_1.8.2.tar.gz
%runscript
exec /opt/prsice/bin/PRSice "$@"
%apprun prsice
exec /opt/prsice/bin/PRSice "$@"
%apphelp prsice
Runs the PRSice binary alone, the same as the image's runscript: clumps the base GWAS
against the target genotypes, builds polygenic scores over a range of p-value thresholds
and regresses each on the phenotype. Writes <out>.summary, .prsice, .best and .log but no
plots; use the prsice_r app for those. The target is a PLINK .bed/.bim/.fam prefix (or
--type bgen).
singularity run --app prsice prsice.sif --base gwas.assoc.gz --target genotypes \
--stat OR --binary-target T --thread 4 --out result
Docs: https://github.com/choishingwan/PRSice/blob/2.3.5/docs/command_detail.md
%apprun prsice_r
exec Rscript /opt/prsice/PRSice.R --prsice /opt/prsice/bin/PRSice "$@"
%apphelp prsice_r
Runs upstream's PRSice.R wrapper with "--prsice /opt/prsice/bin/PRSice" already set: it
passes the PRSice options through, runs the analysis, then draws the bar and high-res
plots (PNG by default, --device to change) with the included ggplot2. Add --quantile N
for a quantile plot, or --plot to redraw the plots from an earlier run's output.
singularity run --app prsice_r prsice.sif --base gwas.assoc.gz --target genotypes \
--stat OR --binary-target T --thread 4 --quantile 10 --out result
Docs: https://github.com/choishingwan/PRSice/blob/2.3.5/docs/step_by_step.md
%test
set -eu
/opt/prsice/bin/PRSice --version 2>&1 | grep -q '^2\.3\.5 '
Rscript -e 'for (p in c("ggplot2", "data.table", "optparse", "RColorBrewer", "methods", "tools", "grDevices")) library(p, character.only = TRUE)'
Rscript -e 'stopifnot(packageVersion("optparse") == "1.8.2")'
Rscript /opt/prsice/PRSice.R --help --no-install | grep -q 'usage: Rscript PRSice.R'
test -s /opt/prsice/LICENSE
Download bioinformatics-prsice_2.3.5.def
#!/bin/sh
exec /opt/prsice/bin/PRSice "$@"
#!/bin/sh
set -eu
/opt/prsice/bin/PRSice --version 2>&1 | grep -q '^2\.3\.5 '
Rscript -e 'for (p in c("ggplot2", "data.table", "optparse", "RColorBrewer", "methods", "tools", "grDevices")) library(p, character.only = TRUE)'
Rscript -e 'stopifnot(packageVersion("optparse") == "1.8.2")'
Rscript /opt/prsice/PRSice.R --help --no-install | grep -q 'usage: Rscript PRSice.R'
test -s /opt/prsice/LICENSE
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow
export INSTALLER_PATH=/installer
export SOFTWARE_PATH=/software
export PATH=${SOFTWARE_PATH}/bin:${PATH}
export LC_ALL=C
unset XDG_RUNTIME_DIR
export INSTALLER_PATH=/installer
export SOFTWARE_PATH=/software
export PATH=${SOFTWARE_PATH}/bin:${PATH}
export LD_LIBRARY_PATH=${SOFTWARE_PATH}/lib:${LD_LIBRARY_PATH}
export LIBRARY_PATH=${SOFTWARE_PATH}/lib:${LIBRARY_PATH}
export CPATH=${SOFTWARE_PATH}/include:${CPATH}
export INCLUDE=${SOFTWARE_PATH}/include/:${INCLUDE}
export PKG_CONFIG_PATH=${SOFTWARE_PATH}/lib/pkgconfig:${PKG_CONFIG_PATH}
export LC_ALL=C
unset XDG_RUNTIME_DIR
export R_VERSION=4.6.1
export RSTUDIO_VERSION=2026.07.1-147
export PATH=/usr/lib/rstudio-server/bin:${PATH}
export PATH=/opt/prsice/bin:${PATH}