From e6c2474b2a0f90ff6d7db845c4f00db989885659 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Wed, 11 Dec 2024 12:19:30 +0100 Subject: [PATCH] Use variable for includeConfig to avoid ternary expression --- nf_core/pipeline-template/nextflow.config | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nf_core/pipeline-template/nextflow.config b/nf_core/pipeline-template/nextflow.config index 36018b1062..84d2c68427 100644 --- a/nf_core/pipeline-template/nextflow.config +++ b/nf_core/pipeline-template/nextflow.config @@ -210,11 +210,13 @@ profiles { {% if nf_core_configs -%} // Load nf-core custom profiles from different Institutions -includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" +custom_config_url = !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" +includeConfig custom_config_url // Load {{ name }} custom profiles from different institutions. // TODO nf-core: Optionally, you can add a pipeline-specific nf-core config at https://github.com/nf-core/configs -// includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/pipeline/{{ short_name }}.config" : "/dev/null" +// custom_pipeline_config_url = !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/pipeline/{{ short_name }}.config" : "/dev/null" +// includeConfig custom_pipeline_config_url {%- endif %} // Set default registry for Apptainer, Docker, Podman, Charliecloud and Singularity independent of -profile @@ -228,7 +230,8 @@ charliecloud.registry = 'quay.io' {% if igenomes -%} // Load igenomes.config if required -includeConfig !params.igenomes_ignore ? 'conf/igenomes.config' : 'conf/igenomes_ignored.config' +igenomes_config_path = !params.igenomes_ignore ? 'conf/igenomes.config' : 'conf/igenomes_ignored.config' +includeConfig igenomes_config_path {%- endif %} // Export these variables to prevent local Python/R libraries from conflicting with those in the container