Skip to content

Commit 07bbf5f

Browse files
Merge pull request #395 from nextflow-io/tools-update
Update nf-develop
2 parents 8509c4c + b2c2d51 commit 07bbf5f

File tree

15 files changed

+212
-90
lines changed

15 files changed

+212
-90
lines changed

.github/gitpod.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ RUN conda config --add channels defaults && \
5656
black \
5757
prettier \
5858
pre-commit \
59+
linkify-it-py \
5960
pytest-workflow && \
6061
conda clean --all --force-pkgs-dirs --yes
6162

docs/advanced/orientation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Gitpod environment contains some test data that will be used in this worksho
44

55
!!! note
66

7-
Follow [this link](../envsetup/00_introduction.md) if you have not yet setup your Gitpod environment.
7+
Follow [this link](../envsetup/index.md) if you have not yet setup your Gitpod environment.
88

99
## Getting started
1010

docs/basic_training/orientation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The Gitpod environment contains some test data that will be used in this worksho
99

1010
!!! note
1111

12-
Follow [this link](../envsetup/00_introduction.md) if you have not yet setup your Gitpod environment.
12+
Follow [this link](../envsetup/index.md) if you have not yet setup your Gitpod environment.
1313

1414
## Getting started
1515

docs/nf_customize/01_orientation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Gitpod environment contains some test data that will be used in this worksho
44

55
!!! note
66

7-
Follow [this link](../envsetup/00_introduction.md) if you have not yet setup your Gitpod environment.
7+
Follow [this link](../envsetup/index.md) if you have not yet setup your Gitpod environment.
88

99
## Getting started
1010

docs/nf_develop/1_01_orientation.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Gitpod environment contains some test data that will be used in this worksho
44

55
!!! note
66

7-
Follow [this link](../envsetup/00_introduction.md) if you have not yet setup your Gitpod environment.
7+
Follow [this link](../envsetup/index.md) if you have not yet setup your Gitpod environment.
88

99
## Getting started
1010

@@ -20,6 +20,8 @@ This is an empty directory where you will create an launch your pipeline.
2020
cd /workspace/gitpod/nf-develop
2121
```
2222

23+
<!---
24+
2325
## Configuring GitHub
2426
2527
As a part of this workshop you will push changes to your GitHub.
@@ -42,7 +44,9 @@ Edit the permissions for your GitHub account by clicking on the three dots next
4244
4345
![GitHub permissions](img/gitpod.permissions.png)
4446
45-
Once complete, click `Update permissions` and return reopen your Gitpod training environment.
47+
Once complete, click `Update permissions` and return to your Gitpod training environment.
48+
49+
-->
4650

4751
---
4852

docs/nf_develop/1_02_create.md

Lines changed: 118 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,51 @@ Here, you will use the nf-core template to kickstart your pipeline development u
1010

1111
nf-core tooling has commands for pipeline users and developers.
1212

13-
You can view all of the tooling using the `--help` argument.
13+
View all of the tooling using the `nf-core --help` argument.
1414

15-
```
15+
```bash
1616
nf-core --help
1717
```
1818

19-
Here we will focus on the tooling to assist pipeline developers, starting with the `nf-core create` command.
19+
Here we will focus on the tooling to assist pipeline developers, starting with the `nf-core pipelines create` command.
2020

21-
### `nf-core create`
21+
### `nf-core pipelines create`
2222

23-
The `nf-core create` command makes a new pipeline using the nf-core base template with a pipeline name, description, and author. It is the first and most important step for creating a pipeline that will integrate with the wider Nextflow ecosystem.
23+
The `nf-core pipelines create` command makes a new pipeline using the nf-core base template with a pipeline name, description, and author. It is the first and most important step for creating a pipeline that will integrate with the wider Nextflow ecosystem.
2424

2525
```bash
26-
nf-core create
26+
nf-core pipelines create
2727
```
2828

29-
When executing this command you will be given a series of prompts to setup your pipeline.
29+
Running this command will open a Text User Interface (TUI) for pipeline creation.
3030

31-
```bash
32-
? Workflow name <name>
33-
? Description <description>
34-
? Author <name>
35-
? Do you want to customize which parts of the template are used? (y/N) <n>
36-
```
31+
<div style="text-align: center;">
32+
<iframe width="560" height="315" src="https://www.youtube.com/embed/VwjXNXONHlY?si=d0HkFSISnKn76TeI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="" data-ruffle-polyfilled=""></iframe>
33+
</div>
3734

38-
If the command has run successfully, you will see a new folder in your current directory.
35+
Template features can be flexibly included or excluded at the time of creation. You can still use the CLI by providing all values as parameters.
3936

4037
!!! question "Exercise"
4138

42-
Create a pipeline named `mypipeline` using the `nf-core create` command.
39+
Follow these steps create your first pipeline using the `nf-core pipelines create` TUI:
4340

