Skip to content

Commit fe9f0ad

Browse files
authored
Merge pull request #666 from nf-core/dev
Release v2.3.0
2 parents fa61a65 + e3a59c1 commit fe9f0ad

File tree

602 files changed

+26362
-8913
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

602 files changed

+26362
-8913
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ indent_size = unset
3131
# ignore python and markdown
3232
[*.{py,md}]
3333
indent_style = unset
34+
35+
# ignore ro-crate metadata files
36+
[**/ro-crate-metadata.json]
37+
insert_final_newline = unset

.github/CONTRIBUTING.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# nf-core/raredisease: Contributing Guidelines
1+
# `nf-core/raredisease`: Contributing Guidelines
22

33
Hi there!
44
Many thanks for taking an interest in improving nf-core/raredisease.
@@ -19,7 +19,7 @@ If you'd like to write some code for nf-core/raredisease, the standard workflow
1919
1. Check that there isn't already an issue about your idea in the [nf-core/raredisease issues](https://github.com/nf-core/raredisease/issues) to avoid duplicating work. If there isn't one already, please create one so that others know you're working on this
2020
2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [nf-core/raredisease repository](https://github.com/nf-core/raredisease) to your GitHub account
2121
3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions)
22-
4. Use `nf-core schema build` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10).
22+
4. Use `nf-core pipelines schema build` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10).
2323
5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged
2424

2525
If you're not used to this workflow with git, you can start with some [docs from GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests) or even their [excellent `git` resources](https://try.github.io/).
@@ -40,7 +40,7 @@ There are typically two types of tests that run:
4040
### Lint tests
4141

