Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json",
"name": "nfcore",
"image": "nfcore/devcontainer:latest",

Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export PS1='\[\e[3;36m\]\w ->\[\e[0m\\] '
nextflow self-update

# Update welcome message
echo "Welcome to the nf-core/spatialxe devcontainer!" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt
echo "Welcome to the nf-core/spatialaxe devcontainer!" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt
125 changes: 125 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# `nf-core/spatialaxe`: Contributing Guidelines

Hi there!
Many thanks for taking an interest in improving nf-core/spatialaxe.

We try to manage the required tasks for nf-core/spatialaxe using GitHub issues, you probably came to this page when creating one.
Please use the pre-filled template to save time.

However, don't be put off by this template - other more general issues and suggestions are welcome!
Contributions to the code are even more welcome ;)

> [!NOTE]
> If you need help using or modifying nf-core/spatialaxe then the best place to ask is on the nf-core Slack [#spatialaxe](https://nfcore.slack.com/channels/spatialaxe) channel ([join our Slack here](https://nf-co.re/join/slack)).

## Contribution workflow

If you'd like to write some code for nf-core/spatialaxe, the standard workflow is as follows:

1. Check that there isn't already an issue about your idea in the [nf-core/spatialaxe issues](https://github.com/nf-core/spatialaxe/issues) to avoid duplicating work. If there isn't one already, please create one so that others know you're working on this
2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [nf-core/spatialaxe repository](https://github.com/nf-core/spatialaxe) to your GitHub account
3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions)
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).
5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged

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/).

## Tests

You have the option to test your changes locally by running the pipeline. For receiving warnings about process selectors and other `debug` information, it is recommended to use the debug profile. Execute all the tests with the following command:

```bash
nf-test test --profile debug,test,docker --verbose
```

When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests.
Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then.

There are typically two types of tests that run:

### Lint tests

