Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for part 1 in the nf-core training #476

Merged
merged 8 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 27 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,22 @@ 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 VSCode (for example running the training on GitPod), you can open a new window to reduce visual clutter:
FriederikeHanssen marked this conversation as resolved.
Show resolved Hide resolved

```bash
code .
```
FriederikeHanssen marked this conversation as resolved.
Show resolved Hide resolved


FriederikeHanssen marked this conversation as resolved.
Show resolved Hide resolved
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 +389,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 +452,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.
FriederikeHanssen marked this conversation as resolved.
Show resolved Hide resolved

### Takeaway

You have an example pipeline, and learned about important template files.
Expand Down Expand Up @@ -1149,6 +1169,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 expand the samplesheet schema further, visit [nf-schema](https://nextflow-io.github.io/nf-schema/2.2/nextflow_schema/sample_sheet_schema_specification/).
FriederikeHanssen marked this conversation as resolved.
Show resolved Hide resolved

### Takeaway

You know how to adapt the samplesheet to add new meta information to your files.
Expand Down Expand Up @@ -1323,7 +1345,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
Loading