nullarbor icon indicating copy to clipboard operation
nullarbor copied to clipboard

Add support for Singularity container

Open andersgs opened this issue 5 years ago • 2 comments

Let's say I have a singularity container with all of TorstyVerse installed: torstyverse.simg.

I can, for example, call mlst by: /path/to/img/torstyverse.simg mlst.

Could a --singularity-image option be added that points to the path.

The Makefile might then look something like this:

SINGULARITY := /path/to/img/img.simg
ASSEMBLER := cpus=$(CPUS) opts="" singularity=$(SINGULARITY)  /home/tseemann/git/nullarbor/bin/../plugins/assembler/shovill.sh
SNIPPY := $(SINGULARITY) snippy --force
SNIPPYCORE := $(SINGULARITY) snippy-core
ROARY := $(SINGULARITY) roary -v
ABRICATE := $(SINGULARITY) abricate

And, shovill.sh would have:

$(singularity) shovill --force --outdir "$WORKDIR" --R1 "$read1" --R2 "$read2" --cpus "$cpus" --ram 16 $opts

If singularity not specified (i.e., '') then nothing should change, right?

andersgs avatar Sep 06 '18 00:09 andersgs

Is this different to having the nullarbor software in the same torstyverse.simg ?

tseemann avatar Sep 06 '18 07:09 tseemann

Yes. But, not mutually exclusive. Because Nullarbor generates a makefile when you run it --- unless you run it from within the container, it will search for the tools in the system $PATH not the container $PATH

andersgs avatar Sep 13 '18 04:09 andersgs