Skip to content

Commit 5f11dda

Browse files
authored
Merge pull request #142 from sanger-tol/precomp_busco
Precomputed BUSCOs
2 parents 3f450fd + b45b34a commit 5f11dda

File tree

90 files changed

+3280
-2317
lines changed

Some content is hidden

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

90 files changed

+3280
-2317
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,7 @@
1010
"vscode": {
1111
// Set *default* container specific settings.json values on container create.
1212
"settings": {
13-
"python.defaultInterpreterPath": "/opt/conda/bin/python",
14-
"python.linting.enabled": true,
15-
"python.linting.pylintEnabled": true,
16-
"python.formatting.autopep8Path": "/opt/conda/bin/autopep8",
17-
"python.formatting.yapfPath": "/opt/conda/bin/yapf",
18-
"python.linting.flake8Path": "/opt/conda/bin/flake8",
19-
"python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle",
20-
"python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle",
21-
"python.linting.pylintPath": "/opt/conda/bin/pylint"
13+
"python.defaultInterpreterPath": "/opt/conda/bin/python"
2214
},
2315

2416
// Add the IDs of extensions you want installed when the container is created.

.editorconfig

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,20 @@ end_of_line = unset
1818
insert_final_newline = unset
1919
trim_trailing_whitespace = unset
2020
indent_style = unset
21-
indent_size = unset
22-
23-
[/assets/email*]
24-
indent_size = unset
25-
26-
# To prevent errors for these test diamond databases
27-
[/assets/test*/*.dmnd]
21+
[/subworkflows/nf-core/**]
2822
charset = unset
2923
end_of_line = unset
3024
insert_final_newline = unset
3125
trim_trailing_whitespace = unset
3226
indent_style = unset
27+
28+
[/assets/email*]
3329
indent_size = unset
3430

35-
# To prevent errors for these test blastn databases
36-
[/assets/test*/nt_*/*.{ndb,nhr,nin,nog,nos,not,nsq,ntf,nto}]
37-
charset = unset
38-
end_of_line = unset
39-
insert_final_newline = unset
40-
trim_trailing_whitespace = unset
31+
# ignore python and markdown
32+
[*.{py,md}]
4133
indent_style = unset
42-
indent_size = unset
34+
35+
# ignore ro-crate metadata files
36+
[**/ro-crate-metadata.json]
37+
insert_final_newline = unset

.github/CONTRIBUTING.md

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

33
Hi there!
44
Many thanks for taking an interest in improving sanger-tol/blobtoolkit.
@@ -16,15 +16,18 @@ If you'd like to write some code for sanger-tol/blobtoolkit, the standard workfl
1616
1. Check that there isn't already an issue about your idea in the [sanger-tol/blobtoolkit issues](https://github.com/sanger-tol/blobtoolkit/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/blobtoolkit repository](https://github.com/sanger-tol/blobtoolkit) 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 can optionally test your changes by running the pipeline locally. Then it is recommended to use the `debug` profile to
27-
receive warnings about process selectors and other debug info. Example: `nextflow run . -profile debug,test,docker --outdir <OUTDIR>`.
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+
```
2831

2932
When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests.
3033
Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then.
@@ -34,7 +37,7 @@ There are typically two types of tests that run:
3437
### Lint tests
3538

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

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

@@ -49,23 +52,23 @@ These tests are run both with the latest available version of `Nextflow` and als
4952

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

52-
- 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`.
5356
- Fix the bug, and bump version (X.Y.Z+1).
54-
- 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.
5558

5659
## Pipeline contribution conventions
5760

58-
To make the sanger-tol/blobtoolkit 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/blobtoolkit` 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.
5962

6063
### Adding a new step
6164

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

64-
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.
6568
2. Write the process block (see below).
6669
3. Define the output channel if needed (see below).
6770
4. Add any new parameters to `nextflow.config` with a default (see below).
68-
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).
6972
6. Add sanity checks and validation for all relevant parameters.
7073
7. Perform local tests to validate that the new code works as expected.
7174
8. If applicable, add a new test command in `.github/workflow/ci.yml`.
@@ -74,15 +77,15 @@ If you wish to contribute a new step, please use the following coding standards:
7477

7578
### Default values
7679

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

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

8184
### Default processes resource requirements
8285

83-
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.
86+
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.
8487

85-
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.
88+
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.
8689

8790
### Naming schemes
8891

@@ -93,7 +96,7 @@ Please use the following naming schemes, to make it easy to understand what is g
9396

9497
### Nextflow version bumping
9598

96-
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]`
99+
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]`
97100

98101
### Images and figures
99102

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ These are the most common things requested on pull requests (PRs).
88
99
Remember that PRs should be made against the dev branch, unless you're preparing a pipeline release.
1010
11-
Learn more about contributing: [CONTRIBUTING.md](.github/CONTRIBUTING.md)
11+
Learn more about contributing: [CONTRIBUTING.md](https://github.com/sanger-tol/blobtoolkit/tree/main/.github/CONTRIBUTING.md)
1212
-->
1313

1414
## PR checklist
1515

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!
18-
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](.github/CONTRIBUTING.md)
19-
- [ ] Make sure your code lints (`nf-core lint`).
18+
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/sanger-tol/blobtoolkit/tree/main/.github/CONTRIBUTING.md)
19+
- [ ] Make sure your code lints (`nf-core pipelines lint`).
2020
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`).
2121
- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir <OUTDIR>`).
2222
- [ ] Usage Documentation in `docs/usage.md` is updated.

.github/workflows/branch.yml

Lines changed: 11 additions & 9 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 main branch on the repository
3-
# It fails when someone tries to make a PR against the nf-core `main` 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: [main]
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 main 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 == 'sanger-tol/blobtoolkit'
1517
run: |
@@ -19,10 +21,10 @@ jobs:
1921
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
2022
- name: Post PR comment
2123
if: failure()
22-
uses: mshick/add-pr-comment@v1
24+
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
2325
with:
2426
message: |
25-
## This PR is against the `main` 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 }}) `main` branch.
36-
The `main` branch on nf-core repositories should always contain code from the latest release.
37-
Because of this, PRs to `main` 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: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,79 @@ 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 dev branch (merged PRs)
2225
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'sanger-tol/blobtoolkit') }}"
2326
runs-on: ubuntu-latest
2427
strategy:
2528
matrix:
2629
NXF_VER:
27-
- "23.04.0"
30+
- "24.04.2"
2831
- "latest-everything"
32+
# "conda" is not supported
33+
profile:
34+
- "docker"
35+
- "singularity"
36+
test_name:
37+
- "test"
38+
isMaster:
39+
- ${{ github.base_ref == 'main' }}
40+
# Exclude conda and singularity on dev
41+
exclude:
42+
- isMaster: false
43+
profile: "singularity"
2944
steps:
3045
- name: Check out pipeline code
31-
uses: actions/checkout@v4
46+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
47+
with:
48+
fetch-depth: 0
3249

33-
- name: Install Nextflow
50+
- name: Set up Nextflow
3451
uses: nf-core/setup-nextflow@v2
3552
with:
3653
version: "${{ matrix.NXF_VER }}"
3754

38-
- name: Run pipeline with test data
39-
# You can customise CI pipeline run tests as required
40-
# For example: adding multiple test runs with different parameters
41-
# Remember that you can parallelise this by using strategy.matrix
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: Set up Miniconda
66+
if: matrix.profile == 'conda'
67+
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3
68+
with:
69+
miniconda-version: "latest"
70+
auto-update-conda: true
71+
conda-solver: libmamba
72+
channels: conda-forge,bioconda
73+
74+
- name: Set up Conda
75+
if: matrix.profile == 'conda'
76+
run: |
77+
echo $(realpath $CONDA)/condabin >> $GITHUB_PATH
78+
echo $(realpath python) >> $GITHUB_PATH
79+
80+
- name: Clean up Disk space
81+
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
82+
83+
- name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}"
4284
run: |
43-
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results
85+
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} --outdir ./results

.github/workflows/clean-up.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
issues: write
1111
pull-requests: write
1212
steps:
13-
- uses: actions/stale@v7
13+
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9
1414
with:
1515
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."
1616
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."

0 commit comments

Comments
 (0)