Hi all,
I'm new to using Singularity, and need a bit of help. I had no issues running the de novo assembly:
singularity exec /home/kanders2/trinityrnaseq.v2.15.0-predev.simg Trinity --seqType fq --max_memory 125G --CPU 40 --full_cleanup --left /home/kanders2/trimmed_r/selectedLEFT_G.fq.gz --right /home/kanders2/trimmed_r/selectedRIGHT_G.fq.gz
However, now I have no idea how to run the other scripts that come with Trinity given that I'm working with Singularity as opposed to just defining the path to the script like I would have in the past.
Based on some online tutorials I found, I should be able to get basic assembly stats like this:
singularity exec /home/kanders2/trinityrnaseq.v2.15.0-predev.simg sh -c ‘$TRINITY_HOME/util/TrinityStats.pl trinity_out_dir.Trinity.fasta’ > G_assembly.metrics
I get the error message:
trinity_out_dir.Trinity.fasta’: 1: trinity_out_dir.Trinity.fasta’: ‘/util/TrinityStats.pl: not found
So it's something to do with not having the $TRINTIY_HOME path not set up properly, or the .pl script not being in that location? Please note that I've also assumed that everything I'd normally get when I download Trinity is in the Singularity image. Any way to check that?
I've looked at a lot of Singularity tutorials, and haven't quite got my head around it. I don't know where all the bits and pieces are located. Any help in appreciated.
1 answer
You have to use --bind to mount all folders that contain any of the input data and output folders you use. $HOME is mounted by default, though I always use --cleanenv --no-home as I had it that singularity used software stored in home directories rather than its container software. Meaning you should mount the respective folders explicitly. Towards execution, I prefer to write a bash script with all commands and then execute that script via singularity. That has the advantage that you only have one singularity command. Hope that helps, I am by no means a singularity expert. That is why I wrap things often into Nextflow and let the workflow manager figure out the singularity-fu.
Log in to answer this question.