4242
`nf-core` has a [set of guidelines](https://nf-co.re/developers/guidelines) which all pipelines must adhere to.
43-
To enforce these and ensure that all pipelines stay in sync, we have developed a helper tool which runs checks on the pipeline code. This is in the [nf-core/tools repository](https://github.com/nf-core/tools) and once installed can be run locally with the `nf-core lint <pipeline-directory>` command.
43+
To enforce these and ensure that all pipelines stay in sync, we have developed a helper tool which runs checks on the pipeline code. This is in the [nf-core/tools repository](https://github.com/nf-core/tools) and once installed can be run locally with the `nf-core pipelines lint <pipeline-directory>` command.
4444

4545
If any failures or warnings are encountered, please follow the listed URL for more documentation.
4646

@@ -55,27 +55,27 @@ These tests are run both with the latest available version of `Nextflow` and als
5555

5656
:warning: Only in the unlikely and regretful event of a release happening with a bug.
5757

58-
- On your own fork, make a new branch `patch` based on `upstream/master`.
58+
- On your own fork, make a new branch `patch` based on `upstream/main` or `upstream/master`.
5959
- Fix the bug, and bump version (X.Y.Z+1).
60-
- A PR should be made on `master` from patch to directly this particular bug.
60+
- Open a pull-request from `patch` to `main`/`master` with the changes.
6161

6262
## Getting help
6363

6464
For further information/help, please consult the [nf-core/raredisease documentation](https://nf-co.re/raredisease/usage) and don't hesitate to get in touch on the nf-core Slack [#raredisease](https://nfcore.slack.com/channels/raredisease) channel ([join our Slack here](https://nf-co.re/join/slack)).
6565

6666
## Pipeline contribution conventions
6767

68-
To make the nf-core/raredisease code and processing logic more understandable for new contributors and to ensure quality, we semi-standardise the way the code and other contributions are written.
68+
To make the `nf-core/raredisease` code and processing logic more understandable for new contributors and to ensure quality, we semi-standardise the way the code and other contributions are written.
6969

7070
### Adding a new step
7171

7272
If you wish to contribute a new step, please use the following coding standards:
7373

74-
1. Define the corresponding input channel into your new process from the expected previous process channel
74+
1. Define the corresponding input channel into your new process from the expected previous process channel.
7575
2. Write the process block (see below).
7676
3. Define the output channel if needed (see below).
7777
4. Add any new parameters to `nextflow.config` with a default (see below).
78-
5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core schema build` tool).
78+
5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core pipelines schema build` tool).
7979
6. Add sanity checks and validation for all relevant parameters.
8080
7. Perform local tests to validate that the new code works as expected.
8181
8. If applicable, add a new test command in `.github/workflow/ci.yml`.
@@ -84,13 +84,13 @@ If you wish to contribute a new step, please use the following coding standards:
8484

8585
### Default values
8686

87-
Parameters should be initialised / defined with default values in `nextflow.config` under the `params` scope.
87+
Parameters should be initialised / defined with default values within the `params` scope in `nextflow.config`.
8888

89-
Once there, use `nf-core schema build` to add to `nextflow_schema.json`.
89+
Once there, use `nf-core pipelines schema build` to add to `nextflow_schema.json`.
9090

9191
### Default processes resource requirements
9292

93-
Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/master/nf_core/pipeline-template/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels.
93+
Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/main/nf_core/pipeline-template/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels.
9494

9595
The process resources can be passed on to the tool dynamically within the process with the `${task.cpus}` and `${task.memory}` variables in the `script:` block.
9696

@@ -103,7 +103,7 @@ Please use the following naming schemes, to make it easy to understand what is g
103103

104104
### Nextflow version bumping
105105

106-
If you are using a new feature from core Nextflow, you may bump the minimum required version of nextflow in the pipeline with: `nf-core bump-version --nextflow . [min-nf-version]`
106+
If you are using a new feature from core Nextflow, you may bump the minimum required version of nextflow in the pipeline with: `nf-core pipelines bump-version --nextflow . [min-nf-version]`
107107

108108
### Images and figures
109109

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ body:
99
1010
- [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting)
1111
- [nf-core/raredisease pipeline documentation](https://nf-co.re/raredisease/usage)
12-
1312
- type: textarea
1413
id: description
1514
attributes:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/rare
1717
- [ ] If you've fixed a bug or added code that should be tested, add tests!
1818
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/raredisease/tree/master/.github/CONTRIBUTING.md)
1919
- [ ] If necessary, also make a PR on the nf-core/raredisease _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
20-
- [ ] Make sure your code lints (`nf-core lint`).
20+
- [ ] Make sure your code lints (`nf-core pipelines lint`).
2121
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`).
2222
- [ ] Ensure the test suite passes (`nextflow run . -profile test_one_sample,docker --outdir <OUTDIR>`).
2323
- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir <OUTDIR>`).

.github/workflows/awsfulltest.yml

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,50 @@
11
name: nf-core AWS full size tests
2-
# This workflow is triggered on published releases.
2+
# This workflow is triggered on PRs opened against the main/master branch.
33
# It can be additionally triggered manually with GitHub actions workflow dispatch button.
44
# It runs the -profile 'test_full' on AWS batch
55

66
on:
7-
release:
8-
types: [published]
7+
pull_request:
8+
branches:
9+
- main
10+
- master
911
workflow_dispatch:
12+
pull_request_review:
13+
types: [submitted]
14+
1015
jobs:
1116
run-platform:
1217
name: Run AWS full tests
13-
if: github.repository == 'nf-core/raredisease'
18+
# run only if the PR is approved by at least 2 reviewers and against the master branch or manually triggered
19+
if: github.repository == 'nf-core/raredisease' && github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'master' || github.event_name == 'workflow_dispatch'
1420
runs-on: ubuntu-latest
1521
steps:
22+
- name: Get PR reviews
23+
uses: octokit/[email protected]
24+
if: github.event_name != 'workflow_dispatch'
25+
id: check_approvals
26+
continue-on-error: true
27+
with:
28+
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews?per_page=100
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Check for approvals
33+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
34+
run: |
35+
echo "No review approvals found. At least 2 approvals are required to run this action automatically."
36+
exit 1
37+
38+
- name: Check for enough approvals (>=2)
39+
id: test_variables
40+
if: github.event_name != 'workflow_dispatch'
41+
run: |
42+
JSON_RESPONSE='${{ steps.check_approvals.outputs.data }}'
43+
CURRENT_APPROVALS_COUNT=$(echo $JSON_RESPONSE | jq -c '[.[] | select(.state | contains("APPROVED")) ] | length')
44+
test $CURRENT_APPROVALS_COUNT -ge 2 || exit 1 # At least 2 approvals are required
45+
1646
- name: Launch workflow via Seqera Platform
1747
uses: seqeralabs/action-tower-launch@v2
18-
# TODO nf-core: You can customise AWS full pipeline tests as required
1948
# Add full size test data (but still relatively small datasets for few samples)
2049
# on the `test_full.config` test runs with only one set of parameters
2150
with:

.github/workflows/branch.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
name: nf-core branch protection
2-
# This workflow is triggered on PRs to master branch on the repository
3-
# It fails when someone tries to make a PR against the nf-core `master` branch instead of `dev`
2+
# This workflow is triggered on PRs to `main`/`master` branch on the repository
3+
# It fails when someone tries to make a PR against the nf-core `main`/`master` branch instead of `dev`
44
on:
55
pull_request_target:
6-
branches: [master]
6+
branches:
7+
- main
8+
- master
79

810
jobs:
911
test:
1012
runs-on: ubuntu-latest
1113
steps:
12-
# PRs to the nf-core repo master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches
14+
# PRs to the nf-core repo main/master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches
1315
- name: Check PRs
1416
if: github.repository == 'nf-core/raredisease'
1517
run: |
@@ -22,7 +24,7 @@ jobs:
2224
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
2325
with:
2426
message: |
25-
## This PR is against the `master` branch :x:
27+
## This PR is against the `${{github.event.pull_request.base.ref}}` branch :x:
2628
2729
* Do not close this PR
2830
* Click _Edit_ and change the `base` to `dev`
@@ -32,9 +34,9 @@ jobs:
3234
3335
Hi @${{ github.event.pull_request.user.login }},
3436
35-
It looks like this pull-request is has been made against the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `master` branch.
36-
The `master` branch on nf-core repositories should always contain code from the latest release.
37-
Because of this, PRs to `master` are only allowed if they come from the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `dev` branch.
37+
It looks like this pull-request is has been made against the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) ${{github.event.pull_request.base.ref}} branch.
38+
The ${{github.event.pull_request.base.ref}} branch on nf-core repositories should always contain code from the latest release.
39+
Because of this, PRs to ${{github.event.pull_request.base.ref}} are only allowed if they come from the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `dev` branch.
3840
3941
You do not need to close this PR, you can change the target branch to `dev` by clicking the _"Edit"_ button at the top of this page.
4042
Note that even after this, the test will continue to show as failing until you push a new commit.

.github/workflows/ci.yml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,64 @@ on:
77
pull_request:
88
release:
99
types: [published]
10+
workflow_dispatch:
1011

1112
env:
1213
NXF_ANSI_LOG: false
14+
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
15+
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity
1316

1417
concurrency:
1518
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
1619
cancel-in-progress: true
1720

1821
jobs:
1922
test:
20-
name: Run pipeline with test data
23+
name: "Run pipeline with test data (${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }})"
2124
# Only run on push if this is the nf-core dev branch (merged PRs)
2225
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/raredisease') }}"
2326
runs-on: ubuntu-latest
2427
strategy:
2528
matrix:
2629
NXF_VER:
27-
- "23.04.0"
30+
- "24.04.2"
2831
- "latest-everything"
29-
parameters:
30-
- "-profile test,docker"
31-
- "-profile test_one_sample,docker"
32+
profile:
33+
- "docker"
34+
- "singularity"
35+
test_name:
36+
- "test"
37+
- "test_one_sample"
38+
isMaster:
39+
- ${{ github.base_ref == 'master' }}
40+
# Exclude conda and singularity on dev
41+
exclude:
42+
- isMaster: false
43+
profile: "singularity"
3244
steps:
3345
- name: Check out pipeline code
34-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
46+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
47+
with:
48+
fetch-depth: 0
3549

36-
- name: Install Nextflow
50+
- name: Set up Nextflow
3751
uses: nf-core/setup-nextflow@v2
3852
with:
3953
version: "${{ matrix.NXF_VER }}"
4054

41-
- name: Disk space cleanup
55+
- name: Set up Apptainer
56+
if: matrix.profile == 'singularity'
57+
uses: eWaterCycle/setup-apptainer@main
58+
59+
- name: Set up Singularity
60+
if: matrix.profile == 'singularity'
61+
run: |
62+
mkdir -p $NXF_SINGULARITY_CACHEDIR
63+
mkdir -p $NXF_SINGULARITY_LIBRARYDIR
64+
65+
- name: Clean up Disk space
4266
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
4367

44-
- name: Run pipeline with test data
68+
- name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}"
4569
run: |
46-
nextflow run ${GITHUB_WORKSPACE} ${{ matrix.parameters }} -stub --outdir ./results
70+
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} -stub --outdir ./results

0 commit comments

Comments
 (0)