Anyone have any idea why linting fails to parse th...
# tools
j
Anyone have any idea why linting fails to parse the config here? github.com/sanger-tol/metagenomeassembly/…/93832966686?pr=100#…
Copy code
ERROR ~ Cannot invoke method split() on null object
Offending part of the config looks like this:
Copy code
publishDir = [
            [
                path: { "${params.outdir}/bins/fasta/binette" },
                mode: params.publish_dir_mode,
                saveAs: { filename -> filename.split('/').last() },
                pattern: "**.fa.gz"
            ],
        ]
I cannot replicate the error locally with the same Nextflow (26.04.06) and tools (4.1.0) version...
👀 1
m
which nf-core version is this?
m
4.1.0 I believe
m
can you try to rerun it in the ci with verbose mode?
j
I can give that a go, yes
m
Can you run
nextflow config
without problems?
j
Yep
github.com/sanger-tol/metagenomeassembly/…/94062327649?pr=100 Run with
--verbose
- not much more informative
Running
nextflow config -o json
myself works fine.
Oh, I have two conflicting versions of Nextflow installed.
The conda environment was being shadowed
Copy code
nextflow config -o json                                                                                                                                                        (nextflow)
Downloading plugin nf-tower@1.28.2
WARN: Unrecognized config option 'validation.defaultIgnoreParams'
WARN: Unrecognized config option 'validation.monochromeLogs'
ERROR ~ Cannot invoke method split() on null object
I can replicate it locally now
-o json
fails but I can run it without it. I see the following in the config it spits out:
Copy code
publishDir = [[path:_nf_config_28624499b50673f5$_run_closure1$_closure31$_closure79@6889f56f, mode:'copy', saveAs:_nf_config_28624499b50673f5$_run_closure1$_closure31$_closure80@231b35fb, pattern:'**.fa.gz'], [path:_nf_config_28624499b50673f5$_run_closure1$_closure31$_closure81@26da1ba2, mode:'copy', saveAs:_nf_config_28624499b50673f5$_run_closure1$_closure31$_closure82@3820cfe], [path:_nf_config_28624499b50673f5$_run_closure1$_closure31$_closure83@2407a36c, mode:'copy', saveAs:_nf_config_28624499b50673f5$_run_closure1$_closure31$_closure84@5ec9eefa]]
m
okay, so it is some nextflow problem. maybe make an issue on the nextflow repo?
👍 1
j
It doesn't seem to like a bunch of things. I also had to comment out sections like:
Copy code
[
                path: { "${params.outdir}/bins/log/dastool" },
                mode: params.publish_dir_mode,
                saveAs: { filename -> filename.endsWith("_DASTool_contig2bin.tsv") ? null : filename }
            ],
Weirdly it's fine with
.equals()
...
OK, reported. It turns out this is only an issue when the publishDir directive is a list of lists - if you only have one entry then it works fine.
👍🏻 1
thanks 1
m
that would have been my guess as well, thanks!
j
All the more reason to switch to workflow outputs, a fundamentally better system. Just need to justify the time spent plumbing...
this 1