`nf-core` has a [set of guidelines](https://nf-co.re/developers/guidelines) which all pipelines must adhere to.
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.

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

### Pipeline tests

Each `nf-core` pipeline should be set up with a minimal set of test-data.
`GitHub Actions` then runs the pipeline on this data to ensure that it exits successfully.
If there are any failures then the automated tests fail.
These tests are run both with the latest available version of `Nextflow` and also the minimum required version that is stated in the pipeline code.

## Patch

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

- On your own fork, make a new branch `patch` based on `upstream/main` or `upstream/master`.
- Fix the bug, and bump version (X.Y.Z+1).
- Open a pull-request from `patch` to `main`/`master` with the changes.

## Getting help

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

## Pipeline contribution conventions

To make the `nf-core/spatialaxe` 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.

### Adding a new step

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

1. Define the corresponding input channel into your new process from the expected previous process channel.
2. Write the process block (see below).
3. Define the output channel if needed (see below).
4. Add any new parameters to `nextflow.config` with a default (see below).
5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core pipelines schema build` tool).
6. Add sanity checks and validation for all relevant parameters.
7. Perform local tests to validate that the new code works as expected.
8. If applicable, add a new test in the `tests` directory.
9. Update MultiQC config `assets/multiqc_config.yml` so relevant suffixes, file name clean up and module plots are in the appropriate order. If applicable, add a [MultiQC](https://https://multiqc.info/) module.
10. Add a description of the output files and if relevant any appropriate images from the MultiQC report to `docs/output.md`.

### Default values

Parameters should be initialised / defined with default values within the `params` scope in `nextflow.config`.

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

### Default processes resource requirements

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.

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.

### Naming schemes

Please use the following naming schemes, to make it easy to understand what is going where.

- initial process channel: `ch_output_from_<process>`
- intermediate and terminal channels: `ch_<previousprocess>_for_<nextprocess>`

### Nextflow version bumping

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]`

### Images and figures

For overview images and other documents we follow the nf-core [style guidelines and examples](https://nf-co.re/developers/design_guidelines).

## GitHub Codespaces

This repo includes a devcontainer configuration which will create a GitHub Codespaces for Nextflow development! This is an online developer environment that runs in your browser, complete with VSCode and a terminal.

To get started:

- Open the repo in [Codespaces](https://github.com/nf-core/spatialaxe/codespaces)
- Tools installed
- nf-core
- Nextflow

Devcontainer specs:

- [DevContainer config](.devcontainer/devcontainer.json)
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
Before you post this issue, please check the documentation:

- [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting)
- [nf-core/spatialxe pipeline documentation](https://nf-co.re/spatialxe/usage)
- [nf-core/spatialaxe pipeline documentation](https://nf-co.re/spatialaxe/usage)
- type: textarea
id: description
attributes:
Expand Down Expand Up @@ -46,4 +46,4 @@ body:
* Executor _(eg. slurm, local, awsbatch)_
* Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter, Charliecloud, or Apptainer)_
* OS _(eg. CentOS Linux, macOS, Linux Mint)_
* Version of nf-core/spatialxe _(eg. 1.1, 1.5, 1.8.2)_
* Version of nf-core/spatialaxe _(eg. 1.1, 1.5, 1.8.2)_
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ contact_links:
- name: Join nf-core
url: https://nf-co.re/join
about: Please join the nf-core community here
- name: "Slack #spatialxe channel"
url: https://nfcore.slack.com/channels/spatialxe
about: Discussion about the nf-core/spatialxe pipeline
- name: "Slack #spatialaxe channel"
url: https://nfcore.slack.com/channels/spatialaxe
about: Discussion about the nf-core/spatialaxe pipeline
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Feature request
description: Suggest an idea for the nf-core/spatialxe pipeline
description: Suggest an idea for the nf-core/spatialaxe pipeline
labels: enhancement
body:
- type: textarea
Expand Down
10 changes: 5 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<!--
# nf-core/spatialxe pull request
# nf-core/spatialaxe pull request

Many thanks for contributing to nf-core/spatialxe!
Many thanks for contributing to nf-core/spatialaxe!

Please fill in the appropriate checklist below (delete whatever is not relevant).
These are the most common things requested on pull requests (PRs).

Remember that PRs should be made against the dev branch, unless you're preparing a pipeline release.

Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/spatialxe/tree/master/docs/CONTRIBUTING.md)
Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/spatialaxe/tree/main/.github/CONTRIBUTING.md)
-->

## PR checklist

- [ ] This comment contains a description of changes (with reason).
- [ ] If you've fixed a bug or added code that should be tested, add tests!
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/spatialxe/tree/master/docs/CONTRIBUTING.md)
- [ ] If necessary, also make a PR on the nf-core/spatialxe _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/spatialaxe/tree/main/.github/CONTRIBUTING.md)
- [ ] If necessary, also make a PR on the nf-core/spatialaxe _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
- [ ] Make sure your code lints (`nf-core pipelines lint`).
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`).
- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir <OUTDIR>`).
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/get-shards/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ runs:
using: "composite"
steps:
- name: Install nf-test
uses: nf-core/setup-nf-test@4069fbbaabe94c08faba4ad261bfa88225ba133f # v2
uses: nf-core/setup-nf-test@v1
with:
version: ${{ env.NFT_VER }}
- name: Get number of shards
Expand Down
10 changes: 5 additions & 5 deletions .github/actions/nf-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ runs:
using: "composite"
steps:
- name: Setup Nextflow
uses: nf-core/setup-nextflow@b4ec1bc7c16a94435159de94a05253542fddf6ef # v3
uses: nf-core/setup-nextflow@v2
with:
version: "${{ env.NXF_VERSION }}"

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
with:
python-version: "3.14"

- name: Install nf-test
uses: nf-core/setup-nf-test@4069fbbaabe94c08faba4ad261bfa88225ba133f # v2
uses: nf-core/setup-nf-test@v1
with:
version: "${{ env.NFT_VER }}"
install-pdiff: true

- name: Setup apptainer
if: contains(inputs.profile, 'singularity')
uses: eWaterCycle/setup-apptainer@3f706d898c9db585b1d741b4692e66755f3a1b40 # v2
uses: eWaterCycle/setup-apptainer@main

- name: Set up Singularity
if: contains(inputs.profile, 'singularity')
Expand All @@ -48,7 +48,7 @@ runs:

- name: Conda setup
if: contains(inputs.profile, 'conda')
uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3
with:
auto-update-conda: true
conda-solver: libmamba
Expand Down
32 changes: 6 additions & 26 deletions .github/workflows/awsfulltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
run-platform:
name: Run AWS full tests
# run only if the PR is approved by at least 2 reviewers and against the master/main branch or manually triggered
if: github.repository == 'nf-core/spatialxe' && github.event.review.state == 'approved' && (github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'main') || github.event_name == 'workflow_dispatch' || github.event_name == 'release'
if: github.repository == 'nf-core/spatialaxe' && github.event.review.state == 'approved' && (github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'main') || github.event_name == 'workflow_dispatch' || github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- name: Set revision variable
Expand All @@ -23,43 +23,23 @@ jobs:
echo "revision=${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'release') && github.sha || 'dev' }}" >> "$GITHUB_OUTPUT"