44-
!!! note
41+
1. Run the `nf-core pipelines create` command
42+
2. Select **Let's go!** on the welcome screen
43+
3. Select **Custom** on the Choose pipeline type screen
44+
4. Enter your pipeline details, replacing < YOUR NAME > with your own name, then select **Next**
45+
- **GitHub organisation:** myorg
46+
- **Workflow name:** myfirstpipeline
47+
- **A short description of your pipeline:** My first pipeline
48+
- **Name of the main author / authors:** < YOUR NAME >
49+
5. Select **Continue** on the Template features screen
50+
6. Select **Finish** on the Final details screen
51+
7. Wait for the pipeline to be created, then select **Continue**
52+
8. Select **Finish without creating a repo** on the Create GitHub repository screen
53+
9. Select **Close** on the HowTo create a GitHub repository page
54+
55+
If run successfully, you will see a new folder in your current directory named `myorg-myfirstpipeline`.
4556

46-
If run successfully you will see a new folder in your current directory that has been given the name `nf-core-mypipeline`.
57+
<!---
4758
4859
### Customizing the template
4960
@@ -81,7 +92,7 @@ Skip template areas?
8192
8293
### Submit your code to GitHub
8394
84-
The `nf-core create` command suggests commands for submitting your pipeline to GitHub.
95+
The `nf-core pipelines create` command suggests commands for submitting your pipeline to GitHub.
8596
8697
You will first need to create an empty repository on GitHub for your template to be pushed to.
8798
@@ -92,7 +103,7 @@ When you are logged into GitHub, you can use the green `New` repository button i
92103
Once you have created the repository you can use `git` to push your template to GitHub.
93104
94105
```bash
95-
cd /workspace/gitpod/nf-develop/nf-core-mypipeline
106+
cd /workspace/gitpod/nf-develop/myorg-mypipeline
96107
git remote add origin https://github.com/<USERNAME>/<REPO>.git
97108
git push --all origin
98109
```
@@ -129,34 +140,40 @@ The role each of these branches have in pipeline development will be explained i
129140
130141
Create a new GitHub repository named `myfirstpipeline` and push your new pipeline using the commands above. You will need to replace `<USERNAME>` and `<REPO>` with your GitHub username and `myfirstpipeline`, respectively.
131142
143+
-->
144+
132145
## Template tour
133146

134147
The nf-core pipeline template comes packed with a lot of files and folders.
135148

149+
Here, almost everything was included in the template to create opportunities to explore these features.
150+
136151
While the template may feel overwhelming, a complete understanding isn't required to start developing your pipeline.
137152

138153
### Workflows, subworkflows, and modules
139154

140-
The nf-core pipeline template has a `main.nf` file that calls `mypipeline.nf` from the `workflows` folder. The `mypipeline.nf` file is the central pipeline file that is used to bring everything else together. Instead of having one large monolithic pipeline script, it's broken up into smaller script components, namely, modules and subworkflows:
155+
The nf-core pipeline template has a `main.nf` script that calls `myfirstpipeline.nf` from the `workflows` folder. The `myfirstpipeline.nf` file inside the workflows folder is the central pipeline file that is used to bring everything else together.
141156

142-
- **Modules** are wrappers around a single process.
143-
- **Subworkflows** are two or more modules that are packaged together as a mini workflow.
157+
Instead of having one large monolithic pipeline script, it's broken up into smaller script components, namely, modules and subworkflows:
158+
159+
- **Modules:** Wrappers around a single process
160+
- **Subworkflows:** Two or more modules that are packaged together as a mini workflow
144161

145162
<figure class="excalidraw">
146163
--8<-- "docs/nf_develop/img/nested.excalidraw.svg"
147164
</figure>
148165

149-
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 online nf-core repository while the `local` folder is for components that have been developed independently.
166+
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:
150167

