We got this error `Cannot invoke "java.nio.file.P...
# magmap
d
We got this error
Cannot invoke "java.nio.file.Path.getFileSystem()" because "path" is null
running nf-core/magmap on
dardel
nextflow run nf-core/magmap -r dev -profile pdc_kth -params-file params.yml -c nextflow.log
Nextflow version: 25.04.7 the pipeline was launched on dardel. my run worked fine but maybe @Nicolo you can give more details. (write here content of
params.yml
and
nextflow
.config maybe)
n
Hello, params.yml: project: naiss2025-5- outdir: results_magmap input: fastq_samplesheet.csv genomeinfo: MAG_samplesheet.csv skip_qc: true skip_fastqc: true skip_trimming: true skip_sourmash: false sourmash_save_sourmash: true sourmash_save_prefetch: true sourmash_save_prefetch_csv: true bbmap_save_bam: true bbmap_save_index: true save_concatenated_genomes: true nextflow.config: process { withName: BBMAP_BBDUK { memory = 128.GB cpus = 20 time = '1d' } withName: BBMAP_INDEX { memory = 1.TB cpus = 64 time = '2d' } withName: PROKKAGFF2TSV { memory = 400.GB cpus = 24 time = '1d' } withName: BBMAP_ALIGN { memory = 1.TB cpus = 128 maxForks = 5 time = '3d' } } running on dardel nextflow run nf-core/magmap -r dev -profile pdc_kth -params-file params.yml -c nextflow.config Error: ERROR ~ Cannot invoke "java.nio.file.Path.getFileSystem()" because "path" is null -- Check script '/cfs/klemming/home/n/nicoivan/.nextflow/assets/nf-core/magmap/subworkflows/nf-core/utils_nfcore_pipeline/main.nf' at line: 82 or see '.nextflow.log' file for more details ERROR ~ Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting -- Check '.nextflow.log' file for details -[nf-core/magmap] Pipeline completed with errors
d
My hunch is that there's an output file missing from one of the processes. Can you check in
.nextflow.log
which was the last process to run? Starting from there, I'd check if unsetting one or more of the
save_
params might help. (I never run with them, and it never failed. OTOH, missing files should be detected even if
save_
something is not set, so I'm looking for a straw here...)
n
Here is where the error appeared: Nov-11 100103.386 [main] DEBUG nextflow.script.ScriptRunner - > Awaiting termination Nov-11 100103.386 [main] DEBUG nextflow.Session - Session await Nov-11 100103.387 [Actor Thread 250] ERROR nextflow.extension.OperatorImpl - @unknown java.lang.NullPointerException: Cannot invoke "java.nio.file.Path.getFileSystem()" because "path" is null Nov-11 100103.404 [Actor Thread 250] DEBUG nextflow.Session - Session aborted -- Cause: Cannot invoke "java.nio.file.Path.getFileSystem()" because "path" is null
d
What I'm after is the process name that seem to be the last executed. Process names look like
BBMAP_ALIGN
. You might need to go further up in the log to see what Nextflow was waiting for. Or, if you still have the session output you could perhaps see which process(es) were running at the time the pipeline failed.
n
This might be better
d
As far as I can see, none of the processes started. Did this happen very early? If so, which Java are you using? I use
java/17.0.4
, i.e. like this:
module load bioinfo-tools PDC apptainer java/17.0.4
.
n
It happens almost immediately, right after listing all the steps. I wasn't manually loading java but now I've loaded java/17.0.4 and removed all save_ params but still got the same error
d
Are you using your own Nextflow or the module? (I use my own, which is why I need to load the java module.)
n
I'm using the module. should I try create a conda env and install all dependencies?
d
Unload the Nextflow module and install Nextflow in your
~/bin
directory:
cd ~/bin; curl -s <https://get.nextflow.io> | bash
(assuming your
~/bin
is in your
PATH
).
d
I could reproduce the same error on my local computer running
nextflow run nf-core/magmap -r dev -profile test,docker -params-file params.yml
if I remove from the
params.yml
it works but then it fails again on another bug I found. so that's good to know!
I reported one bug in github issue: https://github.com/nf-core/magmap/issues/170
I will try to find now the other bug, but if I fix this one ☝️ you can go ahead and rerun it
n
Just tried removing: skip_qc: true skip_fastqc: true skip_trimming: true as Danilo suggested and it works
d
So, it's skipping the trimming and qc that fails? Should be easy to fix, great that you found this @Danilo Di Leo.
(I just asked @Rike Hanssen for a rereview but she hasn't responded. Great if you can fix this soon, @Danilo Di Leo.)
d
there are two different bugs. 1. skip_trimming + bbduk 2. skip_fastq
true
or skip_qc
true
I am trying to understand the second now
d
OK. Probably related somehow as it's all preprocessing.
Before you fix the issues, make sure you make test-cases.
👍 1
(And maybe you want to add this finding to the thread at #CEA7TBJGJ?)