Skip to content

Commit 05d705a

Browse files
authored
Merge pull request #50 from nf-core/dev
Release 1.2.0
2 parents 500954e + 23b4633 commit 05d705a

File tree

81 files changed

+2409
-3458
lines changed

Some content is hidden

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

81 files changed

+2409
-3458
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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# nf-core/scnanoseq: Contributing Guidelines
1+
# `nf-core/scnanoseq`: Contributing Guidelines
22

33
Hi there!
44
Many thanks for taking an interest in improving nf-core/scnanoseq.
@@ -55,23 +55,23 @@ 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/scnanoseq documentation](https://nf-co.re/scnanoseq/usage) and don't hesitate to get in touch on the nf-core Slack [#scnanoseq](https://nfcore.slack.com/channels/scnanoseq) channel ([join our Slack here](https://nf-co.re/join/slack)).
6565

6666
## Pipeline contribution conventions
6767

68-
To make the nf-core/scnanoseq 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/scnanoseq` 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).
@@ -84,7 +84,7 @@ 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

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

.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/scnanoseq pipeline documentation](https://nf-co.re/scnanoseq/usage)
12-
1312
- type: textarea
1413
id: description
1514
attributes:

.github/workflows/awsfulltest.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,39 @@
11
name: nf-core AWS full size tests
2-
# This workflow is triggered on PRs opened against the master branch.
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-
pull_request:
8-
branches:
9-
- master
107
workflow_dispatch:
118
pull_request_review:
129
types: [submitted]
10+
release:
11+
types: [published]
1312

1413
jobs:
1514
run-platform:
1615
name: Run AWS full tests
17-
# run only if the PR is approved by at least 2 reviewers and against the master branch or manually triggered
18-
if: github.repository == 'nf-core/scnanoseq' && github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'master' || github.event_name == 'workflow_dispatch'
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/scnanoseq' && github.event.review.state == 'approved' && (github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'main') || github.event_name == 'workflow_dispatch'
1918
runs-on: ubuntu-latest
2019
steps:
21-
- uses: octokit/request-action@v2.x
22-
id: check_approvals
23-
with:
24-
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews
25-
env:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27-
- id: test_variables
28-
if: github.event_name != 'workflow_dispatch'
20+
- name: Set revision variable
21+
id: revision
2922
run: |
30-
JSON_RESPONSE='${{ steps.check_approvals.outputs.data }}'
31-
CURRENT_APPROVALS_COUNT=$(echo $JSON_RESPONSE | jq -c '[.[] | select(.state | contains("APPROVED")) ] | length')
32-
test $CURRENT_APPROVALS_COUNT -ge 2 || exit 1 # At least 2 approvals are required
23+
echo "revision=${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'release') && github.sha || 'dev' }}" >> "$GITHUB_OUTPUT"
24+
3325
- name: Launch workflow via Seqera Platform
3426
uses: seqeralabs/action-tower-launch@v2
3527
with:
3628
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
3729
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
3830
compute_env: ${{ secrets.TOWER_COMPUTE_ENV }}
39-
revision: ${{ github.sha }}
40-
workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/scnanoseq/work-${{ github.sha }}
31+
revision: ${{ steps.revision.outputs.revision }}
32+
workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/scnanoseq/work-${{ steps.revision.outputs.revision }}
4133
parameters: |
4234
{
4335
"hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}",
44-
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/scnanoseq/results-${{ github.sha }}"
36+
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/scnanoseq/results-${{ steps.revision.outputs.revision }}"
4537
}
4638
profiles: test_full
4739

.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/scnanoseq'
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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ jobs:
4242
profile: "singularity"
4343
steps:
4444
- name: Check out pipeline code
45-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
45+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
46+
with:
47+
fetch-depth: 0
4648

4749
- name: Set up Nextflow
4850
uses: nf-core/setup-nextflow@v2
@@ -63,5 +65,6 @@ jobs:
6365
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
6466

6567
- name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}"
68+
continue-on-error: ${{ matrix.NXF_VER == 'latest-everything' }}
6669
run: |
6770
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} --outdir ./results

.github/workflows/download_pipeline.yml

Lines changed: 44 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Test successful pipeline download with 'nf-core pipelines download'
22

33
# Run the workflow when:
44
# - dispatched manually
5-
# - when a PR is opened or reopened to master branch
5+
# - when a PR is opened or reopened to main/master branch
66
# - the head branch of the pull request is updated, i.e. if fixes for a release are pushed last minute to dev.
77
on:
88
workflow_dispatch:
@@ -12,24 +12,48 @@ on:
1212
required: true
1313
default: "dev"
1414
pull_request:
15+
types:
16+
- opened
17+
- edited
18+
- synchronize
1519
branches:
20+
- main
21+
- master
22+
pull_request_target:
23+
branches:
24+
- main
1625
- master
1726
- main
1827

1928
env:
2029
NXF_ANSI_LOG: false
2130

2231
jobs:
32+
configure:
33+
runs-on: ubuntu-latest
34+
outputs:
35+
REPO_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPO_LOWERCASE }}
36+
REPOTITLE_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPOTITLE_LOWERCASE }}
37+
REPO_BRANCH: ${{ steps.get_repo_properties.outputs.REPO_BRANCH }}
38+
steps:
39+
- name: Get the repository name and current branch
40+
id: get_repo_properties
41+
run: |
42+
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
43+
echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT"
44+
echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT"
45+
2346
download:
2447
runs-on: ubuntu-latest
48+
needs: configure
2549
steps:
2650
- name: Install Nextflow
2751
uses: nf-core/setup-nextflow@v2
2852

2953
- name: Disk space cleanup
3054
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
3155

32-
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
56+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
3357
with:
3458
python-version: "3.12"
3559
architecture: "x64"
@@ -44,12 +68,6 @@ jobs:
4468
python -m pip install --upgrade pip
4569
pip install git+https://github.com/nf-core/tools.git@dev
4670
47-
- name: Get the repository name and current branch set as environment variable
48-
run: |
49-
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
50-
echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV}
51-
echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> ${GITHUB_ENV}
52-
5371
- name: Make a cache directory for the container images
5472
run: |
5573
mkdir -p ./singularity_container_images
@@ -58,55 +76,59 @@ jobs:
5876
env:
5977
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images
6078
run: |
61-
nf-core pipelines download ${{ env.REPO_LOWERCASE }} \
62-
--revision ${{ env.REPO_BRANCH }} \
63-
--outdir ./${{ env.REPOTITLE_LOWERCASE }} \
79+
nf-core pipelines download ${{ needs.configure.outputs.REPO_LOWERCASE }} \
80+
--revision ${{ needs.configure.outputs.REPO_BRANCH }} \
81+
--outdir ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }} \
6482
--compress "none" \
6583
--container-system 'singularity' \
66-
--container-library "quay.io" -l "docker.io" -l "community.wave.seqera.io" \
84+
--container-library "quay.io" -l "docker.io" -l "community.wave.seqera.io/library/" \
6785
--container-cache-utilisation 'amend' \
6886
--download-configuration 'yes'
6987
7088
- name: Inspect download
71-
run: tree ./${{ env.REPOTITLE_LOWERCASE }}
89+
run: tree ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }}
90+
91+
- name: Inspect container images
92+
run: tree ./singularity_container_images | tee ./container_initial
7293

7394
- name: Count the downloaded number of container images
7495
id: count_initial
7596
run: |
7697
image_count=$(ls -1 ./singularity_container_images | wc -l | xargs)
7798
echo "Initial container image count: $image_count"
78-
echo "IMAGE_COUNT_INITIAL=$image_count" >> ${GITHUB_ENV}
99+
echo "IMAGE_COUNT_INITIAL=$image_count" >> "$GITHUB_OUTPUT"
79100
80101
- name: Run the downloaded pipeline (stub)
81102
id: stub_run_pipeline
82103
continue-on-error: true
83104
env:
84105
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images
85106
NXF_SINGULARITY_HOME_MOUNT: true
86-
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results
107+
run: nextflow run ./${{needs.configure.outputs.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ needs.configure.outputs.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results
87108
- name: Run the downloaded pipeline (stub run not supported)
88109
id: run_pipeline
89-
if: ${{ job.steps.stub_run_pipeline.status == failure() }}
110+
if: ${{ steps.stub_run_pipeline.outcome == 'failure' }}
90111
env:
91112
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images
92113
NXF_SINGULARITY_HOME_MOUNT: true
93-
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -profile test,singularity --outdir ./results
114+
run: nextflow run ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ needs.configure.outputs.REPO_BRANCH }}) -profile test,singularity --outdir ./results
94115

95116
- name: Count the downloaded number of container images
96117
id: count_afterwards
97118
run: |
98119
image_count=$(ls -1 ./singularity_container_images | wc -l | xargs)
99120
echo "Post-pipeline run container image count: $image_count"
100-
echo "IMAGE_COUNT_AFTER=$image_count" >> ${GITHUB_ENV}
121+
echo "IMAGE_COUNT_AFTER=$image_count" >> "$GITHUB_OUTPUT"
101122
102123
- name: Compare container image counts
103124
run: |
104-
if [ "${{ env.IMAGE_COUNT_INITIAL }}" -ne "${{ env.IMAGE_COUNT_AFTER }}" ]; then
105-
initial_count=${{ env.IMAGE_COUNT_INITIAL }}
106-
final_count=${{ env.IMAGE_COUNT_AFTER }}
125+
if [ "${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }}" -ne "${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }}" ]; then
126+
initial_count=${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }}
127+
final_count=${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }}
107128
difference=$((final_count - initial_count))
108129
echo "$difference additional container images were \n downloaded at runtime . The pipeline has no support for offline runs!"
109-
tree ./singularity_container_images
130+
tree ./singularity_container_images > ./container_afterwards
131+
diff ./container_initial ./container_afterwards
110132
exit 1
111133
else
112134
echo "The pipeline can be downloaded successfully!"

.github/workflows/fix-linting.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
# Use the @nf-core-bot token to check out so we can push later
16-
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1717
with:
1818
token: ${{ secrets.nf_core_bot_auth_token }}
1919

@@ -32,7 +32,7 @@ jobs:
3232
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}
3333

3434
# Install and run pre-commit
35-
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
35+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
3636
with:
3737
python-version: "3.12"
3838

.github/workflows/linting.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
push:
77
branches:
88
- dev
9-
- template_update
109
pull_request:
1110
release:
1211
types: [published]
@@ -15,10 +14,10 @@ jobs:
1514
pre-commit:
1615
runs-on: ubuntu-latest
1716
steps:
18-
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1918

2019
- name: Set up Python 3.12
21-
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
20+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
2221
with:
2322
python-version: "3.12"
2423

@@ -32,12 +31,12 @@ jobs:
3231
runs-on: ubuntu-latest
3332
steps:
3433
- name: Check out pipeline code
35-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
34+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3635

3736
- name: Install Nextflow
3837
uses: nf-core/setup-nextflow@v2
3938

40-
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
39+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
4140
with:
4241
python-version: "3.12"
4342
architecture: "x64"
@@ -75,7 +74,7 @@ jobs:
7574

7675
- name: Upload linting log file artifact
7776
if: ${{ always() }}
78-
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
77+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
7978
with:
8079
name: linting-logs
8180
path: |

.github/workflows/linting_comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Download lint results
14-
uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6
14+
uses: dawidd6/action-download-artifact@20319c5641d495c8a52e688b7dc5fada6c3a9fbc # v8
1515
with:
1616
workflow: linting.yml
1717
workflow_conclusion: completed

0 commit comments

Comments
 (0)