diff --git a/docs/hello_nextflow/07_hello_modules.md b/docs/hello_nextflow/07_hello_modules.md index 84dafcadd4..3ec20e5268 100644 --- a/docs/hello_nextflow/07_hello_modules.md +++ b/docs/hello_nextflow/07_hello_modules.md @@ -28,12 +28,18 @@ We're going to be working with a clean set of project files inside the project d ### 0.1. Explore the `hello-modules` directory Let's move into the project directory. -If you're continuing on directly from Part 5, you'll need to move up one directory first. ```bash cd hello-modules ``` +!!! warning + + If you're continuing on directly from Part 5, you'll need to move up one directory first. + ``` + cd ../hello-modules + ``` + 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. ```console title="Directory contents" @@ -94,7 +100,7 @@ Learn how to create your first module following conventions inspired by the nf-c 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. 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). -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: +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: ```console title="Directory structure" modules @@ -187,12 +193,11 @@ include { } from './modules/local/>//main.nf' Let's insert that above the workflow block and fill it out appropriately. -````groovy title="hello-modules/main.nf" linenums="73" _Before:_ ```groovy title="hello-modules/main.nf" linenums="73" workflow { -```` +``` _After:_ @@ -208,7 +213,7 @@ workflow { 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. ```bash -nextflow run main.nf -profile my_laptop,demo +nextflow run main.nf -profile my_laptop,demo -resume ``` 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. diff --git a/docs/hello_nextflow/08_hello_nf-test.md b/docs/hello_nextflow/08_hello_nf-test.md index a5924a6e39..ff2a3a2bd0 100644 --- a/docs/hello_nextflow/08_hello_nf-test.md +++ b/docs/hello_nextflow/08_hello_nf-test.md @@ -13,10 +13,6 @@ And it also means that when you assemble a new workflow from existing modules th 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. 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). -!!!note - - This part of the training was developed in collaboration with Sateesh Peri, who implemented all the tests. - --- ## 0. Warmup @@ -979,6 +975,7 @@ test("family_trio [vcf] [idx]") { """ } } +} ``` ### 3.4. Use content assertions diff --git a/docs/hello_nextflow/09_hello_nf-core.md b/docs/hello_nextflow/09_hello_nf-core.md index 17590df704..5cc7a7950e 100644 --- a/docs/hello_nextflow/09_hello_nf-core.md +++ b/docs/hello_nextflow/09_hello_nf-core.md @@ -49,7 +49,7 @@ Whenever you're ready, run the command: nextflow pull nf-core/demo ``` -Nextflow will `pull` the pipeline's default GitHub branch +Nextflow will `pull` the pipeline's default GitHub branch. For nf-core pipelines with a stable release, that will be the master branch. You select a specific branch with `-r`; we'll cover that later. @@ -59,7 +59,7 @@ Checking nf-core/demo ... ``` To be clear, you can do this with any Nextflow pipeline that is appropriately set up in GitHub, not just nf-core pipelines. -However nf-core is the largest open collection of Nextflow pipelines. +However nf-core is the largest open curated collection of Nextflow pipelines. !!!tip @@ -108,15 +108,18 @@ The `test` profile for `nf-core/demo` is shown below: ---------------------------------------------------------------------------------------- */ +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] +} + params { config_profile_name = 'Test profile' config_profile_description = 'Minimal test dataset to check pipeline function' - // Limit resources so that this can run on GitHub Actions - max_cpus = 2 - max_memory = '6.GB' - max_time = '6.h' - // Input data input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' @@ -137,11 +140,11 @@ nextflow run nf-core/demo -profile docker,test --outdir results !!! hint "Changing Nextflow version" Depending on the nextflow version you have installed, this command might fail due to a version mismatch. - If that happens, you can temporarily run the pipeline with a different version than you have installed by adding NXF_VER= to the start of your command as shown below: + 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: - ```bash - NXF_VER=24.09.2-edge nextflow run nf-core/demo -profile docker,test --outdir results - ``` + ```bash + NXF_VER=24.09.2-edge nextflow run nf-core/demo -profile docker,test --outdir results + ``` Here's the console output from the pipeline: