I'm trying to override some of the configuration s...
# help
a
I'm trying to override some of the configuration settings in an nf-core pipeline through the supply of a custom.config file. I wrote the custom.config as shown:
Copy code
process {
    executor = 'slurm'
    queue = 'myqueue'
    clusterOptions = '--account=myaccount --qos=myqos'
    cpus = 10
    memory = 30.GB
    time = '8h'
}
trace.overwrite = true
executor.queueSize = 5
I provide the custom.config to the nextflow command as:
Copy code
nextflow run nf-core/taxprofiler -params-file ~/params.yaml -profile apptainer -c custom.config
But my specifications in the custom.config are being ignored and those supplied from the pipeline (in this case, taxprofiler) are used, instead. How do I override an nf-core pipelines' default configuration settings correctly?
p
Which ones? Note that process specificity is still important, so if you have a process
withLabel
selector in the pipeline that'll still win
You can do stuff like
withLabel '*'
to overcome that
a
Well, I need to override all processes with these defaults - for potentially all nf-core pipelines. Is
withLabel
required?
If the pipeline has
withLabel
selectors for any processes, they will have priority over your selectors without them
So the only way to override this is by also having
withLabel
selectors
You can do that and still match all processes for all pipelines by using a wildcard as above
a
Ah, that makes sense
Is an institutional config profile another solution to this?
p
Nope, those are just config profiles, same hierarchy applies however the config is loaded
a
Where the pipeline config takes highest priority?
p
Not pipeline, selector
There are two things happening here. Configs are loaded in order (see https://docs.seqera.io/nextflow/config#configuration-files )
Then process config is applied in order of hierarchy
Got to run sorry, tag-team... @Nicolas Vannieuwkerke as he's online! 😅 rightwards pushing hand::skin tone 2
salute 1
n
Yeah I'd just try to do something like this:
Copy code
process {
    withName: '.*' {
        executor = 'slurm'
        queue = 'myqueue'
        clusterOptions = '--account=myaccount --qos=myqos'
        cpus = 10
        memory = 30.GB
        time = '8h'
    }
}
this 1
a
Thank you both! I didn't know wildcards could be used like that - it is working as intended!
🎉 2
n
Glad you got it working!