Skip to content
Merged
Show file tree
Hide file tree
Changes from 157 commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
2584645
Update sanger_test_full.yml
gq1 Sep 13, 2024
ea1b05a
Update sanger_test_full.yml
gq1 Sep 16, 2024
e0bf8ba
Merge pull request #113 from sanger-tol/small_tower_compute_env
gq1 Sep 16, 2024
d13d1ed
Fixed the comment
muffato Sep 19, 2024
2c793aa
UPDATEBLOBDIR needs to pass the tsv files through certain arguments
muffato Sep 19, 2024
b55f76c
Populate as much as possible of the metadata at the beginning
muffato Sep 19, 2024
0daf1e2
Also generate TSV files
muffato Jul 2, 2024
2cf12fd
Example plugging the TSV files into blobtools commands
muffato Jul 2, 2024
b8b1fa4
Skip BLOBTOOLKIT_METADATA as we generate the yaml file correctly from…
muffato Sep 19, 2024
41b101f
Introduced a new samplesheet parameter to track single/paired readsets
muffato Sep 20, 2024
80a100b
Populate as much as possible of the metadata at the beginning
muffato Sep 20, 2024
bea3a77
Version bumps
muffato Sep 20, 2024
4edafb4
Updated the documentation
muffato Sep 20, 2024
904a512
Version bump
muffato Sep 20, 2024
51985ad
Publish the windowmasker outputs too
muffato Sep 20, 2024
f47dd16
Convert input BAM/CRAM files to Fasta on the fly
muffato Sep 23, 2024
43254bc
Bumped the version down
muffato Sep 26, 2024
c89b1b9
Pin the version of editorconfig like in the readmapping pipeline
muffato Sep 26, 2024
152282b
Exclude sqlite databases from ECLint
muffato Sep 26, 2024
476b736
add exclusions for nf-core lint
tkchafin Sep 30, 2024
303b221
Update CITATIONS.md
tkchafin Sep 30, 2024
27b0a51
prettier linting
tkchafin Sep 30, 2024
4eef0fa
The release is going to happen today
muffato Oct 2, 2024
0d8a5a9
Decreased the runtime requirements for illumina alignments
muffato Oct 2, 2024
1909646
Wording of the changelog
muffato Oct 2, 2024
102dbf4
Merge pull request #114 from sanger-tol/chrom_view
muffato Oct 2, 2024
8a05dc2
Documentation update
muffato Oct 2, 2024
abe2b76
Bumped up the underlying BTK version because 4.3.9 had a bug
muffato Oct 14, 2024
dfb4655
Updated the blastn runtime requirements to avoid basement jobs
muffato Oct 14, 2024
17b38ee
database parameterisation and separate tests from sanger infrastructure
tkchafin Oct 14, 2024
93bda84
Merge pull request #117 from sanger-tol/misc_fixes
tkchafin Oct 16, 2024
ea6d70a
Updated database installation instructions
muffato Oct 19, 2024
36fff07
fix URL not found in uniprot ref ftp path
tkchafin Oct 19, 2024
61c0328
fix ftp path for taxdump
tkchafin Oct 19, 2024
b9bcef6
Merge pull request #118 from sanger-tol/db_install
tkchafin Oct 21, 2024
2b22f24
Update test.config
tkchafin Oct 24, 2024
8d2b83f
Merge pull request #120 from sanger-tol/blastn_test
tkchafin Nov 4, 2024
254fea1
separate databases from sanger infra; handle compression
tkchafin Nov 11, 2024
2afc63d
Merge pull request #3 from tkchafin/dev
tkchafin Nov 11, 2024
6399d0a
Update conf/test_full.config
tkchafin Nov 19, 2024
779ec64
Update subworkflows/local/input_check.nf
tkchafin Nov 19, 2024
dddef77
remove local database copies from assets
tkchafin Nov 19, 2024
a49bbd3
remove pre-download from ci
tkchafin Nov 19, 2024
4e176e0
docs update
tkchafin Nov 19, 2024
959537d
changelog update
tkchafin Nov 19, 2024
641d464
prettier linting
tkchafin Nov 19, 2024
c5ab0a1
remove local files from CI
tkchafin Nov 19, 2024
151e154
modules partially updated; stuck on samtools/view
tkchafin Nov 19, 2024
2793130
all modules updated exc. BUSCO
tkchafin Nov 21, 2024
a87c43f
busco updated and patched
tkchafin Nov 21, 2024
4e5a942
cleanup ignored file
tkchafin Nov 21, 2024
7cfbcc0
Update docs/usage.md
tkchafin Nov 22, 2024
301bcff
Merge pull request #121 from tkchafin/db_params
tkchafin Nov 22, 2024
127ea41
bugfix: this transformation should only apply on directories (that co…
muffato Nov 22, 2024
01007ab
Merge pull request #125 from sanger-tol/db_params
muffato Nov 22, 2024
c181b81
bugfix: the blastp and blastx paths can have the same name
muffato Nov 22, 2024
3706165
prettier linting
tkchafin Nov 22, 2024
c0b8e31
Removed references to "defaults"
muffato Oct 24, 2024
6fe1861
Merge pull request #127 from sanger-tol/db_params
muffato Nov 22, 2024
1342ba0
Updated the modules
muffato Nov 25, 2024
d3fbb42
Merge branch 'dev' into anaconda_purge_2
muffato Nov 25, 2024
16ed4ec
Updated a few more references to Anaconda
muffato Nov 25, 2024
3976215
Updated the changelog too
muffato Nov 25, 2024
15974b4
[prettier]
muffato Nov 25, 2024
000b442
Merge pull request #124 from tkchafin/anaconda_purge_2
tkchafin Nov 25, 2024
6fb2a8a
Update ci.yml
tkchafin Dec 16, 2024
81d26b4
Merge pull request #130 from sanger-tol/ci
tkchafin Dec 16, 2024
bc183c4
accepts pre-computed busco as param
tkchafin Feb 19, 2025
27da84e
generate_config works with precomp buscos
tkchafin Feb 19, 2025
f944a34
fixed generate_config with or without precomp busco
tkchafin Feb 21, 2025
42cb2c1
almost there
tkchafin Feb 21, 2025
2e5b487
working for precomputed, not without...
tkchafin Feb 21, 2025
a224fad
now working for precomp, non-precomp, and mixed busco outputs
tkchafin Feb 24, 2025
f5e890a
Updated BTK container to ensure the right Busco ID is used
muffato Feb 23, 2025
e33ca14
upload-artifact bump
muffato Feb 26, 2025
3f450fd
Merge pull request #139 from sanger-tol/busco_bug_full_test
muffato Feb 28, 2025
038e4f5
Delete busco_output directory
tkchafin Mar 3, 2025
b6181e9
upload-artifact@v4
tkchafin Mar 3, 2025
da32d92
python-black linting
tkchafin Mar 3, 2025
3652256
Merge branch 'sanger-tol:dev' into dev
tkchafin Mar 3, 2025
a29bc67
precom busco documentation
tkchafin Mar 3, 2025
df44525
prettier linting
tkchafin Mar 3, 2025
f8e019b
prettier linting
tkchafin Mar 3, 2025
111b596
Template update for nf-core/tools version 2.12.1
muffato Mar 3, 2025
439ff4f
Template upgrade (2.12)
muffato Mar 3, 2025
b872503
Template update for nf-core/tools version 2.13.1
muffato Mar 3, 2025
9501c97
bugfix: the version is in word 4
muffato Mar 3, 2025
d9aaea9
Merge pull request #135 from tkchafin/dev
tkchafin Mar 3, 2025
8876890
Report the full paths rather than the staging names
muffato Mar 3, 2025
10deaaf
Include the scheme (https, etc)
muffato Mar 3, 2025
96538eb
Not needed since the channels goes through the download/untar process
muffato Mar 3, 2025
dd7c609
bugfix for the handling of busco=null
muffato Mar 3, 2025
d2326fb
For safety, let's make these value channels
muffato Mar 3, 2025
97978b8
Template upgrade (2.13)
muffato Mar 6, 2025
789ea60
error is the recommended method
muffato Mar 6, 2025
5f93113
Make the subworkflow support queue channels
muffato Mar 6, 2025
2f1c02d
Added missing parameters
DLBPointon Feb 27, 2025
dc8c62b
Template update for nf-core/tools version 2.14.1
muffato Mar 6, 2025
987cf4b
Merge branch 'TEMPLATE' into dev
muffato Mar 6, 2025
210efdc
Template update for nf-core/tools version 3.0.2
muffato Mar 6, 2025
0dc14d7
Merge branch 'TEMPLATE' into dev
muffato Mar 6, 2025
7ab4dab
Template update for nf-core/tools version 3.1.2
muffato Mar 7, 2025
42ab54b
Merge branch 'TEMPLATE' into dev
muffato Mar 7, 2025
21b0254
Test data are not under assets/ any more
muffato Mar 7, 2025
e94e07d
Updated the licence years
muffato Mar 7, 2025
b28d87b
Patches
DLBPointon Mar 7, 2025
d8befdd
linting updates
DLBPointon Mar 7, 2025
2d7f8e7
Template update for nf-core/tools version 3.2.0
muffato Mar 7, 2025
80e9e5e
Merge branch 'TEMPLATE' into template_upgrade
muffato Mar 7, 2025
ea54c9a
Merge commit 'b28d87b' into template_upgrade
muffato Mar 7, 2025
e7a6c34
Merge remote-tracking branch 'origin/BASH-processes' into template_up…
muffato Mar 7, 2025
d9d9b39
Rationalised the way parameters are passed to the pipeline
muffato Mar 7, 2025
b661ff7
Updated the CI settings for conda and master/main
muffato Mar 7, 2025
f1bc670
main, not master
muffato Mar 7, 2025
95e6cff
Catch and retry common HTTP errors
muffato Mar 7, 2025
b35edcd
Support for species names that include a "/"
muffato Mar 7, 2025
db90c83
Not used anymore
muffato Mar 8, 2025
1428747
Added extra parameter validation tricks
muffato Mar 8, 2025
f7ce3b9
These files must exist
muffato Mar 10, 2025
d005311
Fixed the handling of the taxdump
muffato Mar 10, 2025
b04cd6a
allow missing batch summary
tkchafin Mar 11, 2025
56bab7f
allow missing batch summary
tkchafin Mar 11, 2025
10d6e44
fix for mishandling of precomputed outputs in countbusco; fix missing…
tkchafin Mar 11, 2025
c3a53ab
Merge pull request #148 from tkchafin/dev
tkchafin Mar 11, 2025
e7f8d57
Merge branch 'dev' into template_upgrade
tkchafin Mar 12, 2025
0c4640a
Merge pull request #4 from sanger-tol/template_upgrade
tkchafin Mar 12, 2025
2d04b42
merging template changes with precomp_busco
tkchafin Mar 13, 2025
3196ecf
Merge pull request #152 from tkchafin/dev
tkchafin Mar 13, 2025
33cd083
[prettier]
tkchafin Mar 13, 2025
f2528ce
Merge pull request #153 from tkchafin/dev
tkchafin Mar 13, 2025
6731583
remove test print
tkchafin Mar 13, 2025
80e4a7e
remove test print
tkchafin Mar 13, 2025
7a96e3f
fix for when no databases to untar
tkchafin Mar 13, 2025
8fd723d
Merge pull request #154 from tkchafin/dev
tkchafin Mar 13, 2025
41647e9
fix precomputed_busco entry in the schema
tkchafin Mar 13, 2025
b7261a1
documentation for test_nobusco
tkchafin Mar 13, 2025
b664ab2
Merge pull request #155 from tkchafin/dev
tkchafin Mar 13, 2025
27b897d
Naming
muffato Mar 14, 2025
65e1833
This must be a valid path
muffato Mar 14, 2025
c074d28
The Busco directory is not a mandatory input as the module is capable…
muffato Mar 14, 2025
b96a0a3
Publish the JSON file for reuse
muffato Mar 14, 2025
8a53451
Use the precomputed JSON to make the test faster
muffato Mar 14, 2025
fdb9cf0
`if` can't be used to check if a channel is empty
muffato Mar 14, 2025
7e1369e
This can't happen due to the way the database channel is initially co…
muffato Mar 14, 2025
cde4dc9
The channels already have .first()
muffato Mar 14, 2025
ee267b9
Moved the call to first() to make things clearer
muffato Mar 14, 2025
f94fce4
alignment
muffato Mar 14, 2025
8913dd1
This is a path and must have the `name` method
muffato Mar 14, 2025
49f2156
The guideline is that all calls should have first() so that the subwo…
muffato Mar 14, 2025
7bc8850
Restored the multiqc output - but only for newly-computed BUSCOs
muffato Mar 14, 2025
18e4f95
Aligned with the Python script: supports direct lineage names
muffato Mar 14, 2025
30c3774
bugfix: the genome must be made a value channel so that the value can…
muffato Mar 14, 2025
e9f5398
Corrected the availability of short_summary.tsv
muffato Mar 14, 2025
87cab15
bugfix: the name of Busco has changed
muffato Mar 14, 2025
b45b34a
Expanded to cater for the new test profiles
muffato Mar 14, 2025
5f11dda
Merge pull request #142 from sanger-tol/precomp_busco
muffato Mar 14, 2025
1b97dac
Preparing for the relase
muffato Mar 14, 2025
009f580
Set the ORCIDs
muffato Mar 14, 2025
3ba85db
Added the logo back
muffato Mar 14, 2025
d937fbb
Unused
muffato Mar 14, 2025
d5fd283
Added missing file
muffato Mar 14, 2025
5581e95
[prettier]
muffato Mar 15, 2025
ebe28d9
Tweaked editorconfig-checker for the cff file
muffato Mar 15, 2025
09c55f5
[prettier]
muffato Mar 15, 2025
3da1915
Forgot to update this placeholder
muffato Mar 17, 2025
32702a7
fixed the syntax to ensure the uniqueness of the first column
muffato Mar 17, 2025
2500f11
Merge pull request #146 from sanger-tol/taxdump
tkchafin Mar 17, 2025
e2ff7b0
bugfix: the name of Busco has changed
muffato Mar 17, 2025
2857e64
Release date
muffato Mar 18, 2025
6ae12c7
bugfix: some BUSCO results can be missing, e.g. archaea/bacteria
muffato Mar 18, 2025
754db69
v2 is now officially out
muffato Mar 18, 2025
ae3e10f
Updated the release date
muffato Mar 18, 2025
1ac291b
Merge pull request #156 from sanger-tol/release
muffato Mar 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"python.defaultInterpreterPath": "/opt/conda/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/opt/conda/bin/autopep8",
"python.formatting.yapfPath": "/opt/conda/bin/yapf",
"python.linting.flake8Path": "/opt/conda/bin/flake8",
"python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle",
"python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle",
"python.linting.pylintPath": "/opt/conda/bin/pylint"
"python.defaultInterpreterPath": "/opt/conda/bin/python"
},

