Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Running under singularity

Yaobo Xu edited this page Aug 8, 2019 · 4 revisions

This page covers general information for running with singularity.

Reference data

The wrapper script ds-cgpwgs.pl allows you to either specify a set of tar.gz files or a common path for all reference files.

The advantage of the shared path is that you can use a shared reference area for many containers.

To construct a valid unpacked reference area (example is GRCh37) for cgpwgs run:

$ mkdir ref
$ cd ref
$ echo 'ftp://ftp.sanger.ac.uk/pub/cancer/dockstore/human/core_ref_GRCh37d5.tar.gz
ftp://ftp.sanger.ac.uk/pub/cancer/dockstore/human/qcGenotype_GRCh37d5.tar.gz
ftp://ftp.sanger.ac.uk/pub/cancer/dockstore/human/SNV_INDEL_ref_GRCh37d5-fragment.tar.gz
ftp://ftp.sanger.ac.uk/pub/cancer/dockstore/human/VAGrENT_ref_GRCh37d5_ensembl_75.tar.gz
ftp://ftp.sanger.ac.uk/pub/cancer/dockstore/human/CNV_SV_ref_GRCh37d5_brass6+.tar.gz' \
| xargs -tI {} bash -c 'curl -L {} | tar --strip-components 1 -zx'

Once unpacked the following options will all need to be pointed to the base of the ref area:

  • -reference -r
  • -annot -a
  • -snv_indel -si
  • -cnv_sv -cs
  • -qcset -qc

Run command

The following is an example of the run command for singularity. It assumes the --bind locations exist:

$ export CGPWGS_VER=X.X.X # SET ME
singularity pull docker://quay.io/wtsicgp/dockstore-cgpwgs:$CGPWGS_VER

singularity exec \
 --cleanenv \
 --workdir /.../workspace  \
 --home /.../workspace:/home  \
 --bind /.../ref/human:/var/spool/ref:ro  \
 --bind /.../data/cgpwgs:/var/spool/data:ro  \
 --bind /.../results/cgpwgs:/var/spool/results  \
 dockstore-cgpwgs-${CGPWGS_VER}.simg  \
  ds-cgpwgs.pl \
-r /var/spool/ref \
-a /var/spool/ref \
-si /var/spool/ref \
-cs /var/spool/ref \
-qc /var/spool/ref \
-pl 3.65 -pu 1.0 \
-e 'MT,GL%,hs37d5,NC_007605' \
-t /var/spool/data/tumour.bam \
-tidx /var/spool/data/tumour.bam.bai \
-n /var/spool/data/normal.bam \
-nidx /var/spool/data/normal.bam.bai \
-o /var/spool/results

For a system automatically attaching all local mount points (not default singularity behaviour) you need not specify any exec params (workdir, home, bind) but you should specify the -outdir option for ds-cgpwgs.pl to prevent data being written to your home directory.

By default results are written to the home directory of the container so ensure you bind a large volume and set the -home variable. As indicated above the location can be overridden via the options of ds-cgpwgs.pl

(page is based on 2.1.0+ releases)

Clone this wiki locally