r.sif container

Description

The r.sif container has multiple genetics tools based or relying on R, with a full R environment and Rstudio-server, based on the Rocker Project rocker/verse image. Please refer to the Software table below for details. In addition, several standard R packages are also included (e.g. data.table, ggplot2, rmarkdown, etc.)

Please report an issue if you encounter errors that have not been reported.

For GSMR, the example data (http://cnsgenomics.com/software/gsmr/static/test_data.zip) is available in $COMORMENT/containers/reference/example/gsmr folder. You may start the container like this:

cd $COMORMENT/containers/reference/examples/gsmr
apptainer shell --home $PWD:/home $SIF/r.sif 

and then follow the official tutorial https://cnsgenomics.com/software/gsmr/ . Note that gcta64 tool is also included in r.sif container, as the tutorial depends on it.

Invoking Rstudio-server

The r.sif container includes Rstudio-server, which can be accessed in a browser running on the host machine by

  1. Start Rstudio-server on the local or remote machine as:

cd <working/dir>
mkdir -p run var-lib-rstudio-server
printf 'provider=sqlite\ndirectory=/var/lib/rstudio-server\n' > database.conf
apptainer exec --bind run:/run,var-lib-rstudio-server:/var/lib/rstudio-server,database.conf:/etc/rstudio/database.conf --home=$PWD <path/to>/r.sif /usr/lib/rstudio-server/bin/rserver --www-address=127.0.0.1 --www-port=8787 --server-user $USER

where <working/dir> is the directory where you want to start Rstudio-server, and <path/to/r.sif> is the path to the r.sif container.

If you want to mount additional directories, you can append the --bind argument to the apptainer call (attaching /ess and /cluster as examples):

--bind run:/run,var-lib-rstudio-server:/var/lib/rstudio-server,database.conf:/etc/rstudio/database.conf,/ess:/ess,/cluster:/cluster

If you get messages like “address already in use”, try and replace the port number 8787 with another port number (e.g., 8888, etc.) everywhere in the steps above and below.

  1. (Optional) Create SSH tunnel using port 8787 from the local host to the remote machine

ssh -N -f -L "localhost:8787:localhost:8787" <remote/machine/address>  # replace <remote/machine/address> as necessary
  1. Then, open address 0.0.0.0:8787 or 127.0.0.1:8787 in a web browser like Firefox on the host.

Please refer to the Rocker Project documentation for more details.

Software

Genetic analysis software

List of main software in the container:

OS/tool

version

license

ubuntu

24.04LTS

Creative Commons CC-BY-SA version 3.0 UK licence

R[1]

4.5.1 (2025-06-13) + data.table, ggplot, etc.

misc

gcta64[2]

1.94.1

GPLv3

GenomicSEM[3]

GenomicSEM/GenomicSEM@8e0ef5

GPLv3

GSMR[4]

v1.0.9

GPL>=v2

rareGWAMA[5]

dajiangliu/rareGWAMA@72e962d

-

seqminer[6]

zhanxw/seqminer@142204d

GPL

PRSice_linux[7]

2.3.5

GPLv3

TwoSampleMR[8]

MRCIEU/TwoSampleMR@c174107

unknown/MIT

snpStats[8]

v1.40.0

GPLv3

R packages

In addition to the rocker/verse image and the above genomics tools listed above there are a host of additional R packages and dependencies installed in the container. See the installer scripts for CRAN, Bioconductor, GitHub, and source packages for details.