// Add the IDs of extensions you want installed when the container is created.
Expand Down
23 changes: 9 additions & 14 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,20 @@ end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset

[/assets/email*]
indent_size = unset

# To prevent errors for these test diamond databases
[/assets/test*/*.dmnd]
[/subworkflows/nf-core/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset

[/assets/email*]
indent_size = unset

# To prevent errors for these test blastn databases
[/assets/test*/nt_*/*.{ndb,nhr,nin,nog,nos,not,nsq,ntf,nto}]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
# ignore python and markdown
[*.{py,md}]
indent_style = unset
indent_size = unset

# ignore ro-crate metadata files
[**/ro-crate-metadata.json]
insert_final_newline = unset
33 changes: 18 additions & 15 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sanger-tol/blobtoolkit: Contributing Guidelines
# `sanger-tol/blobtoolkit`: Contributing Guidelines

Hi there!
Many thanks for taking an interest in improving sanger-tol/blobtoolkit.
Expand All @@ -16,15 +16,18 @@ If you'd like to write some code for sanger-tol/blobtoolkit, the standard workfl
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
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
3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions)
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).
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 can optionally test your changes by running the pipeline locally. Then it is recommended to use the `debug` profile to
receive warnings about process selectors and other debug info. Example: `nextflow run . -profile debug,test,docker --outdir <OUTDIR>`.
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.
Expand All @@ -34,7 +37,7 @@ 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 lint <pipeline-directory>` command.
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.

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

: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/master`.
- 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).
- A PR should be made on `master` from patch to directly this particular bug.
- Open a pull-request from `patch` to `main`/`master` with the changes.

