Closed jamesdgalbraith closed 3 months ago
Hello,
I'm sorry you are encountering an issue with GraffiTE. This looks unusual... It looks like the --no-home
argument stems from Singularity. I have the feeling that the --no-home
option is somehow passed to the minimap2 command. I would like to hear what @cgroza thinks about it however, If you have the possibility to discuss with your system admin whether this could be due to a specific configuration of Singularity on your cluster, and maybe be turned off that would be worth a try.
Maybe you can also check what version of Singularity you are using, and perhaps check if you could upgrade to Apptainer (maybe you already are on Apptainer).
Let's see what Cristian says =)
Cheers,
Clément
Hi
The argument is not being passed to minimap2. It's nextflow trying to invoke singularity with that parameter and getting an error. You might need to check your singularity version or installation.
-------- Original Message -------- On 5/8/24 12:31 PM, Clément Goubert wrote:
Hello,
I'm sorry you are encountering an issue with GraffiTE. This looks unusual... It looks like the --no-home argument stems from Singularity. I have the feeling that the --no-home option is somehow passed to the minimap2 command. I would like to hear what @.***(https://github.com/cgroza) thinks about it however, If you have the possibility to discuss with your system admin whether this could be due to a specific configuration of Singularity on your cluster, and maybe be turned off that would be worth a try.
Maybe you can also check what version of Singularity you are using, and perhaps check if you could upgrade to Apptainer (maybe you already are on Apptainer).
Let's see what Cristian says =)
Cheers,
Clément
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Thanks guys, I had to install Singulariy using conda as the server doesn't have it installed on it at present, so I think the version may be the issue. I'll try a fresh conda environment with Apptainer instead of Singularity and see if that works. Just in case that doesn't work, is there is a version of the main.nf
workflow as a bash script hiding somewhere?
Yes, indeed I feel that this could be the issue. Let us know if it works with Appatainer. You may want to look how to avoid this --no-home
parameter to be passed by default. I am not savvy on using Apptainer/Singularity through conda; if you have a chance to see with a system admin if it can be installed directly, that may be better.
Unfortunately, there is no other version of the workflow than the code present in the main.nf
however, you can look into the code how each step (each process) calls the dependencies with bash commands. Some dependencies are either installed in the Apptainer/Singularity image, or are present in the bin/
folder. Let us know of course if you have any question!
Cheers,
Clément
Hi again, Thanks for getting back so fast. With a new conda environment with only nextflow and apptainer installed into it I manage to successfully run the test data through, but my own data is now getting at a later step.
I'm now calling the script with the following command:
nextflow run /ceph/users/jgalbraith/Programs/GraffiTE/main.nf \
--TE_library ${TE_LIBRARY} \
--reference ${GENOME} --make_graph_time "12h"\
--graph_method graphaligner \
--longreads GraffiTE_reads.csv \
--reads GraffiTE_reads.csv \
--cores 40 -with-singularity /ceph/users/jgalbraith/Programs/GraffiTE/graffite_latest.sif
I added the --make_graph_time "12h"
, as without it make_graph failed early on with the error
WARN: Access to undefined parameter `make_graph_time` -- Initialise it to a default value eg. `params.make_graph_time = some_value`
I've followed the instructions about ammending the a writable location to the nextflow.config
file (i.e. changed the runOptions line to singularity.runOptions = '--contain --bind /scratch/jgalbraith/tmp:/tmp'
)
All the stages from map_longreads through to tsd_report completed successfully. Here's the section of the log where it's failing now:
May-09 17:48:52.137 [Task monitor] ERROR nextflow.processor.TaskProcessor - Error executing process > 'make_graph (1)'
Caused by:
Process `make_graph (1)` terminated with an error exit status (255)
Command executed:
bcftools sort -Oz -o sorted.vcf.gz pangenome.vcf
tabix sorted.vcf.gz
mkdir index
export TMPDIR=/scratch/jgalbraith/GraffiTE
vg construct -a -r male.ragtag.scaffold.fasta -v pangenome.vcf -m 1024 > index/index.vg
vg snarls index/index.vg > index/index.pb
Command exit status:
255
Command output:
(empty)
Command error:
INFO: Environment variable SINGULARITYENV_TMP is set, but APPTAINERENV_TMP is preferred
INFO: Environment variable SINGULARITYENV_TMPDIR is set, but APPTAINERENV_TMPDIR is preferred
INFO: Environment variable SINGULARITYENV_NXF_TASK_WORKDIR is set, but APPTAINERENV_NXF_TASK_WORKDIR is preferred
INFO: squashfuse not found, will not be able to mount SIF or other squashfs files
INFO: fuse2fs not found, will not be able to mount EXT3 filesystems
INFO: gocryptfs not found, will not be able to use gocryptfs
INFO: Converting SIF file to temporary sandbox...
mkdtemp(/scratch/261089.1.main.q/bcftools.WR6TOr) failed: No such file or directory
INFO: Cleaning up image...
Work dir:
/scratch/jgalbraith/GraffiTE/work/8f/1750dcd855bb8c2b75cc36254200bd
I believe it's this command which is causing it to stop: mkdtemp(/scratch/261089.1.main.q/bcftools.WR6TOr) failed: No such file or directory
, as I don't have write access to /scratch/
, only the daughter directory /scratch/jgalbraith/
.
Thanks again, James.
Seems that bcftools is picking up an environmental variable, and trying to use that as a temporary directory inside the container where it's not mounted.
Try adding --cleanenv
after --contain
in the nextflow.config.
Hello @jamesdgalbraith,
Just checking in if you had solve your issue?
Cheers,
Clément
Hi Clément,
Sorry for the delay in getting back to you. I managed to get around the first part of the issue by moving the setting of the temporary directory (export TMPDIR=$PWD
) in make_graph process of main.nf
to occur before the bcftools sort -Oz -o sorted.vcf.gz ${vcf}
command.
Unfortunately it's now getting stuck in the graph_align_reads
process, with the error:
ERROR ~ Error executing process > 'graph_align_reads (1)'
Caused by:
Process exceeded running time limit (12h)
Command executed:
GraphAligner -t 40 -x vg -g index/index.vg -f m84140_231030_142528_s2.hifi_reads.default.fastq.gz -a germline.gam
vg pack -x index/index.vg -g germline.gam -o germline.pack -Q 0
Command exit status:
-
I haven't had time to get around to trying to bugfix until today, so I'll extend the params.graph_align_time
in main.nf to 48 hours and see if it'll finish.
Thanks again,
James.
Hello James,
Thanks for your answer. Let me know if you are still stuck with it!
Cheers,
Clément
Hi Clement,
Sorry for the delay in communication. I managed to get that step to run by going into the temporary folder Singularity created in the work
folder and running bash .command.run
. I haven't since tried to resume the run as I realised that the data I was using likely wasn't suitable as it was pooled sequence data from 200 individuals rather than from a single individual.
Thankyou for all the help, and I'll let you know if I have any issues if I end up running it on more appropriate data.
Thanks, James.
I've been trying to run GraffiTE on a cluster and am having it fail at the alignment step. Do you have any pointers on how I can getting it running? I'm not sure if this is a bug with Nextflow/Singularity or with GraffiTE.
Here's the command I've used with the test data, and the log output below