Skip to content

Commit 4e0dd55

Browse files
authored
Merge pull request #365 from nf-core/dev
Release 3.0.0
2 parents 1b30692 + 91907b6 commit 4e0dd55

File tree

190 files changed

+35429
-2230
lines changed

Some content is hidden

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

190 files changed

+35429
-2230
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ indent_style = unset
2828
[/assets/email*]
2929
indent_size = unset
3030

31+
[/assets/250120_unimod_tables.xml]
32+
indent_style = unset
33+
indent_size = unset
34+
end_of_line = unset
35+
trim_trailing_whitespace = unset
36+
3137
# ignore python and markdown
3238
[*.{py,md}]
3339
indent_style = unset
40+
41+
# ignore ro-crate metadata files
42+
[**/ro-crate-metadata.json]
43+
insert_final_newline = unset

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @jonasscheid @marissaDubbelaar

.github/CONTRIBUTING.md

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

33
Hi there!
44
Many thanks for taking an interest in improving nf-core/mhcquant.
@@ -19,7 +19,7 @@ If you'd like to write some code for nf-core/mhcquant, the standard workflow is
1919
1. Check that there isn't already an issue about your idea in the [nf-core/mhcquant issues](https://github.com/nf-core/mhcquant/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/mhcquant repository](https://github.com/nf-core/mhcquant) 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/mhcquant documentation](https://nf-co.re/mhcquant/usage) and don't hesitate to get in touch on the nf-core Slack [#mhcquant](https://nfcore.slack.com/channels/mhcquant) channel ([join our Slack here](https://nf-co.re/join/slack)).
6565

6666
## Pipeline contribution conventions
6767

68-
To make the nf-core/mhcquant 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/mhcquant` 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/mhcquant pipeline documentation](https://nf-co.re/mhcquant/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/mhcq
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/mhcquant/tree/master/.github/CONTRIBUTING.md)
1919
- [ ] If necessary, also make a PR on the nf-core/mhcquant _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
- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir <OUTDIR>`).
2323
- [ ] Usage Documentation in `docs/usage.md` is updated.

.github/workflows/awsfulltest.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,39 @@
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+
workflow_dispatch:
8+
pull_request_review:
9+
types: [submitted]
710
release:
811
types: [published]
9-
workflow_dispatch:
12+
1013
jobs:
1114
run-platform:
1215
name: Run AWS full tests
13-
if: github.repository == 'nf-core/mhcquant'
16+
# run only if the PR is approved by at least 2 reviewers and against the master/main branch or manually triggered
17+
if: github.repository == 'nf-core/mhcquant' && github.event.review.state == 'approved' && (github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'main') || github.event_name == 'workflow_dispatch'
1418
runs-on: ubuntu-latest
1519
steps:
20+
- name: Set revision variable
21+
id: revision
22+
run: |
23+
echo "revision=${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'release') && github.sha || 'dev' }}" >> "$GITHUB_OUTPUT"
24+
1625
- name: Launch workflow via Seqera Platform
1726
uses: seqeralabs/action-tower-launch@v2
1827
with:
1928
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
2029
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
2130
compute_env: ${{ secrets.TOWER_COMPUTE_ENV }}
22-
revision: ${{ github.sha }}
23-
workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/mhcquant/work-${{ github.sha }}
31+
revision: ${{ steps.revision.outputs.revision }}
32+
workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/mhcquant/work-${{ steps.revision.outputs.revision }}
2433
parameters: |
2534
{
2635
"hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}",
27-
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/mhcquant/results-${{ github.sha }}"
36+
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/mhcquant/results-${{ steps.revision.outputs.revision }}"
2837
}
2938
profiles: test_full
3039

.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/mhcquant'
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: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,83 @@ on:
88
pull_request:
99
release:
1010
types: [published]
11+
workflow_dispatch:
1112

