diff --git a/CHANGELOG.md b/CHANGELOG.md index f0a726768a..62c5dd5765 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -269,6 +269,7 @@ Another big release with lots of new features and bug fixes. Thanks to all contr - Convert `console` snippets to `bash` snippets in the template where applicable ([#1729](https://github.com/nf-core/tools/pull/1729)) - Add `branch` field to module entries in `modules.json` to record what branch a module was installed from ([#1728](https://github.com/nf-core/tools/issues/1728)) - Add customisation option to remove all GitHub support with `nf-core create` ([#1766](https://github.com/nf-core/tools/pull/1766)) +- Incorrect config parameter warnings when customising pipeline template ([#2333](https://github.com/nf-core/tools/pull/2333)) ### Linting diff --git a/nf_core/pipeline-template/lib/WorkflowMain.groovy b/nf_core/pipeline-template/lib/WorkflowMain.groovy index b6c3336f26..5824dae2fb 100755 --- a/nf_core/pipeline-template/lib/WorkflowMain.groovy +++ b/nf_core/pipeline-template/lib/WorkflowMain.groovy @@ -49,8 +49,8 @@ class WorkflowMain { Nextflow.error("Please provide an input samplesheet to the pipeline e.g. '--input samplesheet.csv'") } } - {% if igenomes -%} + {%- if igenomes %} // // Get attribute from genome config file e.g. fasta // @@ -62,4 +62,5 @@ class WorkflowMain { } return null } -{% endif -%}} + {%- endif %} +} diff --git a/nf_core/pipeline-template/main.nf b/nf_core/pipeline-template/main.nf index 561f2f6384..73984cb8fc 100644 --- a/nf_core/pipeline-template/main.nf +++ b/nf_core/pipeline-template/main.nf @@ -7,7 +7,7 @@ {%- if branded %} Website: https://nf-co.re/{{ short_name }} Slack : https://nfcore.slack.com/channels/{{ short_name }} -{% endif -%} +{%- endif %} ---------------------------------------------------------------------------------------- */ diff --git a/nf_core/pipeline-template/nextflow.config b/nf_core/pipeline-template/nextflow.config index e329b3e6fe..a1ca2e6157 100644 --- a/nf_core/pipeline-template/nextflow.config +++ b/nf_core/pipeline-template/nextflow.config @@ -13,12 +13,14 @@ params { // Input options input = null -{% if igenomes %} + {%- if igenomes %} // References genome = null igenomes_base = 's3://ngi-igenomes/igenomes' igenomes_ignore = false - {% endif -%} + {% else %} + fasta = null + {%- endif %} // MultiQC options multiqc_config = null @@ -37,17 +39,18 @@ params { hook_url = null help = false version = false -{% if nf_core_configs %} // Config options + config_profile_name = null + config_profile_description = null + + {%- if nf_core_configs %} custom_config_version = 'master' custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" - config_profile_description = null config_profile_contact = null config_profile_url = null - config_profile_name = null + {% endif %} -{% endif %} // Max resource options // Defaults only, expecting to be overwritten max_memory = '128.GB' @@ -81,7 +84,7 @@ try { // } catch (Exception e) { // System.err.println("WARNING: Could not load nf-core/config/{{ short_name }} profiles: ${params.custom_config_base}/pipeline/{{ short_name }}.config") // } -{% endif %} +{% endif -%} profiles { debug { @@ -188,14 +191,14 @@ plugins { id 'nf-validation@0.2.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet } -{% if igenomes %} +{% if igenomes -%} // Load igenomes.config if required if (!params.igenomes_ignore) { includeConfig 'conf/igenomes.config' } else { params.genomes = [:] } -{% endif %} +{% endif -%} // Export these variables to prevent local Python/R libraries from conflicting with those in the container // The JULIA depot path has been adjusted to a fixed path `/usr/local/share/julia` that needs to be used for packages in the container.