Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nf-core/mag 3.2.0 release PR #699

Merged
merged 126 commits into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
7d3650e
Replace local spades modules with official nf-core version (missing f…
jfy133 Sep 9, 2024
391ebd4
Update CHANGELOG.md
jfy133 Sep 9, 2024
e6301c8
Fix output docs
jfy133 Sep 10, 2024
debd080
Make sure warnings log also gets a prefix
jfy133 Sep 10, 2024
89f98e2
Merge branch 'dev' into bump-metaspades
jfy133 Sep 10, 2024
4d19b8f
Fix a syntax error (Ben made me do it)
jfy133 Sep 12, 2024
08445cf
Added modules porechop/abi and chopper for QC of long reads
Sep 20, 2024
5aa3049
Move long read preprocessing into subworkflow, and swapping porechop …
Sep 20, 2024
451612a
Remove module import from main workflow, and add PORECHOP_ABI in conf…
Sep 20, 2024
5437376
Switch local MEGAHIT to official nf-core one
jfy133 Sep 20, 2024
12b13d3
Fix wrongly set branch
jfy133 Sep 20, 2024
830a66e
Merge branch 'dev' into bump-metaspades
jfy133 Sep 20, 2024
7d7ad71
Fix linting
jfy133 Sep 20, 2024
59ef702
Exchange local filtlong module to nf-core/filtlong
muabnezor Sep 24, 2024
cd5ce2f
Add filtlong and porechop logs to multiqc
muabnezor Sep 24, 2024
5820fb4
Added --longread_preprocessing_tools parameters, to let user specify …
muabnezor Sep 24, 2024
5335fc5
Merge branch 'dev' into move_lr_qc
muabnezor Sep 25, 2024
1496ce9
Update modules/nf-core/filtlong/main.nf
muabnezor Sep 25, 2024
c11601a
make subworkflow name more verbose
muabnezor Sep 30, 2024
31deb5c
make --longread_adaptertrimming_tool as enum porechop or porechop_abi
muabnezor Sep 30, 2024
b2da50b
Make prefix for porechop/porechop-abi more verbose
muabnezor Sep 30, 2024
8955e31
lint
muabnezor Sep 30, 2024
644e2b1
Change default search pattern for filtlong.log files for the filtlong…
muabnezor Oct 1, 2024
3e15502
Update CHANGELOG.md
muabnezor Oct 3, 2024
ec8538c
Update CHANGELOG.md
muabnezor Oct 3, 2024
c6fb9b3
Update nextflow_schema.json
muabnezor Oct 3, 2024
b24f52f
Update conf/modules.config
muabnezor Oct 3, 2024
fcf509c
Update conf/modules.config
muabnezor Oct 3, 2024
8f9cac6
Update conf/modules.config
muabnezor Oct 3, 2024
10ecdc5
Update nextflow_schema.json
muabnezor Oct 3, 2024
ea6f9a4
Update nextflow.config
muabnezor Oct 3, 2024
b43b9f6
Update subworkflows/local/longread_preprocessing.nf
muabnezor Oct 3, 2024
25981a1
Update subworkflows/local/longread_preprocessing.nf
muabnezor Oct 3, 2024
edf8dab
Update subworkflows/local/longread_preprocessing.nf
muabnezor Oct 3, 2024
0a06944
Merge branch 'dev' into move_lr_qc
muabnezor Oct 3, 2024
4c9c5df
Merge branch 'dev' into bump-metaspades
jfy133 Oct 3, 2024
669a854
Linting fix
muabnezor Oct 3, 2024
a1098f3
make porechop-abi default long read adapter trimming tool
muabnezor Oct 3, 2024
9d7ce62
Replace assembler single-use fix-cpu functions with single line defin…
jfy133 Oct 3, 2024
ce449f2
Ensure checkmax is still used
jfy133 Oct 3, 2024
efabee7
Specify also module changes
jfy133 Oct 3, 2024
17ba45c
Fix changelog
muabnezor Oct 4, 2024
f54c967
Fix porechop_abi pattern in modules.config
muabnezor Oct 4, 2024
110b5dd
Merge branch 'dev' into move_lr_qc
muabnezor Oct 4, 2024
3472c87
remove chopper citation for now
muabnezor Oct 4, 2024
d7e51ef
Lets see if SPAdes now works with fusion with the new container...
jfy133 Oct 4, 2024
4acee76
Post-release version bump
jfy133 Oct 4, 2024
ab5f482
retrigger checks
muabnezor Oct 4, 2024
23bf9df
Merge pull request #682 from nf-core/post-3.10-version-bump
jfy133 Oct 4, 2024
2cfd5e5
Merge branch 'dev' into move_lr_qc
muabnezor Oct 4, 2024
1d3eff9
Fix version number in manifest
jfy133 Oct 8, 2024
5548183
Template update for nf-core/tools version 3.0.0
nf-core-bot Oct 8, 2024
22d3247
Template update for nf-core/tools version 3.0.1
nf-core-bot Oct 9, 2024
7b31394
Apply suggestions from code review
jfy133 Oct 11, 2024
78edf25
Apply suggestions from code review
jfy133 Oct 11, 2024
3c3b46a
Add previouysly undocumented output files to docs
jfy133 Oct 11, 2024
7c7e954
[automated] Fix code linting
nf-core-bot Oct 11, 2024
db33efd
Merge pull request #674 from muabnezor/move_lr_qc
jfy133 Oct 11, 2024
d80274f
Template update for nf-core/tools version 3.0.2
nf-core-bot Oct 11, 2024
b4b81a1
output multiple depth files
d4straub Oct 11, 2024
a6a0732
accept multiple depth files
d4straub Oct 11, 2024
0184057
update CHANGELOG
d4straub Oct 11, 2024
a2ffbf0
nf-core modules patch
d4straub Oct 11, 2024
a17b1a4
nf-core modules patch now for modules.json
d4straub Oct 11, 2024
b0248ef
pull from upstream and merge conflicts
d4straub Oct 11, 2024
a29b48b
publish summary and abundance files in results
d4straub Oct 14, 2024
cde08a8
use sample names for MaxBin2 abund
d4straub Oct 14, 2024
e6875de
force install latest MaxBin2 module
d4straub Oct 14, 2024
f2859c7
Update CHANGELOG.md
jfy133 Oct 16, 2024
15bacf0
Merge branch 'dev' of github.com:nf-core/mag into nf-core-template-me…
jfy133 Oct 16, 2024
63fe6a2
Remove unused parameters
jfy133 Oct 16, 2024
2af46d8
Comment out unusued tempalte parmaeter (renaming), and remove a dupli…
jfy133 Oct 16, 2024
6102d0e
Fix yaml indentation
jfy133 Oct 16, 2024
d7d3af2
Remove nonexistant section
jfy133 Oct 16, 2024
ca211b3
Remove unused aprameter
jfy133 Oct 16, 2024
43b00a6
Remove reference to max_* params and fix input schema
jfy133 Oct 17, 2024
410c869
Remoce references to `check_max()`
jfy133 Oct 17, 2024
2bbed0a
REplace custom check_<assembly>_cpus functions
jfy133 Oct 17, 2024
17d87ff
Merge pull request #690 from d4straub/fix-maxbin2-multiabund
jfy133 Oct 18, 2024
2c40897
update prodigal to helpfully not compress symlinks by having more spe…
jfy133 Oct 21, 2024
4f94dae
Update CHANGELOG
jfy133 Oct 21, 2024
32036a8
Merge branch 'dev' into fix-prodigal-pigz
jfy133 Oct 21, 2024
91fad57
[automated] Fix code linting
nf-core-bot Oct 21, 2024
7d66153
Merge pull request #698 from nf-core/fix-prodigal-pigz
jfy133 Oct 21, 2024
1f5b16c
Update schema, fix empty list in tag names, fix missing parameter def…
jfy133 Oct 21, 2024
bea3aa6
Fix gtdbtk default value incompatibility
jfy133 Oct 21, 2024
275579e
Fix check for group column in input
jfy133 Oct 21, 2024
5f2461b
Remove misleading error messages and allow more string types in run c…
jfy133 Oct 21, 2024
ae18c3c
Use correct input for assembly input and improve schema
jfy133 Oct 21, 2024
64009b4
Use more workable Zenodo link for CheckM database
jfy133 Oct 21, 2024
3f15a3e
Sync nextflow schema with nextflow.config
jfy133 Oct 21, 2024
3104f92
Update to Zenodo URL also in test config
jfy133 Oct 21, 2024
45d3d4b
Change pplacer paramter to integer and fix useram default to boolean …
jfy133 Oct 22, 2024
0ab0f58
Fix citations indentitation
jfy133 Oct 22, 2024
9a2e958
Fix GTDBTk Url in schema
jfy133 Oct 22, 2024
5c00892
Merge branch 'dev' into bump-metaspades
jfy133 Oct 22, 2024
a77b7c2
Update CHANGELOG
jfy133 Oct 22, 2024
31aceb5
Merge pull request #695 from nf-core/nf-core-template-merge-3.0.2-manual
jfy133 Oct 22, 2024
01065ae
Merge branch 'dev' into bump-metaspades
jfy133 Oct 22, 2024
717d433
Make sure meta mode is executed with the new module
jfy133 Oct 22, 2024
ebd18a1
Fix linting
jfy133 Oct 22, 2024
48cad97
Remove a TODO
jfy133 Oct 22, 2024
860926a
Add MEGAHIT prefix to ensure MEGAHIT at the beginning of the input fi…
jfy133 Oct 22, 2024
639addb
Re-add memory explicit parameter to MEGAHIT module (inbuilt into SPAd…
jfy133 Oct 22, 2024
ec318c7
Re-add MEGAHIT memory
jfy133 Oct 22, 2024
338a552
Use HTTPS URL for megahit container
jfy133 Oct 22, 2024
42d444f
Merge pull request #666 from nf-core/bump-metaspades
jfy133 Oct 22, 2024
ed711aa
Bump version
jfy133 Oct 22, 2024
daea789
Update workflow diagram
jfy133 Oct 22, 2024
6aa49c1
Merge pull request #700 from nf-core/bump-version
jfy133 Oct 22, 2024
dbc2ae9
Fix conda environment specification to match container of sub-depende…
jfy133 Oct 24, 2024
f1cbfc8
Add darkmode diagram
jfy133 Oct 24, 2024
d61def4
Typo fix for the light mode
jfy133 Oct 24, 2024
7a37fce
Soften white
jfy133 Oct 24, 2024
e1705e0
Merge pull request #703 from nf-core/darkmode-diagram
jfy133 Oct 24, 2024
c7f3071
Fix full test manual trigger following https://github.com/nf-core/met…
jfy133 Oct 24, 2024
babacaa
Merge pull request #704 from nf-core/jfy133-patch-1
jfy133 Oct 24, 2024
38d3f3c
Always run in --meta mode
jfy133 Oct 25, 2024
e974653
Update conf/modules.config
jfy133 Oct 25, 2024
723e621
Update conf/modules.config
jfy133 Oct 25, 2024
76e056a
Merge pull request #705 from nf-core/always-meta-parameter-metaspades
jfy133 Oct 25, 2024
78d9503
Harshil alignment
jfy133 Oct 25, 2024
1b08ecc
Update conf/test_full.config
jfy133 Oct 26, 2024
feeb14a
Update workflows/mag.nf
jfy133 Oct 26, 2024
2963ba0
Update .nf-core.yml
jfy133 Oct 26, 2024
4ec184d
Update CHANGELOG.md
jfy133 Oct 27, 2024
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
12 changes: 6 additions & 6 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If you'd like to write some code for nf-core/mag, the standard workflow is as fo
1. Check that there isn't already an issue about your idea in the [nf-core/mag issues](https://github.com/nf-core/mag/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/mag repository](https://github.com/nf-core/mag) 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/).
Expand All @@ -40,7 +40,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 Down Expand Up @@ -75,7 +75,7 @@ If you wish to contribute a new step, please use the following coding standards:
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 @@ -86,11 +86,11 @@ If you wish to contribute a new step, please use the following coding standards:

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

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.cpus}` and `${task.memory}` variables in the `script:` block.

Expand All @@ -103,7 +103,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
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/mag/
- [ ] 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/mag/tree/master/.github/CONTRIBUTING.md)
- [ ] If necessary, also make a PR on the nf-core/mag _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
- [ ] Make sure your code lints (`nf-core lint`).
- [ ] 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
26 changes: 22 additions & 4 deletions .github/workflows/awsfulltest.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
name: nf-core AWS full size tests
# This workflow is triggered on published releases.
# This workflow is triggered on PRs opened against the master branch.
# It can be additionally triggered manually with GitHub actions workflow dispatch button.
# It runs the -profile 'test_full' on AWS batch

on:
release:
types: [published]
pull_request:
branches:
- master
workflow_dispatch:
pull_request_review:
types: [submitted]

jobs:
run-platform:
name: Run AWS full tests
if: github.repository == 'nf-core/mag'
# run only if the PR is approved by at least 2 reviewers and against the master branch or manually triggered
if: github.repository == 'nf-core/mag' && github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'master' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: octokit/[email protected]
if: github.event_name != 'workflow_dispatch'
id: check_approvals
with:
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews?per_page=100
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: test_variables
if: github.event_name != 'workflow_dispatch'
run: |
JSON_RESPONSE='${{ steps.check_approvals.outputs.data }}'
CURRENT_APPROVALS_COUNT=$(echo $JSON_RESPONSE | jq -c '[.[] | select(.state | contains("APPROVED")) ] | length')
test $CURRENT_APPROVALS_COUNT -ge 2 || exit 1 # At least 2 approvals are required
- name: Launch workflow via Seqera Platform
uses: seqeralabs/action-tower-launch@v2
with:
Expand Down
70 changes: 59 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,42 @@ 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 nf-core dev branch (merged PRs)
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/mag') }}"
runs-on: ubuntu-latest
strategy:
matrix:
NXF_VER:
- "23.04.0"
- "24.04.2"
- "latest-everything"
profile:
- "conda"
- "docker"
- "singularity"
test_name:
- "test"
isMaster:
- ${{ github.base_ref == 'master' }}
# Exclude conda and singularity on dev
exclude:
- isMaster: false
profile: "conda"
- isMaster: false
profile: "singularity"
steps:
- name: Free some space
run: |
Expand All @@ -35,17 +52,42 @@ jobs:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

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

- name: Disk space cleanup
- name: Set up Apptainer
if: matrix.profile == 'singularity'
uses: eWaterCycle/setup-apptainer@main

- name: Set up Singularity
if: matrix.profile == 'singularity'
run: |
mkdir -p $NXF_SINGULARITY_CACHEDIR
mkdir -p $NXF_SINGULARITY_LIBRARYDIR

- 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: |
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
- name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}"
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} --outdir ./results

profiles:
name: Run workflow profile
Expand All @@ -55,7 +97,7 @@ jobs:
strategy:
matrix:
# Run remaining test profiles with minimum nextflow version
profile:
test_name:
[
test_host_rm,
test_hybrid,
Expand All @@ -82,9 +124,12 @@ jobs:
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/

- name: Run pipeline with ${{ matrix.profile }} test profile
- name: Clean up Disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1

- name: Run pipeline with ${{ matrix.test_name }} test profile
run: |
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.profile }},docker --outdir ./results
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},docker --outdir ./results

checkm:
name: Run single test to checkm due to database download
Expand All @@ -99,17 +144,20 @@ jobs:
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- name: Check out pipeline code
uses: actions/checkout@v2
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

- name: Install Nextflow
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/

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

- name: Download and prepare CheckM database
run: |
mkdir -p databases/checkm
wget https://data.ace.uq.edu.au/public/CheckM_databases/checkm_data_2015_01_16.tar.gz -P databases/checkm
wget https://zenodo.org/records/7401545/files/checkm_data_2015_01_16.tar.gz -P databases/checkm
tar xzvf databases/checkm/checkm_data_2015_01_16.tar.gz -C databases/checkm/

- name: Run pipeline with ${{ matrix.profile }} test profile
Expand Down
53 changes: 43 additions & 10 deletions .github/workflows/download_pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test successful pipeline download with 'nf-core download'
name: Test successful pipeline download with 'nf-core pipelines download'

# Run the workflow when:
# - dispatched manually
Expand All @@ -8,7 +8,7 @@ on:
workflow_dispatch:
inputs:
testbranch:
description: "The specific branch you wish to utilize for the test execution of nf-core download."
description: "The specific branch you wish to utilize for the test execution of nf-core pipelines download."
required: true
default: "dev"
pull_request:
Expand Down Expand Up @@ -39,9 +39,11 @@ jobs:
with:
python-version: "3.12"
architecture: "x64"
- uses: eWaterCycle/setup-singularity@931d4e31109e875b13309ae1d07c70ca8fbc8537 # v7

- name: Setup Apptainer
uses: eWaterCycle/setup-apptainer@4bb22c52d4f63406c49e94c804632975787312b3 # v2.0.0
with:
singularity-version: 3.8.3
apptainer-version: 1.3.4

- name: Install dependencies
run: |
Expand All @@ -54,33 +56,64 @@ jobs:
echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV}
echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> ${GITHUB_ENV}

- name: Make a cache directory for the container images
run: |
mkdir -p ./singularity_container_images

- name: Download the pipeline
env:
NXF_SINGULARITY_CACHEDIR: ./
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images
run: |
nf-core download ${{ env.REPO_LOWERCASE }} \
nf-core pipelines download ${{ env.REPO_LOWERCASE }} \
--revision ${{ env.REPO_BRANCH }} \
--outdir ./${{ env.REPOTITLE_LOWERCASE }} \
--compress "none" \
--container-system 'singularity' \
--container-library "quay.io" -l "docker.io" -l "ghcr.io" \
--container-library "quay.io" -l "docker.io" -l "community.wave.seqera.io" \
--container-cache-utilisation 'amend' \
--download-configuration
--download-configuration 'yes'

- name: Inspect download
run: tree ./${{ env.REPOTITLE_LOWERCASE }}

- name: Count the downloaded number of container images
id: count_initial
run: |
image_count=$(ls -1 ./singularity_container_images | wc -l | xargs)
echo "Initial container image count: $image_count"
echo "IMAGE_COUNT_INITIAL=$image_count" >> ${GITHUB_ENV}

- name: Run the downloaded pipeline (stub)
id: stub_run_pipeline
continue-on-error: true
env:
NXF_SINGULARITY_CACHEDIR: ./
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images
NXF_SINGULARITY_HOME_MOUNT: true
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results
- name: Run the downloaded pipeline (stub run not supported)
id: run_pipeline
if: ${{ job.steps.stub_run_pipeline.status == failure() }}
env:
NXF_SINGULARITY_CACHEDIR: ./
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images
NXF_SINGULARITY_HOME_MOUNT: true
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -profile test,singularity --outdir ./results

- name: Count the downloaded number of container images
id: count_afterwards
run: |
image_count=$(ls -1 ./singularity_container_images | wc -l | xargs)
echo "Post-pipeline run container image count: $image_count"
echo "IMAGE_COUNT_AFTER=$image_count" >> ${GITHUB_ENV}

- name: Compare container image counts
run: |
if [ "${{ env.IMAGE_COUNT_INITIAL }}" -ne "${{ env.IMAGE_COUNT_AFTER }}" ]; then
initial_count=${{ env.IMAGE_COUNT_INITIAL }}
final_count=${{ env.IMAGE_COUNT_AFTER }}
difference=$((final_count - initial_count))
echo "$difference additional container images were \n downloaded at runtime . The pipeline has no support for offline runs!"
tree ./singularity_container_images
exit 1
else
echo "The pipeline can be downloaded successfully!"
fi
23 changes: 19 additions & 4 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nf-core linting
# This workflow is triggered on pushes and PRs to the repository.
# It runs the `nf-core lint` and markdown lint tests to ensure
# It runs the `nf-core pipelines lint` and markdown lint tests to ensure
# that the code meets the nf-core guidelines.
on:
push:
Expand Down Expand Up @@ -41,17 +41,32 @@ jobs:
python-version: "3.12"
architecture: "x64"

- name: read .nf-core.yml
uses: pietrobolcato/[email protected]
id: read_yml
with:
config: ${{ github.workspace }}/.nf-core.yml

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install nf-core
pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }}

- name: Run nf-core pipelines lint
if: ${{ github.base_ref != 'master' }}
env:
GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }}
run: nf-core -l lint_log.txt pipelines lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md

- name: Run nf-core lint
- name: Run nf-core pipelines lint --release
if: ${{ github.base_ref == 'master' }}
env:
GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }}
run: nf-core -l lint_log.txt lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md
run: nf-core -l lint_log.txt pipelines lint --release --dir ${GITHUB_WORKSPACE} --markdown lint_results.md

- name: Save PR number
if: ${{ always() }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download lint results
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3
uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6
with:
workflow: linting.yml
workflow_conclusion: completed
Expand Down
Loading
Loading