Skip to content

Commit 30c33bc

Browse files
Merge pull request #426 from nextflow-io/minor_fixes
Minor fixes to Hello Modules/nf-test/nf-core
2 parents f2c0b44 + f80312a commit 30c33bc

File tree

3 files changed

+25
-20
lines changed

3 files changed

+25
-20
lines changed

docs/hello_nextflow/07_hello_modules.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,18 @@ We're going to be working with a clean set of project files inside the project d
2828
### 0.1. Explore the `hello-modules` directory
2929

3030
Let's move into the project directory.
31-
If you're continuing on directly from Part 5, you'll need to move up one directory first.
3231

3332
```bash
3433
cd hello-modules
3534
```
3635

36+
!!! warning
37+
38+
If you're continuing on directly from Part 5, you'll need to move up one directory first.
39+
```
40+
cd ../hello-modules
41+
```
42+
3743
The `hello-modules` directory has the same content and structure that you're expected to end up with in `hello-config` on completion of Part 5.
3844

3945
```console title="Directory contents"
@@ -94,7 +100,7 @@ Learn how to create your first module following conventions inspired by the nf-c
94100
From a technical standpoint, you can create a module simply by copying the process definition into its own file, and you can name that file anything you want.
95101
However, the Nextflow community has adopted certain conventions for code organization, influenced in large part by the [nf-core](https://nf-co.re) project (which we'll cover later in this training series).
96102

97-
The convention for process modules is that the process definition should be written to a standalone file named `main.nf`, stored in a directory structure with three to four levels:
103+
The convention for Nextflow modules is that the process definition should be written to a standalone file named `main.nf`, stored in a directory structure with three to four levels:
98104

99105
```console title="Directory structure"
100106
modules
@@ -187,12 +193,11 @@ include { <MODULE_NAME> } from './modules/local/<toolkit>>/<tool>/main.nf'
187193

188194
Let's insert that above the workflow block and fill it out appropriately.
189195

190-
````groovy title="hello-modules/main.nf" linenums="73"
191196
_Before:_
192197

193198
```groovy title="hello-modules/main.nf" linenums="73"
194199
workflow {
195-
````
200+
```
196201

197202
_After:_
198203

@@ -208,7 +213,7 @@ workflow {
208213
We're running the workflow with essentially the same code and inputs as before, so let's add the `-resume` flag and see what happens.
209214

210215
```bash
211-
nextflow run main.nf -profile my_laptop,demo
216+
nextflow run main.nf -profile my_laptop,demo -resume
212217
```
213218

214219
Sure enough, Nextflow recognizes that it's still all the same work to be done, even if the code is split up into multiple files.

docs/hello_nextflow/08_hello_nf-test.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ And it also means that when you assemble a new workflow from existing modules th
1313
In this part of the training, we're going to show you how to use [**nf-test**](https://www.nf-test.com/), a testing framework that integrates well with Nextflow and makes it straightforward to add both module-level and workflow-level tests to your pipeline.
1414
For more background information about nf-test, we recommend you read [this blog post](https://nextflow.io/blog/2024/nf-test-in-nf-core.html).
1515

16-
!!!note
17-
18-
This part of the training was developed in collaboration with Sateesh Peri, who implemented all the tests.
19-
2016
---
2117

2218
## 0. Warmup
@@ -979,6 +975,7 @@ test("family_trio [vcf] [idx]") {
979975
"""
980976
}
981977
}
978+
}
982979
```
983980

984981
### 3.4. Use content assertions

docs/hello_nextflow/09_hello_nf-core.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Whenever you're ready, run the command:
4949
nextflow pull nf-core/demo
5050
```
5151

52-
Nextflow will `pull` the pipeline's default GitHub branch
52+
Nextflow will `pull` the pipeline's default GitHub branch.
5353
For nf-core pipelines with a stable release, that will be the master branch.
5454
You select a specific branch with `-r`; we'll cover that later.
5555

@@ -59,7 +59,7 @@ Checking nf-core/demo ...
5959
```
6060

6161
To be clear, you can do this with any Nextflow pipeline that is appropriately set up in GitHub, not just nf-core pipelines.
62-
However nf-core is the largest open collection of Nextflow pipelines.
62+
However nf-core is the largest open curated collection of Nextflow pipelines.
6363

6464
!!!tip
6565

@@ -108,15 +108,18 @@ The `test` profile for `nf-core/demo` is shown below:
108108
----------------------------------------------------------------------------------------
109109
*/
110110
111+
process {
112+
resourceLimits = [
113+
cpus: 4,
114+
memory: '15.GB',
115+
time: '1.h'
116+
]
117+
}
118+
111119
params {
112120
config_profile_name = 'Test profile'
113121
config_profile_description = 'Minimal test dataset to check pipeline function'
114122
115-
// Limit resources so that this can run on GitHub Actions
116-
max_cpus = 2
117-
max_memory = '6.GB'
118-
max_time = '6.h'
119-
120123
// Input data
121124
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv'
122125
@@ -137,11 +140,11 @@ nextflow run nf-core/demo -profile docker,test --outdir results
137140
!!! hint "Changing Nextflow version"
138141

139142
Depending on the nextflow version you have installed, this command might fail due to a version mismatch.
140-
If that happens, you can temporarily run the pipeline with a different version than you have installed by adding NXF_VER=<version> to the start of your command as shown below:
143+
If that happens, you can temporarily run the pipeline with a different version than you have installed by adding `NXF_VER=version` to the start of your command as shown below:
141144

142-
```bash
143-
NXF_VER=24.09.2-edge nextflow run nf-core/demo -profile docker,test --outdir results
144-
```
145+
```bash
146+
NXF_VER=24.09.2-edge nextflow run nf-core/demo -profile docker,test --outdir results
147+
```
145148

146149
Here's the console output from the pipeline:
147150

0 commit comments

Comments
 (0)