Skip to content

Commit 0eea1a8

Browse files
authored
Merge pull request #105 from sanger-tol/dev
feat(pipeline): version 0.50.0 release
2 parents 31b508a + 5cd079c commit 0eea1a8

File tree

543 files changed

+37896
-8390
lines changed

Some content is hidden

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

543 files changed

+37896
-8390
lines changed

.devcontainer/devcontainer.json

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
11
{
22
"name": "nfcore",
3-
"image": "nfcore/gitpod:latest",
4-
"remoteUser": "gitpod",
3+
"image": "nfcore/devcontainer:latest",
54

6-
// Configure tool-specific properties.
7-
"customizations": {
8-
// Configure properties specific to VS Code.
9-
"vscode": {
10-
// Set *default* container specific settings.json values on container create.
11-
"settings": {
12-
"python.defaultInterpreterPath": "/opt/conda/bin/python",
13-
"python.linting.enabled": true,
14-
"python.linting.pylintEnabled": true,
15-
"python.formatting.autopep8Path": "/opt/conda/bin/autopep8",
16-
"python.formatting.yapfPath": "/opt/conda/bin/yapf",
17-
"python.linting.flake8Path": "/opt/conda/bin/flake8",
18-
"python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle",
19-
"python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle",
20-
"python.linting.pylintPath": "/opt/conda/bin/pylint"
21-
},
5+
"remoteUser": "root",
6+
"privileged": true,
227

23-
// Add the IDs of extensions you want installed when the container is created.
24-
"extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"]
25-
}
8+
"remoteEnv": {
9+
// Workspace path on the host for mounting with docker-outside-of-docker
10+
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
11+
},
12+
13+
"onCreateCommand": "./.devcontainer/setup.sh",
14+
15+
"hostRequirements": {
16+
"cpus": 4,
17+
"memory": "16gb",
18+
"storage": "32gb"
2619
}
2720
}

.devcontainer/setup.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
# Customise the terminal command prompt
4+
echo "export PROMPT_DIRTRIM=2" >> $HOME/.bashrc
5+
echo "export PS1='\[\e[3;36m\]\w ->\[\e[0m\\] '" >> $HOME/.bashrc
6+
export PROMPT_DIRTRIM=2
7+
export PS1='\[\e[3;36m\]\w ->\[\e[0m\\] '
8+
9+
# Update Nextflow
10+
nextflow self-update
11+
12+
# Update welcome message
13+
echo "Welcome to the sanger-tol/genomeassembly devcontainer!" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt

.editorconfig