1213
env:
1314
NXF_ANSI_LOG: false
15+
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
16+
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity
1417

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

1922
jobs:
2023
test:
21-
name: Run pipeline with test data
24+
name: "Run pipeline with test data (${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }})"
2225
# Only run on push if this is the nf-core dev branch (merged PRs)
2326
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/mhcquant') }}"
2427
runs-on: ubuntu-latest
2528
strategy:
2629
matrix:
2730
NXF_VER:
28-
- "23.04.0"
31+
- "24.04.2"
2932
- "latest-everything"
33+
profile:
34+
- "conda"
35+
- "docker"
36+
- "singularity"
37+
test_name:
38+
- "test"
39+
isMaster:
40+
- ${{ github.base_ref == 'master' }}
41+
# Exclude conda and singularity on dev
42+
exclude:
43+
- isMaster: false
44+
profile: "conda"
45+
- isMaster: false
46+
profile: "singularity"
3047
steps:
3148
- name: Check out pipeline code
32-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
49+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
50+
with:
51+
fetch-depth: 0
3352

34-
- name: Install Nextflow
53+
- name: Set up Nextflow
3554
uses: nf-core/setup-nextflow@v2
3655
with:
3756
version: "${{ matrix.NXF_VER }}"
3857

39-
- name: Disk space cleanup
58+
- name: Set up Apptainer
59+
if: matrix.profile == 'singularity'
60+
uses: eWaterCycle/setup-apptainer@main
61+
62+
- name: Set up Singularity
63+
if: matrix.profile == 'singularity'
64+
run: |
65+
mkdir -p $NXF_SINGULARITY_CACHEDIR
66+
mkdir -p $NXF_SINGULARITY_LIBRARYDIR
67+
68+
- name: Set up Miniconda
69+
if: matrix.profile == 'conda'
70+
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3
71+
with:
72+
miniconda-version: "latest"
73+
auto-update-conda: true
74+
conda-solver: libmamba
75+
channels: conda-forge,bioconda
76+
77+
- name: Set up Conda
78+
if: matrix.profile == 'conda'
79+
run: |
80+
echo $(realpath $CONDA)/condabin >> $GITHUB_PATH
81+
echo $(realpath python) >> $GITHUB_PATH
82+
83+
- name: Clean up Disk space
4084
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
4185

42-
- name: Run pipeline with test data
86+
- name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}"
87+
continue-on-error: ${{ matrix.NXF_VER == 'latest-everything' }}
4388
run: |
4489
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results
4590
@@ -59,7 +104,7 @@ jobs:
59104
# Test latest edge release of Nextflow
60105
- NXF_VER: ""
61106
NXF_EDGE: "1"
62-
tests: ["test_mokapot", "test_percolator", "test_ionannotator"]
107+
tests: ["test_mokapot", "test_percolator", "test_ionannotator", "test_speclib"]
63108
steps:
64109
- name: Check out pipeline code
65110
uses: actions/checkout@v2
@@ -74,7 +119,7 @@ jobs:
74119
sudo mv nextflow /usr/local/bin/
75120
- name: Run pipeline with profile ${{ matrix.tests }}
76121
run: |
77-
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.tests }},docker --max_memory '6.GB' --max_cpus 2 --spectrum_batch_size 5000 --outdir ./results
122+
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.tests }},docker --spectrum_batch_size 5000 --outdir ./results
78123
79124
# Define a second workflow only against main with additional tests: test_timstof and test_full
80125
profile_main:
@@ -108,4 +153,4 @@ jobs:
108153
sudo mv nextflow /usr/local/bin/
109154
- name: Run pipeline with profile ${{ matrix.tests }}
110155
run: |
111-
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.tests }},docker --max_memory '6.GB' --max_cpus 2 --spectrum_batch_size 5000 --outdir ./results
156+
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.tests }},docker --spectrum_batch_size 5000 --outdir ./results

0 commit comments

Comments
 (0)