151-
```
168+
```console
152169
modules/
153170
├── local
154171
│ └── <toolname>
155172
│ │ └── main.nf
156173
│ .
157174
158175
└── nf-core
159-
├── <toolname>
176+
├── <tool name>
160177
│ ├── environment.yml
161178
│ ├── main.nf
162179
│ ├── meta.yml
@@ -167,7 +184,28 @@ modules/
167184
.
168185
```
169186

170-
Modules from nf-core follow the same structure and contain a small number of additional files that are used for testing using [nf-test](https://www.nf-test.com/) and documentation about the module.
187+
Modules from nf-core follow a similar same structure and contain a small number of additional files that are used for testing using [nf-test](https://www.nf-test.com/) and documentation about the module.
188+
189+
!!!note
190+
191+
Some nf-core modules are also split into command specific directories:
192+
193+
```console
194+
195+
└── <tool name>
196+
└── <command>
197+
├── environment.yml
198+
├── main.nf
199+
├── meta.yml
200+
└── tests
201+
├── main.nf.test
202+
├── main.nf.test.snap
203+
└── tags.yml
204+
```
205+
206+
!!!note
207+
208+
The nf-core template does not come with a local modules folder by default.
171209

172210
### Configuration files
173211

@@ -177,21 +215,62 @@ In the template, the `nextflow.config` file is a central configuration file and
177215

178216
There are several configuration files that are stored in the `conf` folder and are added to the configuration by default or optionally as profiles:
179217

180-
- `base.config`: sensible defaults for pipeline resource requests.
181-
- `igenomes.config`: configuration settings required to access the igenomes registry.
182-
- `modules.config`: additional module directives and arguments.
183-
- `test.config`: a profile to run the pipeline with minimal test data.
184-
- `test_full.config`: a profile to run the pipeline with a full-sized test dataset.
218+
- `base.config`: A 'blank slate' config file, appropriate for general use on most high performance compute environments.
219+
- `igenomes.config`: Defines reference genomes using iGenome paths.
220+
- `igenomes_ignored.config`: Empty genomes dictionary to use when igenomes is ignored
221+
- `modules.config`: Additional module directives and arguments.
222+
- `test.config`: A profile to run the pipeline with minimal test data.
223+
- `test_full.config`: A profile to run the pipeline with a full-sized test dataset.
185224

186225
### `.nf-core.yml`
187226

188227
The `.nf-core.yml` file is used to specify the repository type and manage linting tests.
189228

190229
```yml title=".nf-core.yml" linenums="1"
230+
bump_version: null
231+
lint:
232+
files_exist:
233+
- CODE_OF_CONDUCT.md
234+
- assets/nf-core-myfirstpipeline_logo_light.png
235+
- docs/images/nf-core-myfirstpipeline_logo_light.png
236+
- docs/images/nf-core-myfirstpipeline_logo_dark.png
237+
- .github/ISSUE_TEMPLATE/config.yml
238+
- .github/workflows/awstest.yml
239+
- .github/workflows/awsfulltest.yml
240+
files_unchanged:
241+
- CODE_OF_CONDUCT.md
242+
- assets/nf-core-myfirstpipeline_logo_light.png
243+
- docs/images/nf-core-myfirstpipeline_logo_light.png
244+
- docs/images/nf-core-myfirstpipeline_logo_dark.png
245+
- .github/ISSUE_TEMPLATE/bug_report.yml
246+
multiqc_config:
247+
- report_comment
248+
nextflow_config:
249+
- manifest.name
250+
- manifest.homePage
251+
- validation.help.beforeText
252+
- validation.help.afterText
253+
- validation.summary.beforeText
254+
- validation.summary.afterText
255+
nf_core_version: 3.0.1
256+
org_path: null
191257
repository_type: pipeline
258+
template:
259+
author: Chris
260+
description: My first pipeline
261+
force: true
262+
is_nfcore: false
263+
name: myfirstpipeline
264+
org: myorg
265+
outdir: .
266+
skip_features: []
267+
version: 1.0.0dev
268+
update: null
192269
```
193270
194-
By default, the `.nf-core.yml` file will only show the repository is a pipeline. However, if the template is customized and parts of the template are removed, this file needs to be modified for linting tests to pass.
271+
!!!note
272+
273+
The `.nf-core.yml` file must match your template features for linting tests to pass.
195274

196275
### `nextflow_schema.json`
197276

@@ -206,24 +285,26 @@ By default, the template comes with several automated tests that utilize GitHub
206285
- `branch.yml`: Sets the branch protection for the nf-core repository
207286
- `ci.yml`: Run small pipeline tests with the small test datasets
208287
- `clean-up.yml`: Automated testing for stale and closed GitHub issues and PRs in the nf-core repo
209-
- `download_pipeline.yml`: Test a pipeline download with `nf-core download`.
288+
- `download_pipeline.yml`: Test a pipeline download with `nf-core pipelines download`.
210289
- `fix-linting.yml`: Fix linting by adding a comment to a PR
211290
- `linting_comment.yml`: Triggered after the linting action and posts an automated comment to the PR, even if the PR is coming from a fork
212-
- `linting.yml`: Triggered on pushes and PRs to the repository and runs `nf-core lint` and markdown lint tests to ensure that the code meets the nf-core guidelines
291+
- `linting.yml`: Triggered on pushes and PRs to the repository and runs `nf-core pipelines lint` and markdown lint tests to ensure that the code meets the nf-core guidelines
213292
- `release-announcements.yml`: Automatic release toot and tweet announcements for nf-core pipeline releases
214293

215-
Notably, many of these tests are only configured for the nf-core repo. However, they can be modified for your repository or ignored if they are superfluous to your requirements.
294+
Many of these tests are only configured for the nf-core repo. However, they can be modified for your repository or ignored if they are superfluous to your requirements.
216295

217-
You can read more about creating and modifying workflows on the [GitHub Actions documentation webpage](https://docs.github.com/en/actions).
296+
Read more about creating and modifying workflows on the [GitHub Actions documentation webpage](https://docs.github.com/en/actions).
218297

219-
Even though many of these action workflows are not relevant for private repositories, it is recommended to keep them in place to prevent `nf-core lint` from throwing errors.
298+
<!---
220299

221300
!!! note
222301

223302
To enable these workflows you need to click `Enable Actions on this Repository` under the `Actions` tab in your GitHub repository.
224303

225304
![GitHub actions](img/github.actions.png)
226305

306+
--->
307+
227308
---
228309

229310
Congratulations! You have now created a template pipeline, pushed it to Github and learned about important template files!

0 commit comments

Comments
 (0)