Skip to content

Commit f134d13

Browse files
committed
Template update for nf-core/tools version 1.14
1 parent 88562f8 commit f134d13

File tree

10 files changed

+57
-49
lines changed

10 files changed

+57
-49
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ Remember that PRs should be made against the dev branch, unless you're preparing
1010
1111
Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/rnaseq/tree/master/.github/CONTRIBUTING.md)
1212
-->
13+
<!-- markdownlint-disable ul-indent -->
1314

1415
## PR checklist
1516

1617
- [ ] This comment contains a description of changes (with reason).
1718
- [ ] If you've fixed a bug or added code that should be tested, add tests!
18-
- [ ] If you've added a new tool - add to the software_versions process and a regex to `scrape_software_versions.py`
19-
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/rnaseq/tree/master/.github/CONTRIBUTING.md)
20-
- [ ] If necessary, also make a PR on the nf-core/rnaseq _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
19+
- [ ] If you've added a new tool - add to the software_versions process and a regex to `scrape_software_versions.py`
20+
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](<https://github.com/>nf-core/rnaseq/tree/master/.github/CONTRIBUTING.md)
21+
- [ ] If necessary, also make a PR on the nf-core/rnaseq _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
2122
- [ ] Make sure your code lints (`nf-core lint .`).
2223
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker`).
2324
- [ ] Usage Documentation in `docs/usage.md` is updated.

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
release:
99
types: [published]
1010

11+
# Uncomment if we need an edge release of Nextflow again
12+
# env: NXF_EDGE: 1
13+
1114
jobs:
1215
test:
1316
name: Run workflow tests
@@ -20,7 +23,7 @@ jobs:
2023
strategy:
2124
matrix:
2225
# Nextflow versions: check pipeline minimum and current latest
23-
nxf_ver: ['20.04.0', '21.03.0-edge']
26+
nxf_ver: ['20.04.0', '']
2427
steps:
2528
- name: Check out pipeline code
2629
uses: actions/checkout@v2

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
44
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6-
## v3.1dev - [date]
6+
## v3.1 - [date]
77

88
Initial release of nf-core/rnaseq, created with the [nf-core](https://nf-co.re/) template.
99

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM nfcore/base:1.13.3
1+
FROM nfcore/base:1.14
22
LABEL authors="Phil Ewels, Rickard Hammarén" \
33
description="Docker image containing all software requirements for the nf-core/rnaseq pipeline"
44

@@ -7,7 +7,7 @@ COPY environment.yml /
77
RUN conda env create --quiet -f /environment.yml && conda clean -a
88

99
# Add conda installation dir to PATH (instead of doing 'conda activate')
10-
ENV PATH /opt/conda/envs/nf-core-rnaseq-3.1dev/bin:$PATH
10+
ENV PATH /opt/conda/envs/nf-core-rnaseq-3.1/bin:$PATH
1111

1212
# Dump the details of the installed packages to a file for posterity
13-
RUN conda env export --name nf-core-rnaseq-3.1dev > nf-core-rnaseq-3.1dev.yml
13+
RUN conda env export --name nf-core-rnaseq-3.1 > nf-core-rnaseq-3.1.yml

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool
1919

2020
## Quick Start
2121

22-
1. Install [`nextflow`](https://nf-co.re/usage/installation)
22+
1. Install [`nextflow`](https://nf-co.re/usage/installation) (`>=20.04.0`)
2323

2424
2. Install any of [`Docker`](https://docs.docker.com/engine/installation/), [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/), [`Podman`](https://podman.io/), [`Shifter`](https://nersc.gitlab.io/development/shifter/how-to-use/) or [`Charliecloud`](https://hpc.github.io/charliecloud/) for full pipeline reproducibility _(please only use [`Conda`](https://conda.io/miniconda.html) as a last resort; see [docs](https://nf-co.re/usage/configuration#basic-configuration-profiles))_
2525

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# You can use this file to create a conda environment for this pipeline:
22
# conda env create -f environment.yml
3-
name: nf-core-rnaseq-3.1dev
3+
name: nf-core-rnaseq-3.1
44
channels:
55
- conda-forge
66
- bioconda

lib/NfcoreSchema.groovy

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,14 @@ class NfcoreSchema {
112112
}
113113
// unexpected params
114114
def params_ignore = params.schema_ignore_params.split(',') + 'schema_ignore_params'
115-
if (!expectedParams.contains(specifiedParam) && !params_ignore.contains(specifiedParam)) {
116-
unexpectedParams.push(specifiedParam)
115+
def expectedParamsLowerCase = expectedParams.collect{ it.replace("-", "").toLowerCase() }
116+
def specifiedParamLowerCase = specifiedParam.replace("-", "").toLowerCase()
117+
if (!expectedParams.contains(specifiedParam) && !params_ignore.contains(specifiedParam) && !expectedParamsLowerCase.contains(specifiedParamLowerCase)) {
118+
// Temporarily remove camelCase/camel-case params #1035
119+
def unexpectedParamsLowerCase = unexpectedParams.collect{ it.replace("-", "").toLowerCase()}
120+
if (!unexpectedParamsLowerCase.contains(specifiedParamLowerCase)){
121+
unexpectedParams.push(specifiedParam)
122+
}
117123
}
118124
}
119125

@@ -191,11 +197,11 @@ class NfcoreSchema {
191197

192198
// Remove an element from a JSONArray
193199
private static JSONArray removeElement(jsonArray, element){
194-
def list = []
200+
def list = []
195201
int len = jsonArray.length()
196-
for (int i=0;i<len;i++){
202+
for (int i=0;i<len;i++){
197203
list.add(jsonArray.get(i).toString())
198-
}
204+
}
199205
list.remove(element)
200206
JSONArray jsArray = new JSONArray(list)
201207
return jsArray
@@ -213,7 +219,7 @@ class NfcoreSchema {
213219
// If the param was required, change this
214220
if (definition[key].has("required")) {
215221
def cleaned_required = removeElement(definition[key].required, ignore_param)
216-
definition[key].put("required", cleaned_required)
222+
definition[key].put("required", cleaned_required)
217223
}
218224
}
219225
}
@@ -243,7 +249,7 @@ class NfcoreSchema {
243249
}
244250
// Cast Duration to String
245251
if (p['value'].getClass() == nextflow.util.Duration) {
246-
new_params.replace(p.key, p['value'].toString())
252+
new_params.replace(p.key, p['value'].toString().replaceFirst(/d(?!\S)/, "day"))
247253
}
248254
// Cast LinkedHashMap to String
249255
if (p['value'].getClass() == LinkedHashMap) {
@@ -482,10 +488,10 @@ class NfcoreSchema {
482488
}
483489
workflow_summary['runName'] = workflow.runName
484490
if (workflow.containerEngine) {
485-
workflow_summary['containerEngine'] = "$workflow.containerEngine"
491+
workflow_summary['containerEngine'] = workflow.containerEngine
486492
}
487493
if (workflow.container) {
488-
workflow_summary['container'] = "$workflow.container"
494+
workflow_summary['container'] = workflow.container
489495
}
490496
workflow_summary['launchDir'] = workflow.launchDir
491497
workflow_summary['workDir'] = workflow.workDir
@@ -506,17 +512,7 @@ class NfcoreSchema {
506512
def params_value = params.get(param)
507513
def schema_value = group_params.get(param).default
508514
def param_type = group_params.get(param).type
509-
if (schema_value == null) {
510-
if (param_type == 'boolean') {
511-
schema_value = false
512-
}
513-
if (param_type == 'string') {
514-
schema_value = ''
515-
}
516-
if (param_type == 'integer') {
517-
schema_value = 0
518-
}
519-
} else {
515+
if (schema_value != null) {
520516
if (param_type == 'string') {
521517
if (schema_value.contains('$projectDir') || schema_value.contains('${projectDir}')) {
522518
def sub_string = schema_value.replace('\$projectDir', '')
@@ -535,8 +531,13 @@ class NfcoreSchema {
535531
}
536532
}
537533

538-
if (params_value != schema_value) {
539-
sub_params.put("$param", params_value)
534+
// We have a default in the schema, and this isn't it
535+
if (schema_value != null && params_value != schema_value) {
536+
sub_params.put(param, params_value)
537+
}
538+
// No default in the schema, and this isn't empty
539+
else if (schema_value == null && params_value != "" && params_value != null && params_value != false) {
540+
sub_params.put(param, params_value)
540541
}
541542
}
542543
}
@@ -549,22 +550,23 @@ class NfcoreSchema {
549550
* Beautify parameters for summary and return as string
550551
*/
551552
private static String params_summary_log(workflow, params, json_schema) {
553+
Map colors = log_colours(params.monochrome_logs)
552554
String output = ''
553555
def params_map = params_summary_map(workflow, params, json_schema)
554556
def max_chars = params_max_chars(params_map)
555557
for (group in params_map.keySet()) {
556558
def group_params = params_map.get(group) // This gets the parameters of that particular group
557559
if (group_params) {
558-
output += group + '\n'
560+
output += colors.bold + group + colors.reset + '\n'
559561
for (param in group_params.keySet()) {
560-
output += " \u001B[1m" + param.padRight(max_chars) + ": \u001B[1m" + group_params.get(param) + '\n'
562+
output += " " + colors.blue + param.padRight(max_chars) + ": " + colors.green + group_params.get(param) + colors.reset + '\n'
561563
}
562564
output += '\n'
563565
}
564566
}
565-
output += "[Only displaying parameters that differ from pipeline default]\n"
566567
output += dashed_line(params.monochrome_logs)
567-
output += '\n\n' + dashed_line(params.monochrome_logs)
568+
output += colors.dim + "\n Only displaying parameters that differ from defaults.\n" + colors.reset
569+
output += dashed_line(params.monochrome_logs)
568570
return output
569571
}
570572

main.nf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,11 +378,11 @@ def checkHostname() {
378378
params.hostnames.each { prof, hnames ->
379379
hnames.each { hname ->
380380
if (hostname.contains(hname) && !workflow.profile.contains(prof)) {
381-
log.error '====================================================\n' +
381+
log.error "${c_red}====================================================${c_reset}\n" +
382382
" ${c_red}WARNING!${c_reset} You are running with `-profile $workflow.profile`\n" +
383383
" but your machine hostname is ${c_white}'$hostname'${c_reset}\n" +
384384
" ${c_yellow_bold}It's highly recommended that you use `-profile $prof${c_reset}`\n" +
385-
'============================================================'
385+
"${c_red}====================================================${c_reset}\n"
386386
}
387387
}
388388
}

nextflow.config

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ params {
2525
plaintext_email = false
2626
monochrome_logs = false
2727
help = false
28-
igenomes_base = 's3://ngi-igenomes/igenomes/'
28+
igenomes_base = 's3://ngi-igenomes/igenomes'
2929
tracedir = "${params.outdir}/pipeline_info"
3030
igenomes_ignore = false
3131
custom_config_version = 'master'
3232
custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
3333
hostnames = false
34+
config_profile_name = null
3435
config_profile_description = false
3536
config_profile_contact = false
3637
config_profile_url = false
@@ -65,7 +66,7 @@ profiles {
6566
singularity.enabled = false
6667
podman.enabled = false
6768
shifter.enabled = false
68-
charliecloud = false
69+
charliecloud.enabled = false
6970
process.conda = "$projectDir/environment.yml"
7071
}
7172
debug { process.beforeScript = 'echo $HOSTNAME' }
@@ -94,7 +95,7 @@ profiles {
9495
docker.enabled = false
9596
podman.enabled = true
9697
shifter.enabled = false
97-
charliecloud = false
98+
charliecloud.enabled = false
9899
}
99100
shifter {
100101
singularity.enabled = false
@@ -129,21 +130,22 @@ env {
129130
// Capture exit codes from upstream processes when piping
130131
process.shell = ['/bin/bash', '-euo', 'pipefail']
131132

133+
def trace_timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
132134
timeline {
133135
enabled = true
134-
file = "${params.tracedir}/execution_timeline.html"
136+
file = "${params.tracedir}/execution_timeline_${trace_timestamp}.html"
135137
}
136138
report {
137139
enabled = true
138-
file = "${params.tracedir}/execution_report.html"
140+
file = "${params.tracedir}/execution_report_${trace_timestamp}.html"
139141
}
140142
trace {
141143
enabled = true
142-
file = "${params.tracedir}/execution_trace.txt"
144+
file = "${params.tracedir}/execution_trace_${trace_timestamp}.txt"
143145
}
144146
dag {
145147
enabled = true
146-
file = "${params.tracedir}/pipeline_dag.svg"
148+
file = "${params.tracedir}/pipeline_dag_${trace_timestamp}.svg"
147149
}
148150

149151
manifest {
@@ -153,7 +155,7 @@ manifest {
153155
description = 'Nextflow RNA-Seq analysis pipeline, part of the nf-core community.'
154156
mainScript = 'main.nf'
155157
nextflowVersion = '>=20.04.0'
156-
version = '3.1dev'
158+
version = '3.1'
157159
}
158160

159161
// Function to ensure that resource requirements don't go beyond

nextflow_schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"igenomes_base": {
6363
"type": "string",
6464
"description": "Directory / URL base for iGenomes references.",
65-
"default": "s3://ngi-igenomes/igenomes/",
65+
"default": "s3://ngi-igenomes/igenomes",
6666
"fa_icon": "fas fa-cloud-download-alt",
6767
"hidden": true
6868
},
@@ -183,7 +183,7 @@
183183
"description": "Maximum amount of memory that can be requested for any single job.",
184184
"default": "128.GB",
185185
"fa_icon": "fas fa-memory",
186-
"pattern": "^[\\d\\.]+\\s*.(K|M|G|T)?B$",
186+
"pattern": "^\\d+(\\.\\d+)?\\.?\\s*(K|M|G|T)?B$",
187187
"hidden": true,
188188
"help_text": "Use to set an upper-limit for the memory requirement for each process. Should be a string in the format integer-unit e.g. `--max_memory '8.GB'`"
189189
},
@@ -192,7 +192,7 @@
192192
"description": "Maximum amount of time that can be requested for any single job.",
193193
"default": "240.h",
194194
"fa_icon": "far fa-clock",
195-
"pattern": "^[\\d\\.]+\\.*(s|m|h|d)$",
195+
"pattern": "^(\\d+\\.?\\s*(s|m|h|day)\\s*)+$",
196196
"hidden": true,
197197
"help_text": "Use to set an upper-limit for the time requirement for each process. Should be a string in the format integer-unit e.g. `--max_time '2.h'`"
198198
}

0 commit comments

Comments
 (0)