- name: Launch workflow via Seqera Platform
uses: seqeralabs/action-tower-launch@51565b514bff1827cf34620de25d0055759f1fc9 # v2
# TODO nf-core: You can customise AWS full pipeline tests as required
uses: seqeralabs/action-tower-launch@v2
# Add full size test data (but still relatively small datasets for few samples)
# on the `test_full.config` test runs with only one set of parameters
with:
workspace_id: ${{ vars.TOWER_WORKSPACE_ID }}
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
compute_env: ${{ vars.TOWER_COMPUTE_ENV }}
revision: ${{ steps.revision.outputs.revision }}
workdir: s3://${{ vars.AWS_S3_BUCKET }}/work/spatialxe/work-${{ steps.revision.outputs.revision }}
nextflow_config: |
plugins {
id 'nf-slack@0.5.0'
}
slack {
enabled = true
bot {
token = '${{ secrets.NFSLACK_BOT_TOKEN }}'
channel = 'spatialxe'
}
onStart {
enabled = false
}
onComplete {
message = ':white_check_mark: *spatialxe/test_full* completed successfully! :tada:'
}
onError {
message = ':x: *spatialxe/test_full* failed :crying_cat_face:'
}
}
workdir: s3://${{ vars.AWS_S3_BUCKET }}/work/spatialaxe/work-${{ steps.revision.outputs.revision }}
parameters: |
{
"outdir": "s3://${{ vars.AWS_S3_BUCKET }}/spatialxe/results-${{ steps.revision.outputs.revision }}"
"hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}",
"outdir": "s3://${{ vars.AWS_S3_BUCKET }}/spatialaxe/results-${{ steps.revision.outputs.revision }}"
}
profiles: test_full

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: Seqera Platform debug log file
path: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/awstest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ on:
jobs:
run-platform:
name: Run AWS tests
if: github.repository == 'nf-core/spatialxe'
if: github.repository == 'nf-core/spatialaxe'
runs-on: ubuntu-latest
steps:
# Launch workflow using Seqera Platform CLI tool action
- name: Launch workflow via Seqera Platform
uses: seqeralabs/action-tower-launch@51565b514bff1827cf34620de25d0055759f1fc9 # v2
uses: seqeralabs/action-tower-launch@v2
with:
workspace_id: ${{ vars.TOWER_WORKSPACE_ID }}
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
compute_env: ${{ vars.TOWER_COMPUTE_ENV }}
revision: ${{ github.sha }}
workdir: s3://${{ vars.AWS_S3_BUCKET }}/work/spatialxe/work-${{ github.sha }}
workdir: s3://${{ vars.AWS_S3_BUCKET }}/work/spatialaxe/work-${{ github.sha }}
parameters: |
{
"outdir": "s3://${{ vars.AWS_S3_BUCKET }}/spatialxe/results-test-${{ github.sha }}"
"outdir": "s3://${{ vars.AWS_S3_BUCKET }}/spatialaxe/results-test-${{ github.sha }}"
}
profiles: test

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: Seqera Platform debug log file
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
steps:
# PRs to the nf-core repo main/master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches
- name: Check PRs
if: github.repository == 'nf-core/spatialxe'
if: github.repository == 'nf-core/spatialaxe'
run: |
{ [[ ${{github.event.pull_request.head.repo.full_name }} == nf-core/spatialxe ]] && [[ $GITHUB_HEAD_REF == "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
{ [[ ${{github.event.pull_request.head.repo.full_name }} == nf-core/spatialaxe ]] && [[ $GITHUB_HEAD_REF == "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]

# If the above check failed, post a comment on the PR explaining the failure
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
- name: Post PR comment
if: failure()
uses: mshick/add-pr-comment@8e4927817251f1ff60c001f04568532b38e0b4a0 # v3
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
with:
message: |
## This PR is against the `${{github.event.pull_request.base.ref}}` branch :x:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clean-up.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10
with:
stale-issue-message: "This issue has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment otherwise this issue will be closed in 20 days."
stale-pr-message: "This PR has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment if it is still useful."
Expand Down
Loading
Loading