Skip to content

Commit e8d1627

Browse files
committedDec 8, 2022
Template update for nf-core/tools version 2.7.1
1 parent 72edef2 commit e8d1627

22 files changed

+195
-113
lines changed
 

‎.devcontainer/devcontainer.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "nfcore",
3+
"image": "nfcore/gitpod:latest",
4+
"remoteUser": "gitpod",
5+
6+
// Configure tool-specific properties.
7+
"customizations": {
8+
// Configure properties specific to VS Code.
9+
"vscode": {
10+
// Set *default* container specific settings.json values on container create.
11+
"settings": {
12+
"python.defaultInterpreterPath": "/opt/conda/bin/python",
13+
"python.linting.enabled": true,
14+
"python.linting.pylintEnabled": true,
15+
"python.formatting.autopep8Path": "/opt/conda/bin/autopep8",
16+
"python.formatting.yapfPath": "/opt/conda/bin/yapf",
17+
"python.linting.flake8Path": "/opt/conda/bin/flake8",
18+
"python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle",
19+
"python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle",
20+
"python.linting.pylintPath": "/opt/conda/bin/pylint"
21+
},
22+
23+
// Add the IDs of extensions you want installed when the container is created.
24+
"extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"]
25+
}
26+
}
27+
}

‎.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.config linguist-language=nextflow
2+
*.nf.test linguist-language=nextflow
23
modules/nf-core/** linguist-generated
34
subworkflows/nf-core/** linguist-generated

‎.github/CONTRIBUTING.md

+16
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,19 @@ If you are using a new feature from core Nextflow, you may bump the minimum requ
101101
### Images and figures
102102

103103
For overview images and other documents we follow the nf-core [style guidelines and examples](https://nf-co.re/developers/design_guidelines).
104+
105+
## GitHub Codespaces
106+
107+
This repo includes a devcontainer configuration which will create a GitHub Codespaces for Nextflow development! This is an online developer environment that runs in your browser, complete with VSCode and a terminal.
108+
109+
To get started:
110+
111+
- Open the repo in [Codespaces](https://github.com/nf-core/rnaseq/codespaces)
112+
- Tools installed
113+
- nf-core
114+
- Nextflow
115+
116+
Devcontainer specs:
117+
118+
- [DevContainer config](.devcontainer/devcontainer.json)
119+
- [Dockerfile](.devcontainer/Dockerfile)

‎.github/ISSUE_TEMPLATE/bug_report.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ body:
4242
attributes:
4343
label: System information
4444
description: |
45-
* Nextflow version _(eg. 21.10.3)_
45+
* Nextflow version _(eg. 22.10.1)_
4646
* Hardware _(eg. HPC, Desktop, Cloud)_
4747
* Executor _(eg. slurm, local, awsbatch)_
4848
* Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_

‎.github/workflows/ci.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
env:
1212
NXF_ANSI_LOG: false
1313

14+
concurrency:
15+
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
16+
cancel-in-progress: true
17+
1418
jobs:
1519
test:
1620
name: Run pipeline with test data
@@ -20,11 +24,11 @@ jobs:
2024
strategy:
2125
matrix:
2226
NXF_VER:
23-
- "21.10.3"
27+
- "22.10.1"
2428
- "latest-everything"
2529
steps:
2630
- name: Check out pipeline code
27-
uses: actions/checkout@v2
31+
uses: actions/checkout@v3
2832

2933
- name: Install Nextflow
3034
uses: nf-core/setup-nextflow@v1

‎.github/workflows/fix-linting.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}
2626

27-
- uses: actions/setup-node@v2
27+
- uses: actions/setup-node@v3
2828

2929
- name: Install Prettier
3030
run: npm install -g prettier @prettier/plugin-php
@@ -34,9 +34,9 @@ jobs:
3434
id: prettier_status
3535
run: |
3636
if prettier --check ${GITHUB_WORKSPACE}; then
37-
echo "::set-output name=result::pass"
37+
echo "name=result::pass" >> $GITHUB_OUTPUT
3838
else
39-
echo "::set-output name=result::fail"
39+
echo "name=result::fail" >> $GITHUB_OUTPUT
4040
fi
4141
4242
- name: Run 'prettier --write'

‎.github/workflows/linting.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ name: nf-core linting
44
# that the code meets the nf-core guidelines.
55
on:
66
push:
7+
branches:
8+
- dev
79
pull_request:
810
release:
911
types: [published]
@@ -12,9 +14,9 @@ jobs:
1214
EditorConfig:
1315
runs-on: ubuntu-latest
1416
steps:
15-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1618

17-
- uses: actions/setup-node@v2
19+
- uses: actions/setup-node@v3
1820

1921
- name: Install editorconfig-checker
2022
run: npm install -g editorconfig-checker
@@ -25,9 +27,9 @@ jobs:
2527
Prettier:
2628
runs-on: ubuntu-latest
2729
steps:
28-
- uses: actions/checkout@v2
30+
- uses: actions/checkout@v3
2931

30-
- uses: actions/setup-node@v2
32+
- uses: actions/setup-node@v3
3133

3234
- name: Install Prettier
3335
run: npm install -g prettier
@@ -38,7 +40,7 @@ jobs:
3840
PythonBlack:
3941
runs-on: ubuntu-latest
4042
steps:
41-
- uses: actions/checkout@v2
43+
- uses: actions/checkout@v3
4244

4345
- name: Check code lints with Black
4446
uses: psf/black@stable
@@ -69,12 +71,12 @@ jobs:
6971
runs-on: ubuntu-latest
7072
steps:
7173
- name: Check out pipeline code
72-
uses: actions/checkout@v2
74+
uses: actions/checkout@v3
7375

7476
- name: Install Nextflow
7577
uses: nf-core/setup-nextflow@v1
7678

77-
- uses: actions/setup-python@v3
79+
- uses: actions/setup-python@v4
7880
with:
7981
python-version: "3.7"
8082
architecture: "x64"
@@ -97,7 +99,7 @@ jobs:
9799

98100
- name: Upload linting log file artifact
99101
if: ${{ always() }}
100-
uses: actions/upload-artifact@v2
102+
uses: actions/upload-artifact@v3
101103
with:
102104
name: linting-logs
103105
path: |

‎.github/workflows/linting_comment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- name: Get PR number
2020
id: pr_number
21-
run: echo "::set-output name=pr_number::$(cat linting-logs/PR_number.txt)"
21+
run: echo "name=pr_number::$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT
2222

2323
- name: Post PR comment
2424
uses: marocchino/sticky-pull-request-comment@v2

‎.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
email_template.html
22
adaptivecard.json
3+
slackreport.json
34
.nextflow*
45
work/
56
data/
@@ -8,3 +9,4 @@ results/
89
testing/
910
testing*
1011
*.pyc
12+
bin/

‎CHANGELOG.md

+1-1
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.9 - [date]
6+
## v3.10dev - [date]
77

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

‎CITATION.cff

-56
This file was deleted.

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/rnaseq/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)
44

5-
[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A521.10.3-23aa62.svg)](https://www.nextflow.io/)
5+
[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A522.10.1-23aa62.svg)](https://www.nextflow.io/)
66
[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)
77
[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)
88
[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)
@@ -31,7 +31,7 @@ On release, automated continuous integration tests run the pipeline on a full-si
3131

3232
## Quick Start
3333

34-
1. Install [`Nextflow`](https://www.nextflow.io/docs/latest/getstarted.html#installation) (`>=21.10.3`)
34+
1. Install [`Nextflow`](https://www.nextflow.io/docs/latest/getstarted.html#installation) (`>=22.10.1`)
3535

3636
2. Install any of [`Docker`](https://docs.docker.com/engine/installation/), [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/) (you can follow [this tutorial](https://singularity-tutorial.github.io/01-installation/)), [`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 _(you can use [`Conda`](https://conda.io/miniconda.html) both to install Nextflow itself and also to manage software within pipelines. Please only use it within pipelines as a last resort; see [docs](https://nf-co.re/usage/configuration#basic-configuration-profiles))_.
3737

‎assets/slackreport.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"attachments": [
3+
{
4+
"fallback": "Plain-text summary of the attachment.",
5+
"color": "<% if (success) { %>good<% } else { %>danger<%} %>",
6+
"author_name": "sanger-tol/readmapping v${version} - ${runName}",
7+
"author_icon": "https://www.nextflow.io/docs/latest/_static/favicon.ico",
8+
"text": "<% if (success) { %>Pipeline completed successfully!<% } else { %>Pipeline completed with errors<% } %>",
9+
"fields": [
10+
{
11+
"title": "Command used to launch the workflow",
12+
"value": "```${commandLine}```",
13+
"short": false
14+
}
15+
<%
16+
if (!success) { %>
17+
,
18+
{
19+
"title": "Full error message",
20+
"value": "```${errorReport}```",
21+
"short": false
22+
},
23+
{
24+
"title": "Pipeline configuration",
25+
"value": "<% out << summary.collect{ k,v -> k == "hook_url" ? "_${k}_: (_hidden_)" : ( ( v.class.toString().contains('Path') || ( v.class.toString().contains('String') && v.contains('/') ) ) ? "_${k}_: `${v}`" : (v.class.toString().contains('DateTime') ? ("_${k}_: " + v.format(java.time.format.DateTimeFormatter.ofLocalizedDateTime(java.time.format.FormatStyle.MEDIUM))) : "_${k}_: ${v}") ) }.join(",\n") %>",
26+
"short": false
27+
}
28+
<% }
29+
%>
30+
],
31+
"footer": "Completed at <% out << dateComplete.format(java.time.format.DateTimeFormatter.ofLocalizedDateTime(java.time.format.FormatStyle.MEDIUM)) %> (duration: ${duration})"
32+
}
33+
]
34+
}

‎docs/usage.md

+15-9
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ nextflow pull nf-core/rnaseq
8383

8484
It is a good idea to specify a pipeline version when running the pipeline on your data. This ensures that a specific version of the pipeline code and software are used when you run your pipeline. If you keep using the same tag, you'll be running the same version of the pipeline, even if there have been changes to the code since.
8585

86-
First, go to the [nf-core/rnaseq releases page](https://github.com/nf-core/rnaseq/releases) and find the latest version number - numeric only (eg. `1.3.1`). Then specify this when running the pipeline with `-r` (one hyphen) - eg. `-r 1.3.1`.
86+
First, go to the [nf-core/rnaseq releases page](https://github.com/nf-core/rnaseq/releases) and find the latest pipeline version - numeric only (eg. `1.3.1`). Then specify this when running the pipeline with `-r` (one hyphen) - eg. `-r 1.3.1`. Of course, you can switch to another version by changing the number after the `-r` flag.
8787

88-
This version number will be logged in reports when you run the pipeline, so that you'll know what you used when you look back in the future.
88+
This version number will be logged in reports when you run the pipeline, so that you'll know what you used when you look back in the future. For example, at the bottom of the MultiQC reports.
8989

9090
## Core Nextflow arguments
9191

@@ -95,7 +95,7 @@ This version number will be logged in reports when you run the pipeline, so that
9595

9696
Use this parameter to choose a configuration profile. Profiles can give configuration presets for different compute environments.
9797

98-
Several generic profiles are bundled with the pipeline which instruct the pipeline to use software packaged using different methods (Docker, Singularity, Podman, Shifter, Charliecloud, Conda) - see below. When using Biocontainers, most of these software packaging methods pull Docker containers from quay.io e.g [FastQC](https://quay.io/repository/biocontainers/fastqc) except for Singularity which directly downloads Singularity images via https hosted by the [Galaxy project](https://depot.galaxyproject.org/singularity/) and Conda which downloads and installs software locally from [Bioconda](https://bioconda.github.io/).
98+
Several generic profiles are bundled with the pipeline which instruct the pipeline to use software packaged using different methods (Docker, Singularity, Podman, Shifter, Charliecloud, Conda) - see below.
9999

100100
> We highly recommend the use of Docker or Singularity containers for full pipeline reproducibility, however when this is not possible, Conda is also supported.
101101
@@ -104,8 +104,11 @@ The pipeline also dynamically loads configurations from [https://github.com/nf-c
104104
Note that multiple profiles can be loaded, for example: `-profile test,docker` - the order of arguments is important!
105105
They are loaded in sequence, so later profiles can overwrite earlier profiles.
106106

107-
If `-profile` is not specified, the pipeline will run locally and expect all software to be installed and available on the `PATH`. This is _not_ recommended.
107+
If `-profile` is not specified, the pipeline will run locally and expect all software to be installed and available on the `PATH`. This is _not_ recommended, since it can lead to different results on different machines dependent on the computer enviroment.
108108

109+
- `test`
110+
- A profile with a complete configuration for automated testing
111+
- Includes links to test data so needs no other parameters
109112
- `docker`
110113
- A generic configuration profile to be used with [Docker](https://docker.com/)
111114
- `singularity`
@@ -118,9 +121,6 @@ If `-profile` is not specified, the pipeline will run locally and expect all sof
118121
- A generic configuration profile to be used with [Charliecloud](https://hpc.github.io/charliecloud/)
119122
- `conda`
120123
- A generic configuration profile to be used with [Conda](https://conda.io/docs/). Please only use Conda as a last resort i.e. when it's not possible to run the pipeline with Docker, Singularity, Podman, Shifter or Charliecloud.
121-
- `test`
122-
- A profile with a complete configuration for automated testing
123-
- Includes links to test data so needs no other parameters
124124

125125
### `-resume`
126126

@@ -169,8 +169,14 @@ Work dir:
169169
Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run`
170170
```
171171

172+
#### For beginners
173+
174+
A first step to bypass this error, you could try to increase the amount of CPUs, memory, and time for the whole pipeline. Therefor you can try to increase the resource for the parameters `--max_cpus`, `--max_memory`, and `--max_time`. Based on the error above, you have to increase the amount of memory. Therefore you can go to the [parameter documentation of rnaseq](https://nf-co.re/rnaseq/3.9/parameters) and scroll down to the `show hidden parameter` button to get the default value for `--max_memory`. In this case 128GB, you than can try to run your pipeline again with `--max_memory 200GB -resume` to skip all process, that were already calculated. If you can not increase the resource of the complete pipeline, you can try to adapt the resource for a single process as mentioned below.
175+
176+
#### Advanced option on process level
177+
172178
To bypass this error you would need to find exactly which resources are set by the `STAR_ALIGN` process. The quickest way is to search for `process STAR_ALIGN` in the [nf-core/rnaseq Github repo](https://github.com/nf-core/rnaseq/search?q=process+STAR_ALIGN).
173-
We have standardised the structure of Nextflow DSL2 pipelines such that all module files will be present in the `modules/` directory and so, based on the search results, the file we want is `modules/nf-core/software/star/align/main.nf`.
179+
We have standardised the structure of Nextflow DSL2 pipelines such that all module files will be present in the `modules/` directory and so, based on the search results, the file we want is `modules/nf-core/star/align/main.nf`.
174180
If you click on the link to that file you will notice that there is a `label` directive at the top of the module that is set to [`label process_high`](https://github.com/nf-core/rnaseq/blob/4c27ef5610c87db00c3c5a3eed10b1d161abf575/modules/nf-core/software/star/align/main.nf#L9).
175181
The [Nextflow `label`](https://www.nextflow.io/docs/latest/process.html#label) directive allows us to organise workflow processes in separate groups which can be referenced in a configuration file to select and configure subset of processes having similar computing requirements.
176182
The default values for the `process_high` label are set in the pipeline's [`base.config`](https://github.com/nf-core/rnaseq/blob/4c27ef5610c87db00c3c5a3eed10b1d161abf575/conf/base.config#L33-L37) which in this case is defined as 72GB.
@@ -189,7 +195,7 @@ process {
189195
>
190196
> If you get a warning suggesting that the process selector isn't recognised check that the process name has been specified correctly.
191197
192-
### Updating containers
198+
### Updating containers (advanced users)
193199

194200
The [Nextflow DSL2](https://www.nextflow.io/docs/latest/dsl2.html) implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies. If for some reason you need to use a different version of a particular tool with the pipeline then you just need to identify the `process` name and override the Nextflow `container` definition for that process using the `withName` declaration. For example, in the [nf-core/viralrecon](https://nf-co.re/viralrecon) pipeline a tool called [Pangolin](https://github.com/cov-lineages/pangolin) has been used during the COVID-19 pandemic to assign lineages to SARS-CoV-2 genome sequenced samples. Given that the lineage assignments change quite frequently it doesn't make sense to re-release the nf-core/viralrecon everytime a new version of Pangolin has been released. However, you can override the default container used by the pipeline by creating a custom config file and passing it as a command-line argument via `-c custom.config`.
195201

‎lib/NfcoreSchema.groovy

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ class NfcoreSchema {
4646
'quiet',
4747
'syslog',
4848
'v',
49-
'version',
5049

5150
// Options for `nextflow run` command
5251
'ansi',

‎lib/NfcoreTemplate.groovy

+32-9
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,25 @@ class NfcoreTemplate {
3232
}
3333
}
3434

35+
//
36+
// Generate version string
37+
//
38+
public static String version(workflow) {
39+
String version_string = ""
40+
41+
if (workflow.manifest.version) {
42+
def prefix_v = workflow.manifest.version[0] != 'v' ? 'v' : ''
43+
version_string += "${prefix_v}${workflow.manifest.version}"
44+
}
45+
46+
if (workflow.commitId) {
47+
def git_shortsha = workflow.commitId.substring(0, 7)
48+
version_string += "-g${git_shortsha}"
49+
}
50+
51+
return version_string
52+
}
53+
3554
//
3655
// Construct and send completion email
3756
//
@@ -61,7 +80,7 @@ class NfcoreTemplate {
6180
misc_fields['Nextflow Compile Timestamp'] = workflow.nextflow.timestamp
6281

6382
def email_fields = [:]
64-
email_fields['version'] = workflow.manifest.version
83+
email_fields['version'] = NfcoreTemplate.version(workflow)
6584
email_fields['runName'] = workflow.runName
6685
email_fields['success'] = workflow.success
6786
email_fields['dateComplete'] = workflow.complete
@@ -146,10 +165,10 @@ class NfcoreTemplate {
146165
}
147166

148167
//
149-
// Construct and send adaptive card
150-
// https://adaptivecards.io
168+
// Construct and send a notification to a web server as JSON
169+
// e.g. Microsoft Teams and Slack
151170
//
152-
public static void adaptivecard(workflow, params, summary_params, projectDir, log) {
171+
public static void IM_notification(workflow, params, summary_params, projectDir, log) {
153172
def hook_url = params.hook_url
154173

155174
def summary = [:]
@@ -170,21 +189,24 @@ class NfcoreTemplate {
170189
misc_fields['nxf_timestamp'] = workflow.nextflow.timestamp
171190

172191
def msg_fields = [:]
173-
msg_fields['version'] = workflow.manifest.version
192+
msg_fields['version'] = NfcoreTemplate.version(workflow)
174193
msg_fields['runName'] = workflow.runName
175194
msg_fields['success'] = workflow.success
176195
msg_fields['dateComplete'] = workflow.complete
177196
msg_fields['duration'] = workflow.duration
178197
msg_fields['exitStatus'] = workflow.exitStatus
179198
msg_fields['errorMessage'] = (workflow.errorMessage ?: 'None')
180199
msg_fields['errorReport'] = (workflow.errorReport ?: 'None')
181-
msg_fields['commandLine'] = workflow.commandLine
200+
msg_fields['commandLine'] = workflow.commandLine.replaceFirst(/ +--hook_url +[^ ]+/, "")
182201
msg_fields['projectDir'] = workflow.projectDir
183202
msg_fields['summary'] = summary << misc_fields
184203

185204
// Render the JSON template
186205
def engine = new groovy.text.GStringTemplateEngine()
187-
def hf = new File("$projectDir/assets/adaptivecard.json")
206+
// Different JSON depending on the service provider
207+
// Defaults to "Adaptive Cards" (https://adaptivecards.io), except Slack which has its own format
208+
def json_path = hook_url.contains("hooks.slack.com") ? "slackreport.json" : "adaptivecard.json"
209+
def hf = new File("$projectDir/assets/${json_path}")
188210
def json_template = engine.createTemplate(hf).make(msg_fields)
189211
def json_message = json_template.toString()
190212

@@ -209,7 +231,7 @@ class NfcoreTemplate {
209231
if (workflow.stats.ignoredCount == 0) {
210232
log.info "-${colors.purple}[$workflow.manifest.name]${colors.green} Pipeline completed successfully${colors.reset}-"
211233
} else {
212-
log.info "-${colors.purple}[$workflow.manifest.name]${colors.red} Pipeline completed successfully, but with errored process(es) ${colors.reset}-"
234+
log.info "-${colors.purple}[$workflow.manifest.name]${colors.yellow} Pipeline completed successfully, but with errored process(es) ${colors.reset}-"
213235
}
214236
} else {
215237
log.info "-${colors.purple}[$workflow.manifest.name]${colors.red} Pipeline completed with errors${colors.reset}-"
@@ -297,6 +319,7 @@ class NfcoreTemplate {
297319
//
298320
public static String logo(workflow, monochrome_logs) {
299321
Map colors = logColours(monochrome_logs)
322+
String workflow_version = NfcoreTemplate.version(workflow)
300323
String.format(
301324
"""\n
302325
${dashedLine(monochrome_logs)}
@@ -305,7 +328,7 @@ class NfcoreTemplate {
305328
${colors.blue} |\\ | |__ __ / ` / \\ |__) |__ ${colors.yellow}} {${colors.reset}
306329
${colors.blue} | \\| | \\__, \\__/ | \\ |___ ${colors.green}\\`-._,-`-,${colors.reset}
307330
${colors.green}`._,._,\'${colors.reset}
308-
${colors.purple} ${workflow.manifest.name} v${workflow.manifest.version}${colors.reset}
331+
${colors.purple} ${workflow.manifest.name} ${workflow_version}${colors.reset}
309332
${dashedLine(monochrome_logs)}
310333
""".stripIndent()
311334
)

‎lib/WorkflowMain.groovy

+12-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class WorkflowMain {
1919
}
2020

2121
//
22-
// Print help to screen if required
22+
// Generate help string
2323
//
2424
public static String help(workflow, params, log) {
2525
def command = "nextflow run ${workflow.manifest.name} --input samplesheet.csv --genome GRCh37 -profile docker"
@@ -32,7 +32,7 @@ class WorkflowMain {
3232
}
3333

3434
//
35-
// Print parameter summary log to screen
35+
// Generate parameter summary log string
3636
//
3737
public static String paramsSummaryLog(workflow, params, log) {
3838
def summary_log = ''
@@ -53,15 +53,21 @@ class WorkflowMain {
5353
System.exit(0)
5454
}
5555

56-
// Validate workflow parameters via the JSON schema
57-
if (params.validate_params) {
58-
NfcoreSchema.validateParameters(workflow, params, log)
56+
// Print workflow version and exit on --version
57+
if (params.version) {
58+
String workflow_version = NfcoreTemplate.version(workflow)
59+
log.info "${workflow.manifest.name} ${workflow_version}"
60+
System.exit(0)
5961
}
6062

6163
// Print parameter summary log to screen
62-
6364
log.info paramsSummaryLog(workflow, params, log)
6465

66+
// Validate workflow parameters via the JSON schema
67+
if (params.validate_params) {
68+
NfcoreSchema.validateParameters(workflow, params, log)
69+
}
70+
6571
// Check that a -profile or Nextflow config has been provided to run the pipeline
6672
NfcoreTemplate.checkConfigProvided(workflow, log)
6773

‎modules.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77
"nf-core": {
88
"custom/dumpsoftwareversions": {
99
"branch": "master",
10-
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905"
10+
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
11+
"installed_by": ["modules"]
1112
},
1213
"fastqc": {
1314
"branch": "master",
14-
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905"
15+
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
16+
"installed_by": ["modules"]
1517
},
1618
"multiqc": {
1719
"branch": "master",
18-
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905"
20+
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
21+
"installed_by": ["modules"]
1922
}
2023
}
2124
}

‎modules/local/samplesheet_check.nf

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
process SAMPLESHEET_CHECK {
22
tag "$samplesheet"
3+
label 'process_single'
34

45
conda (params.enable_conda ? "conda-forge::python=3.8.3" : null)
56
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
@@ -13,6 +14,9 @@ process SAMPLESHEET_CHECK {
1314
path '*.csv' , emit: csv
1415
path "versions.yml", emit: versions
1516

17+
when:
18+
task.ext.when == null || task.ext.when
19+
1620
script: // This script is bundled with the pipeline, in nf-core/rnaseq/bin/
1721
"""
1822
check_samplesheet.py \\

‎nextflow.config

+10-4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ params {
3535
monochrome_logs = false
3636
hook_url = null
3737
help = false
38+
version = false
3839
validate_params = true
3940
show_hidden_params = false
4041
schema_ignore_params = 'genomes'
@@ -81,6 +82,7 @@ profiles {
8182
debug { process.beforeScript = 'echo $HOSTNAME' }
8283
conda {
8384
params.enable_conda = true
85+
conda.enabled = true
8486
docker.enabled = false
8587
singularity.enabled = false
8688
podman.enabled = false
@@ -89,6 +91,7 @@ profiles {
8991
}
9092
mamba {
9193
params.enable_conda = true
94+
conda.enabled = true
9295
conda.useMamba = true
9396
docker.enabled = false
9497
singularity.enabled = false
@@ -104,6 +107,9 @@ profiles {
104107
shifter.enabled = false
105108
charliecloud.enabled = false
106109
}
110+
arm {
111+
docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64'
112+
}
107113
singularity {
108114
singularity.enabled = true
109115
singularity.autoMounts = true
@@ -185,12 +191,12 @@ dag {
185191

186192
manifest {
187193
name = 'nf-core/rnaseq'
188-
author = 'Harshil Patel, Phil Ewels, Rickard Hammarén'
194+
author = """Harshil Patel, Phil Ewels, Rickard Hammarén"""
189195
homePage = 'https://github.com/nf-core/rnaseq'
190-
description = 'RNA sequencing analysis pipeline for gene/isoform quantification and extensive quality control.'
196+
description = """RNA sequencing analysis pipeline for gene/isoform quantification and extensive quality control."""
191197
mainScript = 'main.nf'
192-
nextflowVersion = '!>=21.10.3'
193-
version = '3.9'
198+
nextflowVersion = '!>=22.10.1'
199+
version = '3.10dev'
194200
doi = ''
195201
}
196202

‎nextflow_schema.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@
176176
"fa_icon": "fas fa-question-circle",
177177
"hidden": true
178178
},
179+
"version": {
180+
"type": "boolean",
181+
"description": "Display version and exit.",
182+
"fa_icon": "fas fa-question-circle",
183+
"hidden": true
184+
},
179185
"publish_dir_mode": {
180186
"type": "string",
181187
"default": "copy",
@@ -217,7 +223,7 @@
217223
"type": "string",
218224
"description": "Incoming hook URL for messaging service",
219225
"fa_icon": "fas fa-people-group",
220-
"help_text": "Incoming hook URL for messaging service. Currently, only MS Teams is supported.",
226+
"help_text": "Incoming hook URL for messaging service. Currently, MS Teams and Slack are supported.",
221227
"hidden": true
222228
},
223229
"multiqc_config": {

‎workflows/rnaseq.nf

+5-6
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ workflow RNASEQ {
8282
ch_versions = ch_versions.mix(FASTQC.out.versions.first())
8383

8484
CUSTOM_DUMPSOFTWAREVERSIONS (
85-
ch_versions.unique().collectFile(name: 'collated_versions.yml')
85+
ch_versions.unique{ it.text }.collectFile(name: 'collated_versions.yml')
8686
)
8787

8888
//
@@ -102,12 +102,11 @@ workflow RNASEQ {
102102

103103
MULTIQC (
104104
ch_multiqc_files.collect(),
105-
ch_multiqc_config.collect().ifEmpty([]),
106-
ch_multiqc_custom_config.collect().ifEmpty([]),
107-
ch_multiqc_logo.collect().ifEmpty([])
105+
ch_multiqc_config.toList(),
106+
ch_multiqc_custom_config.toList(),
107+
ch_multiqc_logo.toList()
108108
)
109109
multiqc_report = MULTIQC.out.report.toList()
110-
ch_versions = ch_versions.mix(MULTIQC.out.versions)
111110
}
112111

113112
/*
@@ -122,7 +121,7 @@ workflow.onComplete {
122121
}
123122
NfcoreTemplate.summary(workflow, params, log)
124123
if (params.hook_url) {
125-
NfcoreTemplate.adaptivecard(workflow, params, summary_params, projectDir, log)
124+
NfcoreTemplate.IM_notification(workflow, params, summary_params, projectDir, log)
126125
}
127126
}
128127

0 commit comments

Comments
 (0)
Please sign in to comment.