nullarbor
nullarbor copied to clipboard
Add support for Singularity container
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?
Is this different to having the nullarbor software in the same torstyverse.simg
?
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