## Pipeline contribution conventions

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

### 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
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 schema build` tool).
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 command in `.github/workflow/ci.yml`.
Expand All @@ -74,15 +77,15 @@ If you wish to contribute a new step, please use the following coding standards:

### Default values

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

Once there, use `nf-core schema build` to add to `nextflow_schema.json`.
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/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.
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.cpu}` and `${task.memory}` variables in the `script:` block.
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

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

### 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 bump-version --nextflow . [min-nf-version]`
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

Expand Down
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ 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](.github/CONTRIBUTING.md)
Learn more about contributing: [CONTRIBUTING.md](https://github.com/sanger-tol/blobtoolkit/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](.github/CONTRIBUTING.md)
- [ ] Make sure your code lints (`nf-core lint`).
- [ ] 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)
- [ ] 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>`).
- [ ] Usage Documentation in `docs/usage.md` is updated.
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: nf-core branch protection
# This workflow is triggered on PRs to main branch on the repository
# It fails when someone tries to make a PR against the nf-core `main` branch instead of `dev`
# This workflow is triggered on PRs to `main`/`master` branch on the repository
# It fails when someone tries to make a PR against the nf-core `main`/`master` branch instead of `dev`
on:
pull_request_target:
branches: [main]
branches:
- main
- master

jobs:
test:
runs-on: ubuntu-latest
steps:
# PRs to the nf-core repo main branch are only ok if coming from the nf-core repo `dev` or any `patch` branches
# 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 == 'sanger-tol/blobtoolkit'
run: |
Expand All @@ -19,10 +21,10 @@ jobs:
# 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@v1
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
with:
message: |
## This PR is against the `main` branch :x:
## This PR is against the `${{github.event.pull_request.base.ref}}` branch :x:

* Do not close this PR
* Click _Edit_ and change the `base` to `dev`
Expand All @@ -32,9 +34,9 @@ jobs:

Hi @${{ github.event.pull_request.user.login }},

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.
The `main` branch on nf-core repositories should always contain code from the latest release.
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.
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.
The ${{github.event.pull_request.base.ref}} branch on nf-core repositories should always contain code from the latest release.
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.

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.
Note that even after this, the test will continue to show as failing until you push a new commit.
Expand Down
64 changes: 48 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,79 @@ on:
pull_request:
release:
types: [published]
workflow_dispatch:

env:
NXF_ANSI_LOG: false
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity

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

jobs:
test:
name: Run pipeline with test data
name: "Run pipeline with test data (${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }})"
# Only run on push if this is the dev branch (merged PRs)
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'sanger-tol/blobtoolkit') }}"
runs-on: ubuntu-latest
strategy:
matrix:
NXF_VER:
- "23.04.0"
- "24.04.2"
- "latest-everything"
# "conda" is not supported
profile:
- "docker"
- "singularity"
test_name:
- "test"
isMaster:
- ${{ github.base_ref == 'main' }}
# Exclude conda and singularity on dev
exclude:
- isMaster: false
profile: "singularity"
steps:
- name: Check out pipeline code
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0

- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
- name: Set up Nextflow
uses: nf-core/setup-nextflow@v2
with:
version: "${{ matrix.NXF_VER }}"

- name: Download the NCBI taxdump database
- name: Set up Apptainer
if: matrix.profile == 'singularity'
uses: eWaterCycle/setup-apptainer@main

- name: Set up Singularity
if: matrix.profile == 'singularity'
run: |
mkdir ncbi_taxdump
curl -L https://ftp.ncbi.nih.gov/pub/taxonomy/new_taxdump/new_taxdump.tar.gz | tar -C ncbi_taxdump -xzf -
mkdir -p $NXF_SINGULARITY_CACHEDIR
mkdir -p $NXF_SINGULARITY_LIBRARYDIR

- name: Download the BUSCO lineage database
- name: Set up Miniconda
if: matrix.profile == 'conda'
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3
with:
miniconda-version: "latest"
auto-update-conda: true
conda-solver: libmamba
channels: conda-forge,bioconda

- name: Set up Conda
if: matrix.profile == 'conda'
run: |
mkdir busco_database
curl -L https://tolit.cog.sanger.ac.uk/test-data/resources/busco/blobtoolkit.GCA_922984935.2.2023-08-03.lineages.tar.gz | tar -C busco_database -xzf -
echo $(realpath $CONDA)/condabin >> $GITHUB_PATH
echo $(realpath python) >> $GITHUB_PATH

- name: Clean up Disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1

- name: Run pipeline with test data
# You can customise CI pipeline run tests as required
# For example: adding multiple test runs with different parameters
# Remember that you can parallelise this by using strategy.matrix
- name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}"
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --taxdump $PWD/ncbi_taxdump --busco $PWD/busco_database --outdir ./results
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} --outdir ./results
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@v7
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9
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