Lines changed: 0 additions & 24 deletions
This file was deleted.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
*.config linguist-language=nextflow
22
*.nf.test linguist-language=nextflow
33
modules/nf-core/** linguist-generated
4+
modules/sanger-tol/** linguist-generated
45
subworkflows/nf-core/** linguist-generated
6+
subworkflows/sanger-tol/** linguist-generated

.github/CONTRIBUTING.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# sanger-tol/genomeassembly: Contributing Guidelines
1+
# `sanger-tol/genomeassembly`: Contributing Guidelines
22

33
Hi there!
44
Many thanks for taking an interest in improving sanger-tol/genomeassembly.
@@ -16,13 +16,19 @@ If you'd like to write some code for sanger-tol/genomeassembly, the standard wor
1616
1. Check that there isn't already an issue about your idea in the [sanger-tol/genomeassembly issues](https://github.com/sanger-tol/genomeassembly/issues) to avoid duplicating work. If there isn't one already, please create one so that others know you're working on this
1717
2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [sanger-tol/genomeassembly repository](https://github.com/sanger-tol/genomeassembly) to your GitHub account
1818
3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions)
19-
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).
19+
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).
2020
5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged
2121

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

2424
## Tests
2525

26+
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:
27+
28+
```bash
29+
nf-test test --profile debug,test,docker --verbose
30+
```
31+
2632
When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests.
2733
Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then.
2834

@@ -31,7 +37,7 @@ There are typically two types of tests that run:
3137
### Lint tests
3238

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

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

@@ -46,40 +52,38 @@ These tests are run both with the latest available version of `Nextflow` and als
4652

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

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

5359
## Pipeline contribution conventions
5460

55-
To make the sanger-tol/genomeassembly 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.
61+
To make the `sanger-tol/genomeassembly` 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.
5662

5763
### Adding a new step
5864

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

61-
1. Define the corresponding input channel into your new process from the expected previous process channel
67+
1. Define the corresponding input channel into your new process from the expected previous process channel.
6268
2. Write the process block (see below).
6369
3. Define the output channel if needed (see below).
6470
4. Add any new parameters to `nextflow.config` with a default (see below).
65-
5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core schema build` tool).
71+
5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core pipelines schema build` tool).
6672
6. Add sanity checks and validation for all relevant parameters.
6773
7. Perform local tests to validate that the new code works as expected.
68-
8. If applicable, add a new test command in `.github/workflow/ci.yml`.
69-
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.
70-
10. Add a description of the output files and if relevant any appropriate images from the MultiQC report to `docs/output.md`.
74+
8. If applicable, add a new test in the `tests` directory.
7175

7276
### Default values
7377

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

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

7882
### Default processes resource requirements
7983

80-
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.
84+
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.
8185

82-
The process resources can be passed on to the tool dynamically within the process with the `${task.cpu}` and `${task.memory}` variables in the `script:` block.
86+
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.
8387

8488
### Naming schemes
8589

@@ -90,7 +94,7 @@ Please use the following naming schemes, to make it easy to understand what is g
9094

9195
### Nextflow version bumping
9296

93-
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]`
97+
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]`
9498

9599
### Images and figures
96100

@@ -110,4 +114,3 @@ To get started:
110114
Devcontainer specs:
111115

112116
- [DevContainer config](.devcontainer/devcontainer.json)
113-
- [Dockerfile](.devcontainer/Dockerfile)
Lines changed: 87 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,87 @@
1-
name: Bug report
2-
description: Report something that is broken or incorrect
3-
labels: bug
4-
body:
5-
- type: textarea
6-
id: description
7-
attributes:
8-
label: Description of the bug
9-
description: A clear and concise description of what the bug is.
10-
validations:
11-
required: true
12-
- type: textarea
13-
id: command_used
14-
attributes:
15-
label: Command used and terminal output
16-
description: Steps to reproduce the behaviour. Please paste the command you used
17-
to launch the pipeline and the output from your terminal.
18-
render: console
19-
placeholder: "$ nextflow run ...
20-
21-
22-
Some output where something broke
23-
24-
"
25-
- type: textarea
26-
id: files
27-
attributes:
28-
label: Relevant files
29-
description: "Please drag and drop the relevant files here. Create a `.zip` archive
30-
if the extension is not allowed.
31-
32-
Your verbose log file `.nextflow.log` is often useful _(this is a hidden file
33-
in the directory where you launched the pipeline)_ as well as custom Nextflow
34-
configuration files.
35-
36-
"
37-
- type: textarea
38-
id: system
39-
attributes:
40-
label: System information
41-
description: "* Nextflow version _(eg. 22.10.1)_
42-
43-
* Hardware _(eg. HPC, Desktop, Cloud)_
44-
45-
* Executor _(eg. slurm, local, awsbatch)_
46-
47-
* Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter, Charliecloud,
48-
or Apptainer)_
49-
50-
* OS _(eg. CentOS Linux, macOS, Linux Mint)_
51-
52-
* Version of sanger-tol/genomeassembly _(eg. 1.1, 1.5, 1.8.2)_
53-
54-
"
1+
name: nf-core CI
2+
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
pull_request:
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
12+
env:
13+
NXF_ANSI_LOG: false
14+
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
15+
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity
16+
17+
concurrency:
18+
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
19+
cancel-in-progress: true
20+
21+
jobs:
22+
test:
23+
name: "Run pipeline with test data (${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }})"
24+
# Only run on push if this is the nf-core dev branch (merged PRs)
25+
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'sanger-tol/genomeassembly') }}"
26+
runs-on: ubuntu-latest
27+
strategy:
28+
matrix:
29+
NXF_VER:
30+
- "24.04.2"
31+
- "latest-everything"
32+
profile:
33+
- "conda"
34+
- "docker"
35+
- "singularity"
36+
test_name:
37+
- "test"
38+
isMaster:
39+
- ${{ github.base_ref == 'master' }}
40+
# Exclude conda and singularity on dev
41+
exclude:
42+
- isMaster: false
43+
profile: "conda"
44+
- isMaster: false
45+
profile: "singularity"
46+
steps:
47+
- name: Check out pipeline code
48+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
49+
with:
50+
fetch-depth: 0
51+
52+
- name: Set up Nextflow
53+
uses: nf-core/setup-nextflow@v2
54+
with:
55+
version: "${{ matrix.NXF_VER }}"
56+
57+
- name: Set up Apptainer
58+
if: matrix.profile == 'singularity'
59+
uses: eWaterCycle/setup-apptainer@main
60+
61+
- name: Set up Singularity
62+
if: matrix.profile == 'singularity'
63+
run: |
64+
mkdir -p $NXF_SINGULARITY_CACHEDIR
65+
mkdir -p $NXF_SINGULARITY_LIBRARYDIR
66+
67+
- name: Set up Miniconda
68+
if: matrix.profile == 'conda'
69+
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3
70+
with:
71+
miniconda-version: "latest"
72+
auto-update-conda: true
73+
conda-solver: libmamba
74+
channels: conda-forge,bioconda
75+
76+
- name: Set up Conda
77+
if: matrix.profile == 'conda'
78+
run: |
79+
echo $(realpath $CONDA)/condabin >> $GITHUB_PATH
80+
echo $(realpath python) >> $GITHUB_PATH
81+
82+
- name: Clean up Disk space
83+
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
84+
85+
- name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}"
86+
run: |
87+
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} --outdir ./results

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/sanger-tol/g
1616
- [ ] This comment contains a description of changes (with reason).
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/sanger-tol/genomeassembly/tree/master/.github/CONTRIBUTING.md)
19-
- [ ] Make sure your code lints (`nf-core lint`).
19+
- [ ] Make sure your code lints (`nf-core pipelines lint`).
2020
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`).
21+
- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir <OUTDIR>`).
2122
- [ ] Usage Documentation in `docs/usage.md` is updated.
2223
- [ ] Output Documentation in `docs/output.md` is updated.
2324
- [ ] `CHANGELOG.md` is updated.

0 commit comments

Comments
 (0)