Skip to content

Commit

Permalink
Merge pull request #476 from FriederikeHanssen/fix_nfcore
Browse files Browse the repository at this point in the history
Account for part 1 in the nf-core training
  • Loading branch information
FriederikeHanssen authored Nov 21, 2024
2 parents 1ea1402 + e8ab312 commit b6b5d35
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 8 deletions.
31 changes: 26 additions & 5 deletions docs/hello_nextflow/09_hello_nf-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ So if you want to try out an nf-core pipeline with minimal effort, you can start

!!!tip

You can run this from anywhere, but if you feel like being consistent with previous exercises, you can create a `hello-nf-core` directory under `hello-nextflow`. If you were working through Part 7 (Hello nf-test) before this, you may need to go up one level first.
You can run this from anywhere, but if you feel like being consistent with previous exercises, you can create a `nf-core-demo` directory under `hello-nextflow`. If you were working through Part 7 (Hello nf-test) before this, you may need to go up one level first.

```bash
mkdir hello-nf-core
cd hello-nf-core
mkdir nf-core-demo
cd nf-core-demo
```

Whenever you're ready, run the command:
Expand Down Expand Up @@ -259,6 +259,21 @@ nf-core --help

### Creating your pipeline

Before we start, let's navigate into the `hello-nf-core` directory:

```
cd ..
cd hello-nf-core
```

!!! hint "Open a new window in VSCode"

If you are working with VS Code you can open a new window to reduce visual clutter:

```bash
code .
```

Let's start by creating a new pipeline with the `nf-core pipelines create` command:

All nf-core pipelines are based on a common template, a standardized pipeline skeleton that can be used to streamline development with shared features and components.
Expand Down Expand Up @@ -373,7 +388,7 @@ Instead of having one large monolithic pipeline script, it's broken up into smal
- **Subworkflows:** Two or more modules that are packaged together as a mini workflow

<figure class="excalidraw">
--8<-- "docs/nf_develop/img/nested.excalidraw.svg"
--8<-- "docs/hello_nextflow/img/nested.excalidraw.svg"
</figure>

Within your pipeline repository, `modules` and `subworkflows` are stored within `local` and `nf-core` folders. The `nf-core` folder is for components that have come from the nf-core GitHub repository while the `local` folder is for components that have been developed independently (usually things very specific to a pipeline):
Expand Down Expand Up @@ -436,6 +451,10 @@ There are several configuration files that are stored in the `conf` folder and a

The `nextflow_schema.json` is a file used to store parameter related information including type, description and help text in a machine readable format. The schema is used for various purposes, including automated parameter validation, help text generation, and interactive parameter form rendering in UI interfaces.

#### `assets/schema_input.json`

The `schema_input.json` is a file used to define the input samplesheet structure. Each column can have a type, pattern, description and help text in a machine readable format. The schema is used for various purposes, including automated validation, and providing helpful error messages.

### Takeaway

You have an example pipeline, and learned about important template files.
Expand Down Expand Up @@ -1149,6 +1168,8 @@ nextflow run . -profile docker,test --outdir results --input ../data/sequencer_s
[2a/a742ae] process > MYORG_MYFIRSTPIPELINE:MYFIRSTPIPELINE:MULTIQC [100%] 1 of 1 ✔
```

If you want to learn more about how to fine tune and develop the samplesheet schema further, visit [nf-schema](https://nextflow-io.github.io/nf-schema/2.2/nextflow_schema/sample_sheet_schema_specification/).

### Takeaway

You know how to adapt the samplesheet to add new meta information to your files.
Expand Down Expand Up @@ -1323,7 +1344,7 @@ include { MULTIQC } from '../modules/nf-core/multiqc/main'

and call it on our input data:

```groovy title="workflows/myfirstpipeline.nf" linenums="41"
```groovy title="workflows/myfirstpipeline.nf" linenums="47"
FASTQE(ch_samplesheet)
ch_versions = ch_versions.mix(FASTQE.out.versions.first())
```
Expand Down
21 changes: 21 additions & 0 deletions docs/hello_nextflow/img/nested.excalidraw.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b6b5d35

Please sign in to comment.