From 42dd140636ac13d1a7627e65ce7510d74b202bca Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Mon, 20 Jan 2025 14:36:11 +0000 Subject: [PATCH 1/9] Template update for nf-core/tools version 3.1.2 --- .github/PULL_REQUEST_TEMPLATE.md | 4 +-- .github/workflows/ci.yml | 2 ++ .github/workflows/download_pipeline.yml | 28 +++++++++-------- .nf-core.yml | 12 ++++---- CHANGELOG.md | 2 +- CITATIONS.md | 4 ++- README.md | 10 ++++-- assets/multiqc_config.yml | 4 +-- assets/schema_input.json | 2 +- nextflow.config | 8 ++--- nextflow_schema.json | 2 +- ro-crate-metadata.json | 41 +++++++++---------------- 12 files changed, 59 insertions(+), 60 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1ffcdcafe..e44a93d11 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,14 +8,14 @@ These are the most common things requested on pull requests (PRs). Remember that PRs should be made against the dev branch, unless you're preparing a pipeline release. -Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/mag/tree/main/.github/CONTRIBUTING.md) +Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/mag/tree/master/.github/CONTRIBUTING.md) --> ## PR checklist - [ ] This comment contains a description of changes (with reason). - [ ] If you've fixed a bug or added code that should be tested, add tests! -- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/mag/tree/main/.github/CONTRIBUTING.md) +- [ ] 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 pipelines lint`). - [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir `). diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e388119ee..e2213e031 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,8 @@ jobs: steps: - name: Check out pipeline code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + with: + fetch-depth: 0 - name: Set up Nextflow uses: nf-core/setup-nextflow@v2 diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml index 13b51e2c3..ab06316ea 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -34,6 +34,17 @@ jobs: REPO_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPO_LOWERCASE }} REPOTITLE_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPOTITLE_LOWERCASE }} REPO_BRANCH: ${{ steps.get_repo_properties.outputs.REPO_BRANCH }} + steps: + - name: Get the repository name and current branch + id: get_repo_properties + run: | + echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" + echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT" + echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT" + + download: + runs-on: ubuntu-latest + needs: configure steps: - name: Install Nextflow uses: nf-core/setup-nextflow@v2 @@ -56,21 +67,10 @@ jobs: python -m pip install --upgrade pip pip install git+https://github.com/nf-core/tools.git@dev - - name: Get the repository name and current branch set as environment variable - id: get_repo_properties - run: | - echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" - echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT" - echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT" - - name: Make a cache directory for the container images run: | mkdir -p ./singularity_container_images - download: - runs-on: ubuntu-latest - needs: configure - steps: - name: Download the pipeline env: NXF_SINGULARITY_CACHEDIR: ./singularity_container_images @@ -87,6 +87,9 @@ jobs: - name: Inspect download run: tree ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }} + - name: Inspect container images + run: tree ./singularity_container_images | tee ./container_initial + - name: Count the downloaded number of container images id: count_initial run: | @@ -123,7 +126,8 @@ jobs: final_count=${{ steps.count_afterwards.outputs.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 + tree ./singularity_container_images > ./container_afterwards + diff ./container_initial ./container_afterwards exit 1 else echo "The pipeline can be downloaded successfully!" diff --git a/.nf-core.yml b/.nf-core.yml index ebf94c117..5ae8e4aa1 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1,11 +1,11 @@ lint: files_unchanged: - - lib/NfcoreTemplate.groovy + - lib/NfcoreTemplate.groovy nextflow_config: - - config_defaults: - - params.phix_reference - - params.lambda_reference -nf_core_version: 3.1.1 + - config_defaults: + - params.phix_reference + - params.lambda_reference +nf_core_version: 3.1.2 repository_type: pipeline template: author: "Hadrien Gourl\xE9, Daniel Straub, Sabrina Krakau, James A. Fellows Yates,\ @@ -16,4 +16,4 @@ template: name: mag org: nf-core outdir: . - version: 3.3.0 + version: 3.3.1dev diff --git a/CHANGELOG.md b/CHANGELOG.md index 42737ad98..71be1fcf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## v3.3.0 - [date] +## v3.3.1dev - [date] Initial release of nf-core/mag, created with the [nf-core](https://nf-co.re/) template. diff --git a/CITATIONS.md b/CITATIONS.md index 06da51476..0b6c25b1d 100644 --- a/CITATIONS.md +++ b/CITATIONS.md @@ -12,7 +12,9 @@ - [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/) -> Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online].- [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/) +> Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online]. + +- [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/) > Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924. diff --git a/README.md b/README.md index 8f0506ce6..9a23fd99b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,9 @@ nf-core/mag -[![GitHub Actions CI Status](https://github.com/nf-core/mag/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-core/mag/actions/workflows/ci.yml) + + +[![GitHub Actions CI Status](https://github.com/nf-core/mag/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-core/mag/actions/workflows/ci.yml) [![GitHub Actions Linting Status](https://github.com/nf-core/mag/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/mag/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/mag/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX) [![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com) @@ -32,7 +34,7 @@ ## Usage > [!NOTE] -> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow.Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data. +> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data. - + + + An extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file. diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 79420f896..a4c656e26 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,7 +1,7 @@ report_comment: > - This report has been generated by the nf-core/mag + This report has been generated by the nf-core/mag analysis pipeline. For information about how to interpret these results, please see the - documentation. + documentation. report_section_order: "nf-core-mag-methods-description": order: -1000 diff --git a/assets/schema_input.json b/assets/schema_input.json index 9beebbc60..9485ea886 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/nf-core/mag/main/assets/schema_input.json", + "$id": "https://raw.githubusercontent.com/nf-core/mag/master/assets/schema_input.json", "title": "nf-core/mag pipeline - params.input schema", "description": "Schema for the file provided with params.input", "type": "array", diff --git a/nextflow.config b/nextflow.config index a61c5b4d9..ee8d72899 100644 --- a/nextflow.config +++ b/nextflow.config @@ -273,15 +273,15 @@ manifest { homePage = 'https://github.com/nf-core/mag' description = """Assembly, binning and annotation of metagenomes""" mainScript = 'main.nf' - defaultBranch = 'main' + defaultBranch = 'master' nextflowVersion = '!>=24.04.2' - version = '3.3.0' + version = '3.3.1dev' doi = '' } // Nextflow plugins plugins { - id 'nf-schema@2.1.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet + id 'nf-schema@2.3.0' // Validation of pipeline parameters and creation of an input channel from a sample sheet } validation { @@ -307,7 +307,7 @@ validation { https://doi.org/10.1038/s41587-020-0439-x * Software dependencies - https://github.com/nf-core/mag/blob/main/CITATIONS.md + https://github.com/nf-core/mag/blob/master/CITATIONS.md """ } summary { diff --git a/nextflow_schema.json b/nextflow_schema.json index 9fd246c98..5f0222293 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/nf-core/mag/main/nextflow_schema.json", + "$id": "https://raw.githubusercontent.com/nf-core/mag/master/nextflow_schema.json", "title": "nf-core/mag pipeline parameters", "description": "Assembly, binning and annotation of metagenomes", "type": "object", diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json index e28de57a4..241911b92 100644 --- a/ro-crate-metadata.json +++ b/ro-crate-metadata.json @@ -21,9 +21,9 @@ { "@id": "./", "@type": "Dataset", - "creativeWorkStatus": "Stable", - "datePublished": "2024-12-20T15:59:00+00:00", - "description": "

\n \n \n \"nf-core/mag\"\n \n

[![GitHub Actions CI Status](https://github.com/nf-core/mag/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-core/mag/actions/workflows/ci.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-core/mag/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/mag/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/mag/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A524.04.2-23aa62.svg)](https://www.nextflow.io/)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-core/mag)\n\n[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23mag-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/mag)[![Follow on Twitter](http://img.shields.io/badge/twitter-%40nf__core-1DA1F2?labelColor=000000&logo=twitter)](https://twitter.com/nf_core)[![Follow on Mastodon](https://img.shields.io/badge/mastodon-nf__core-6364ff?labelColor=FFFFFF&logo=mastodon)](https://mstdn.science/@nf_core)[![Watch on YouTube](http://img.shields.io/badge/youtube-nf--core-FF0000?labelColor=000000&logo=youtube)](https://www.youtube.com/c/nf-core)\n\n## Introduction\n\n**nf-core/mag** is a bioinformatics pipeline that ...\n\n\n\n\n1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/))2. Present QC for raw reads ([`MultiQC`](http://multiqc.info/))\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow.Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\n\n\nNow, you can run the pipeline using:\n\n\n\n```bash\nnextflow run nf-core/mag \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).\n\nFor more details and further functionality, please refer to the [usage documentation](https://nf-co.re/mag/usage) and the [parameter documentation](https://nf-co.re/mag/parameters).\n\n## Pipeline output\n\nTo see the results of an example test run with a full size dataset refer to the [results](https://nf-co.re/mag/results) tab on the nf-core website pipeline page.\nFor more details about the output files and reports, please refer to the\n[output documentation](https://nf-co.re/mag/output).\n\n## Credits\n\nnf-core/mag was originally written by Hadrien Gourl\u00e9, Daniel Straub, Sabrina Krakau, James A. Fellows Yates, Maxime Borry.\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\nFor further information or help, don't hesitate to get in touch on the [Slack `#mag` channel](https://nfcore.slack.com/channels/mag) (you can join with [this invite](https://nf-co.re/join/slack)).\n\n## Citations\n\n\n\n\nAn extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nYou can cite the `nf-core` publication as follows:\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", + "creativeWorkStatus": "InProgress", + "datePublished": "2025-01-20T14:35:56+00:00", + "description": "

\n \n \n \"nf-core/mag\"\n \n

\n\n[![GitHub Actions CI Status](https://github.com/nf-core/mag/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-core/mag/actions/workflows/ci.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-core/mag/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/mag/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/mag/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A524.04.2-23aa62.svg)](https://www.nextflow.io/)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-core/mag)\n\n[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23mag-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/mag)[![Follow on Twitter](http://img.shields.io/badge/twitter-%40nf__core-1DA1F2?labelColor=000000&logo=twitter)](https://twitter.com/nf_core)[![Follow on Mastodon](https://img.shields.io/badge/mastodon-nf__core-6364ff?labelColor=FFFFFF&logo=mastodon)](https://mstdn.science/@nf_core)[![Watch on YouTube](http://img.shields.io/badge/youtube-nf--core-FF0000?labelColor=000000&logo=youtube)](https://www.youtube.com/c/nf-core)\n\n## Introduction\n\n**nf-core/mag** is a bioinformatics pipeline that ...\n\n\n\n\n1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/))2. Present QC for raw reads ([`MultiQC`](http://multiqc.info/))\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\n\n\nNow, you can run the pipeline using:\n\n\n\n```bash\nnextflow run nf-core/mag \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).\n\nFor more details and further functionality, please refer to the [usage documentation](https://nf-co.re/mag/usage) and the [parameter documentation](https://nf-co.re/mag/parameters).\n\n## Pipeline output\n\nTo see the results of an example test run with a full size dataset refer to the [results](https://nf-co.re/mag/results) tab on the nf-core website pipeline page.\nFor more details about the output files and reports, please refer to the\n[output documentation](https://nf-co.re/mag/output).\n\n## Credits\n\nnf-core/mag was originally written by Hadrien Gourl\u00e9, Daniel Straub, Sabrina Krakau, James A. Fellows Yates, Maxime Borry.\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\nFor further information or help, don't hesitate to get in touch on the [Slack `#mag` channel](https://nfcore.slack.com/channels/mag) (you can join with [this invite](https://nf-co.re/join/slack)).\n\n## Citations\n\n\n\n\n\n\nAn extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nYou can cite the `nf-core` publication as follows:\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", "hasPart": [ { "@id": "main.nf" @@ -99,7 +99,7 @@ }, "mentions": [ { - "@id": "#21020cd0-8c47-4a1a-84a3-6e758cb60d64" + "@id": "#7529fbd9-35e2-468b-8f87-4e11f77f53b2" } ], "name": "nf-core/mag" @@ -121,18 +121,14 @@ }, { "@id": "main.nf", - "@type": [ - "File", - "SoftwareSourceCode", - "ComputationalWorkflow" - ], + "@type": ["File", "SoftwareSourceCode", "ComputationalWorkflow"], "creator": [ { "@id": "https://orcid.org/0000-0001-9807-1082" } ], "dateCreated": "", - "dateModified": "2024-12-20T16:59:00Z", + "dateModified": "2025-01-20T14:35:56Z", "dct:conformsTo": "https://bioschemas.org/profiles/ComputationalWorkflow/1.0-RELEASE/", "keywords": [ "nf-core", @@ -146,30 +142,21 @@ "nanopore", "nanopore-sequencing" ], - "license": [ - "MIT" - ], + "license": ["MIT"], "maintainer": [ { "@id": "https://orcid.org/0000-0001-9807-1082" } ], - "name": [ - "nf-core/mag" - ], + "name": ["nf-core/mag"], "programmingLanguage": { "@id": "https://w3id.org/workflowhub/workflow-ro-crate#nextflow" }, "sdPublisher": { "@id": "https://nf-co.re/" }, - "url": [ - "https://github.com/nf-core/mag", - "https://nf-co.re/mag/3.3.0/" - ], - "version": [ - "3.3.0" - ] + "url": ["https://github.com/nf-core/mag", "https://nf-co.re/mag/dev/"], + "version": ["3.3.1dev"] }, { "@id": "https://w3id.org/workflowhub/workflow-ro-crate#nextflow", @@ -184,11 +171,11 @@ "version": "!>=24.04.2" }, { - "@id": "#21020cd0-8c47-4a1a-84a3-6e758cb60d64", + "@id": "#7529fbd9-35e2-468b-8f87-4e11f77f53b2", "@type": "TestSuite", "instance": [ { - "@id": "#acf0ce89-1a77-4ced-8205-a251112f5a94" + "@id": "#befa69d0-369e-4215-9af0-e21f944de36e" } ], "mainEntity": { @@ -197,7 +184,7 @@ "name": "Test suite for nf-core/mag" }, { - "@id": "#acf0ce89-1a77-4ced-8205-a251112f5a94", + "@id": "#befa69d0-369e-4215-9af0-e21f944de36e", "@type": "TestInstance", "name": "GitHub Actions workflow for testing nf-core/mag", "resource": "repos/nf-core/mag/actions/workflows/ci.yml", @@ -332,4 +319,4 @@ "name": "Hadrien Gourl\u00e9" } ] -} \ No newline at end of file +} From 64a13ef96ba904cec5cf6a832e16ee9ea7ea30b2 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Tue, 21 Jan 2025 11:47:24 +0100 Subject: [PATCH 2/9] Use channel empty when no phix reference supplied because skipping --- CHANGELOG.md | 2 ++ workflows/mag.nf | 45 ++++++++++++++++++++++++--------------------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 004375b58..1679a5849 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Fixed` +- [#748](https://github.com/nf-core/mag/pull/748) - Fix broken phix reference channel when skipping phix removal (reported by @amizeranschi, fix by @muabnezor) + ### `Dependencies` ### `Dependencies` diff --git a/workflows/mag.nf b/workflows/mag.nf index de353a40f..3ad2800b2 100644 --- a/workflows/mag.nf +++ b/workflows/mag.nf @@ -63,7 +63,7 @@ include { COMBINE_TSV as COMBINE_SUMMARY_TSV } from '../modul workflow MAG { take: - ch_raw_short_reads // channel: samplesheet read in from --input + ch_raw_short_reads // channel: samplesheet read in from --input ch_raw_long_reads ch_input_assemblies @@ -113,10 +113,14 @@ workflow MAG { if (!params.keep_phix) { ch_phix_db_file = Channel.value(file("${params.phix_reference}")) } + else { + ch_phix_db_file = Channel.empty() + } if (!params.keep_lambda) { - ch_lambda_db = Channel.value(file( "${params.lambda_reference}" )) - } else { + ch_lambda_db = Channel.value(file("${params.lambda_reference}")) + } + else { ch_lambda_db = Channel.empty() } @@ -162,14 +166,13 @@ workflow MAG { ch_raw_short_reads, ch_host_fasta, ch_phix_db_file, - ch_metaeuk_db + ch_metaeuk_db, ) ch_versions = ch_versions.mix(SHORTREAD_PREPROCESSING.out.versions) ch_multiqc_files = ch_multiqc_files.mix(SHORTREAD_PREPROCESSING.out.multiqc_files.collect { it[1] }.ifEmpty([])) ch_short_reads = SHORTREAD_PREPROCESSING.out.short_reads ch_short_reads_assembly = SHORTREAD_PREPROCESSING.out.short_reads_assembly - } else { ch_short_reads = ch_raw_short_reads.map { meta, reads -> @@ -187,7 +190,7 @@ workflow MAG { LONGREAD_PREPROCESSING( ch_raw_long_reads, ch_short_reads, - ch_lambda_db + ch_lambda_db, ) ch_versions = ch_versions.mix(LONGREAD_PREPROCESSING.out.versions) @@ -218,7 +221,7 @@ workflow MAG { ch_short_reads, ch_db_for_centrifuge, false, - false + false, ) ch_versions = ch_versions.mix(CENTRIFUGE_CENTRIFUGE.out.versions.first()) @@ -255,7 +258,7 @@ workflow MAG { KRAKEN2( ch_short_reads, - ch_db_for_kraken2 + ch_db_for_kraken2, ) ch_versions = ch_versions.mix(KRAKEN2.out.versions.first()) @@ -287,7 +290,7 @@ workflow MAG { KRONA_KTIMPORTTAXONOMY( ch_tax_classifications, - ch_krona_db + ch_krona_db, ) ch_versions = ch_versions.mix(KRONA_KTIMPORTTAXONOMY.out.versions.first()) } @@ -450,7 +453,7 @@ workflow MAG { if (!params.skip_prodigal) { PRODIGAL( ch_assemblies, - 'gff' + 'gff', ) ch_versions = ch_versions.mix(PRODIGAL.out.versions.first()) } @@ -477,7 +480,7 @@ workflow MAG { if (!params.skip_binning || params.ancient_dna) { BINNING_PREPARATION( ch_assemblies, - ch_short_reads + ch_short_reads, ) ch_versions = ch_versions.mix(BINNING_PREPARATION.out.bowtie2_version.first()) } @@ -505,13 +508,13 @@ workflow MAG { if (params.ancient_dna && !params.skip_ancient_damagecorrection) { BINNING( BINNING_PREPARATION.out.grouped_mappings.join(ANCIENT_DNA_ASSEMBLY_VALIDATION.out.contigs_recalled).map { it -> [it[0], it[4], it[2], it[3]] }, - ch_short_reads + ch_short_reads, ) } else { BINNING( BINNING_PREPARATION.out.grouped_mappings, - ch_short_reads + ch_short_reads, ) } ch_versions = ch_versions.mix(BINNING.out.versions) @@ -654,7 +657,7 @@ workflow MAG { } CAT( ch_input_for_postbinning, - ch_cat_db + ch_cat_db, ) // Group all classification results for each sample in a single file ch_cat_summary = CAT.out.tax_classification_names.collectFile(keepHeader: true) { meta, classification -> @@ -692,7 +695,7 @@ workflow MAG { ch_gtdb_bins, ch_bin_qc_summary, gtdb, - gtdb_mash + gtdb_mash, ) ch_versions = ch_versions.mix(GTDBTK.out.versions.first()) ch_gtdbtk_summary = GTDBTK.out.summary @@ -709,7 +712,7 @@ workflow MAG { ch_quast_bins_summary.ifEmpty([]), ch_gtdbtk_summary.ifEmpty([]), ch_cat_global_summary.ifEmpty([]), - params.binqc_tool + params.binqc_tool, ) } @@ -731,7 +734,7 @@ workflow MAG { PROKKA( ch_bins_for_prokka, [], - [] + [], ) ch_versions = ch_versions.mix(PROKKA.out.versions.first()) } @@ -758,9 +761,9 @@ workflow MAG { softwareVersionsToYAML(ch_versions) .collectFile( storeDir: "${params.outdir}/pipeline_info", - name: 'nf_core_' + 'mag_software_' + 'mqc_' + 'versions.yml', + name: 'nf_core_' + 'mag_software_' + 'mqc_' + 'versions.yml', sort: true, - newLine: true + newLine: true, ) .set { ch_collated_versions } @@ -798,7 +801,7 @@ workflow MAG { ch_multiqc_files = ch_multiqc_files.mix( ch_methods_description.collectFile( name: 'methods_description_mqc.yaml', - sort: true + sort: true, ) ) @@ -832,7 +835,7 @@ workflow MAG { ch_multiqc_custom_config.toList(), ch_multiqc_logo.toList(), [], - [] + [], ) emit: From b381631a2b336c1cc4dd34dcd5043615af8a5595 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Tue, 21 Jan 2025 12:08:06 +0100 Subject: [PATCH 3/9] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a37df108..415e9e21c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,11 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Changed` +- [#731](https://github.com/nf-core/mag/pull/747) - Updated to nf-core 3.1.2 `TEMPLATE` (by @jfy133) + ### `Fixed` ### `Dependencies` -### `Dependencies` +### `Deprecated` ## 3.3.0 [2024-12-19] From 369baea74ab3c7b12dbc7240a91563fe0b11b653 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 22 Jan 2025 10:58:21 +0100 Subject: [PATCH 4/9] Fix QUAST MultiQC config --- assets/multiqc_config.yml | 8 +- conf/modules.config | 156 +++++++++++++++++++------------------- workflows/mag.nf | 48 ++++++------ 3 files changed, 106 insertions(+), 106 deletions(-) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 5b76f0183..5edd08816 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -18,7 +18,7 @@ data_format: "yaml" run_modules: - fastqc - fastp - - adapterRemoval + - adapterremoval - custom_content - bowtie2 - busco @@ -35,7 +35,7 @@ top_modules: path_filters_exclude: - "*trimmed*" - "fastp" - - "adapterRemoval" + - "adapterremoval" - "porechop" - "filtlong" - "fastqc": @@ -118,12 +118,12 @@ custom_data: sp: host_removal: fn: "host_removal_metrics.tsv" - adapterRemoval: + adapterremoval: fn: "*_ar2.settings" kraken: fn_re: ".*[kraken2|centrifuge].*report.txt" quast: - fn_re: "report.*.tsv" + fn: "report*.tsv" filtlong: num_lines: 20 fn_re: ".*_filtlong.log" diff --git a/conf/modules.config b/conf/modules.config index 701598db5..e14432d63 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -28,20 +28,20 @@ process { "--cut_front", "--cut_tail", "--cut_mean_quality ${params.fastp_cut_mean_quality}", - "--length_required ${params.reads_minlength}" + "--length_required ${params.reads_minlength}", ].join(' ').trim() publishDir = [ [ path: { "${params.outdir}/QC_shortreads/fastp/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{html,json}" + pattern: "*.{html,json}", ], [ path: { "${params.outdir}/QC_shortreads/fastp/${meta.id}" }, mode: params.publish_dir_mode, pattern: "*.fastq.gz", - enabled: params.save_clipped_reads - ] + enabled: params.save_clipped_reads, + ], ] ext.prefix = { "${meta.id}_run${meta.run}_fastp" } tag = { "${meta.id}_run${meta.run}" } @@ -52,20 +52,20 @@ process { "--minlength ${params.reads_minlength}", "--adapter1 ${params.adapterremoval_adapter1} --adapter2 ${params.adapterremoval_adapter2}", "--minquality ${params.adapterremoval_minquality} --trimns", - params.adapterremoval_trim_quality_stretch ? "--trim_qualities" : "--trimwindows 4" + params.adapterremoval_trim_quality_stretch ? "--trim_qualities" : "--trimwindows 4", ].join(' ').trim() publishDir = [ [ path: { "${params.outdir}/QC_shortreads/adapterremoval/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{settings}" + pattern: "*.{settings}", ], [ path: { "${params.outdir}/QC_shortreads/adapterremoval/${meta.id}" }, mode: params.publish_dir_mode, pattern: "*.{truncated,discarded}.gz", - enabled: params.save_clipped_reads - ] + enabled: params.save_clipped_reads, + ], ] ext.prefix = { "${meta.id}_run${meta.run}_ar2" } tag = { "${meta.id}_run${meta.run}" } @@ -76,12 +76,12 @@ process { "--minlength ${params.reads_minlength}", "--adapter1 ${params.adapterremoval_adapter1}", "--minquality ${params.adapterremoval_minquality} --trimns", - params.adapterremoval_trim_quality_stretch ? "--trim_qualities" : "--trimwindows 4" + params.adapterremoval_trim_quality_stretch ? "--trim_qualities" : "--trimwindows 4", ].join(' ').trim() publishDir = [ path: { "${params.outdir}/QC_shortreads/adapterremoval/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{settings}" + pattern: "*.{settings}", ] ext.prefix = { "${meta.id}_run${meta.run}_ar2" } tag = { "${meta.id}_run${meta.run}" } @@ -93,14 +93,14 @@ process { [ path: { "${params.outdir}/QC_shortreads/remove_phix" }, mode: params.publish_dir_mode, - pattern: "*.log" + pattern: "*.log", ], [ path: { "${params.outdir}/QC_shortreads/remove_phix" }, mode: params.publish_dir_mode, pattern: "*.unmapped*.fastq.gz", - enabled: params.save_phixremoved_reads - ] + enabled: params.save_phixremoved_reads, + ], ] tag = { "${meta.id}_run${meta.run}" } } @@ -113,14 +113,14 @@ process { [ path: { "${params.outdir}/QC_shortreads/remove_host" }, mode: params.publish_dir_mode, - pattern: "*{.log,read_ids.txt}" + pattern: "*{.log,read_ids.txt}", ], [ path: { "${params.outdir}/QC_shortreads/remove_host" }, mode: params.publish_dir_mode, pattern: "*.unmapped*.fastq.gz", - enabled: params.save_hostremoved_reads - ] + enabled: params.save_hostremoved_reads, + ], ] tag = { "${meta.id}_run${meta.run}" } } @@ -131,7 +131,7 @@ process { publishDir = [ path: { "${params.outdir}/QC_shortreads/fastqc" }, mode: params.publish_dir_mode, - pattern: "*.html" + pattern: "*.html", ] tag = { "${meta.id}_run${meta.run}" } } @@ -139,22 +139,22 @@ process { withName: BBMAP_BBNORM { ext.args = [ params.bbnorm_target ? "target=${params.bbnorm_target}" : '', - params.bbnorm_min ? "min=${params.bbnorm_min}" : '' + params.bbnorm_min ? "min=${params.bbnorm_min}" : '', ].join(' ').trim() publishDir = [ [ path: { "${params.outdir}/bbmap/bbnorm/logs" }, enabled: params.save_bbnorm_reads, mode: params.publish_dir_mode, - pattern: "*.log" + pattern: "*.log", ], [ path: { "${params.outdir}/bbmap/bbnorm/" }, mode: 'copy', enabled: params.save_bbnorm_reads, mode: params.publish_dir_mode, - pattern: "*.fastq.gz" - ] + pattern: "*.fastq.gz", + ], ] } @@ -163,7 +163,7 @@ process { path: { "${params.outdir}/QC_longreads/porechop" }, mode: params.publish_dir_mode, pattern: "*_porechop_trimmed.fastq.gz", - enabled: params.save_porechop_reads + enabled: params.save_porechop_reads, ] ext.prefix = { "${meta.id}_run${meta.run}_porechop_trimmed" } } @@ -173,7 +173,7 @@ process { path: { "${params.outdir}/QC_longreads/porechop" }, mode: params.publish_dir_mode, pattern: "*_porechop-abi_trimmed.fastq.gz", - enabled: params.save_porechop_reads + enabled: params.save_porechop_reads, ] ext.prefix = { "${meta.id}_run${meta.run}_porechop-abi_trimmed" } } @@ -184,13 +184,13 @@ process { "--keep_percent ${params.longreads_keep_percent}", "--trim", "--length_weight ${params.longreads_length_weight}", - params.longreads_min_quality ? "--min_mean_q ${params.longreads_min_quality}" : '' + params.longreads_min_quality ? "--min_mean_q ${params.longreads_min_quality}" : '', ].join(' ').trim() publishDir = [ path: { "${params.outdir}/QC_longreads/Filtlong" }, mode: params.publish_dir_mode, pattern: "*_filtlong.fastq.gz", - enabled: params.save_filtered_longreads + enabled: params.save_filtered_longreads, ] ext.prefix = { "${meta.id}_run${meta.run}_filtlong" } } @@ -199,20 +199,20 @@ process { ext.args = [ "--min-len ${params.longreads_min_length}", params.longreads_min_quality ? "--min-qual ${params.longreads_min_quality}" : '', - "-vv" + "-vv", ].join(' ').trim() publishDir = [ [ path: { "${params.outdir}/QC_longreads/Nanoq" }, mode: params.publish_dir_mode, pattern: "*_nanoq_filtered.fastq.gz", - enabled: params.save_filtered_longreads + enabled: params.save_filtered_longreads, ], [ path: { "${params.outdir}/QC_longreads/Nanoq" }, mode: params.publish_dir_mode, - pattern: "*_nanoq_filtered.stats" - ] + pattern: "*_nanoq_filtered.stats", + ], ] ext.prefix = { "${meta.id}_run${meta.run}_nanoq_filtered" } } @@ -222,14 +222,14 @@ process { [ path: { "${params.outdir}/QC_longreads/NanoLyse" }, mode: params.publish_dir_mode, - pattern: "*.log" + pattern: "*.log", ], [ path: { "${params.outdir}/QC_longreads/NanoLyse" }, mode: params.publish_dir_mode, pattern: "*_nanolyse.fastq.gz", - enabled: params.save_lambdaremoved_reads - ] + enabled: params.save_lambdaremoved_reads, + ], ] ext.prefix = { "${meta.id}_run${meta.run}_lambdafiltered" } } @@ -237,20 +237,20 @@ process { withName: CHOPPER { ext.args2 = [ params.longreads_min_quality ? "--quality ${params.longreads_min_quality}" : '', - params.longreads_min_length ? "--minlength ${params.longreads_min_length}" : '' + params.longreads_min_length ? "--minlength ${params.longreads_min_length}" : '', ].join(' ').trim() publishDir = [ [ path: { "${params.outdir}/QC_longreads/Chopper" }, mode: params.publish_dir_mode, - pattern: "*.log" + pattern: "*.log", ], [ path: { "${params.outdir}/QC_longreads/Chopper" }, mode: params.publish_dir_mode, pattern: "*_chopper.fastq.gz", - enabled: params.save_lambdaremoved_reads || params.save_filtered_longreads - ] + enabled: params.save_lambdaremoved_reads || params.save_filtered_longreads, + ], ] ext.prefix = { "${meta.id}_run${meta.run}_chopper" } } @@ -261,13 +261,13 @@ process { [ "-p raw_", "--title ${meta.id}_raw", - "-c darkblue" + "-c darkblue", ].join(' ').trim() } publishDir = [ path: { "${params.outdir}/QC_longreads/NanoPlot/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{png,html,txt}" + pattern: "*.{png,html,txt}", ] } @@ -276,13 +276,13 @@ process { [ "-p filtered_", "--title ${meta.id}_filtered", - "-c darkblue" + "-c darkblue", ].join(' ').trim() } publishDir = [ path: { "${params.outdir}/QC_longreads/NanoPlot/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{png,html,txt}" + pattern: "*.{png,html,txt}", ] } @@ -300,7 +300,7 @@ process { publishDir = [ path: { "${params.outdir}/Taxonomy/kraken2/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.txt" + pattern: "*.txt", ] } @@ -338,12 +338,12 @@ process { ext.args = [ "--cleanup", "--min-score ${params.genomad_min_score}", - "--splits ${params.genomad_splits}" + "--splits ${params.genomad_splits}", ].join(' ').trim() publishDir = [ path: { "${params.outdir}/VirusIdentification/geNomad/${meta.id}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, ] } @@ -354,14 +354,14 @@ process { [ path: { "${params.outdir}/Assembly/${assembly_meta.assembler}/QC/${assembly_meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.log" + pattern: "*.log", ], [ path: { "${params.outdir}/Assembly/${assembly_meta.assembler}/QC/${assembly_meta.id}" }, mode: params.publish_dir_mode, pattern: "*.{bam,bai}", - enabled: params.save_assembly_mapped_reads - ] + enabled: params.save_assembly_mapped_reads, + ], ] } @@ -373,7 +373,7 @@ process { publishDir = [ path: { "${params.outdir}/GenomeBinning" }, mode: params.publish_dir_mode, - pattern: "*.{png,tsv}" + pattern: "*.{png,tsv}", ] } @@ -388,7 +388,7 @@ process { publishDir = [ path: { "${params.outdir}/GenomeBinning/QC/BUSCO" }, mode: params.publish_dir_mode, - pattern: "*.{log,err,faa.gz,fna.gz,gff,txt}" + pattern: "*.{log,err,faa.gz,fna.gz,gff,txt}", ] } @@ -410,7 +410,7 @@ process { publishDir = [ path: { "${params.outdir}/GenomeBinning/QC/CheckM" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, ] } @@ -420,7 +420,7 @@ process { publishDir = [ path: { "${params.outdir}/GenomeBinning/QC/CheckM" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, ] } @@ -429,7 +429,7 @@ process { publishDir = [ path: { "${params.outdir}/GenomeBinning/QC" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, ] } @@ -439,7 +439,7 @@ process { mode: params.publish_dir_mode, overwrite: false, saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, - enabled: params.save_checkm2_data + enabled: params.save_checkm2_data, ] } @@ -448,7 +448,7 @@ process { publishDir = [ path: { "${params.outdir}/GenomeBinning/QC/CheckM2" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, ] } @@ -457,7 +457,7 @@ process { path: { "${params.outdir}/GenomeBinning/QC/GUNC" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, - enabled: params.gunc_save_db + enabled: params.gunc_save_db, ] } @@ -466,7 +466,7 @@ process { publishDir = [ path: { "${params.outdir}/GenomeBinning/QC/GUNC/raw/${meta.assembler}-${meta.binner}-${meta.domain}-${meta.refinement}-${meta.id}/${fasta.baseName}/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, ] } @@ -475,7 +475,7 @@ process { publishDir = [ path: { "${params.outdir}/GenomeBinning/QC/GUNC/checkmmerged/${meta.assembler}-${meta.binner}-${meta.domain}-${meta.refinement}-${meta.id}/${checkm_file.baseName}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, ] } @@ -496,13 +496,13 @@ process { "--extension fa", "--min_perc_aa ${params.gtdbtk_min_perc_aa}", "--min_af ${params.gtdbtk_min_af}", - "--pplacer_cpus ${params.gtdbtk_pplacer_cpus}" + "--pplacer_cpus ${params.gtdbtk_pplacer_cpus}", ].join(' ') ext.prefix = { "${meta.assembler}-${meta.binner}-${meta.domain}-${meta.refinement}-${meta.id}" } publishDir = [ path: { "${params.outdir}/Taxonomy/GTDB-Tk/${meta.assembler}/${meta.binner}/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{log,tsv,tree.gz,fasta,fasta.gz}" + pattern: "*.{log,tsv,tree.gz,fasta,fasta.gz}", ] } @@ -539,7 +539,7 @@ process { publishDir = [ path: { "${params.outdir}/Ancient_DNA/variant_calling/consensus" }, mode: params.publish_dir_mode, - pattern: "*.fa" + pattern: "*.fa", ] } @@ -549,7 +549,7 @@ process { publishDir = [ path: { "${params.outdir}/Ancient_DNA/variant_calling/index" }, mode: params.publish_dir_mode, - enabled: false + enabled: false, ] } @@ -557,7 +557,7 @@ process { ext.prefix = { "${meta.assembler}-${meta.id}" } publishDir = [ path: { "${params.outdir}/Ancient_DNA/pydamage/analyze/${meta.assembler}-${meta.id}/" }, - mode: params.publish_dir_mode + mode: params.publish_dir_mode, ] } @@ -566,7 +566,7 @@ process { ext.args = "-t ${params.pydamage_accuracy}" publishDir = [ path: { "${params.outdir}/Ancient_DNA/pydamage/filter/${meta.assembler}-${meta.id}/" }, - mode: params.publish_dir_mode + mode: params.publish_dir_mode, ] } @@ -575,7 +575,7 @@ process { publishDir = [ path: { "${params.outdir}/Ancient_DNA/samtools/faidx" }, mode: params.publish_dir_mode, - enabled: false + enabled: false, ] } @@ -590,7 +590,7 @@ process { ext.args = [ params.min_contig_size < 1500 ? "-m 1500" : "-m ${params.min_contig_size}", "--unbinned", - "--seed ${params.metabat_rng_seed}" + "--seed ${params.metabat_rng_seed}", ].join(' ').trim() } @@ -599,13 +599,13 @@ process { [ path: { "${params.outdir}/GenomeBinning/MaxBin2/discarded" }, mode: params.publish_dir_mode, - pattern: '*.tooshort.gz' + pattern: '*.tooshort.gz', ], [ path: { "${params.outdir}/GenomeBinning/MaxBin2/" }, mode: params.publish_dir_mode, - pattern: '*.{summary,abundance}' - ] + pattern: '*.{summary,abundance}', + ], ] ext.prefix = { "${meta.assembler}-MaxBin2-${meta.id}" } } @@ -615,7 +615,7 @@ process { [ path: { "${params.outdir}/GenomeBinning/MaxBin2/bins/" }, mode: params.publish_dir_mode, - pattern: '*.fa.gz' + pattern: '*.fa.gz', ] ] } @@ -625,14 +625,14 @@ process { [ path: { "${params.outdir}/GenomeBinning/CONCOCT/stats/" }, mode: params.publish_dir_mode, - pattern: "*.{txt,csv,tsv}" + pattern: "*.{txt,csv,tsv}", ], [ path: { "${params.outdir}/GenomeBinning/CONCOCT/bins" }, mode: params.publish_dir_mode, saveAs: { filename -> new File(filename).getName() }, - pattern: "*/*.fa.gz" - ] + pattern: "*/*.fa.gz", + ], ] ext.prefix = { "${meta.assembler}-CONCOCT-${meta.id}" } } @@ -662,7 +662,7 @@ process { [ path: { "${params.outdir}/GenomeBinning/DASTool" }, mode: params.publish_dir_mode, - pattern: '*.{tsv,log,eval,seqlength}' + pattern: '*.{tsv,log,eval,seqlength}', ] ] ext.prefix = { "${meta.assembler}-DASTool-${meta.id}" } @@ -674,13 +674,13 @@ process { [ path: { "${params.outdir}/GenomeBinning/DASTool/unbinned" }, mode: params.publish_dir_mode, - pattern: '*-DASToolUnbinned-*.fa' + pattern: '*-DASToolUnbinned-*.fa', ], [ path: { "${params.outdir}/GenomeBinning/DASTool/bins" }, mode: params.publish_dir_mode, - pattern: '*-{MetaBAT2,MaxBin2,CONCOCT}Refined-*.fa' - ] + pattern: '*-{MetaBAT2,MaxBin2,CONCOCT}Refined-*.fa', + ], ] } @@ -688,7 +688,7 @@ process { publishDir = [ path: { "${params.outdir}/Taxonomy/Tiara/" }, mode: params.publish_dir_mode, - pattern: "*.txt" + pattern: "*.txt", ] ext.args = { "--min_len ${params.tiara_min_length} --probabilities" } ext.prefix = { "${meta.assembler}-${meta.id}.tiara" } @@ -715,11 +715,11 @@ process { publishDir = [path: { "${params.outdir}/Annotation/MetaEuk/${meta.assembler}/${meta.id}" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename }] } withName: MULTIQC { - ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } + ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : '' } publishDir = [ path: { "${params.outdir}/multiqc" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, ] } } diff --git a/workflows/mag.nf b/workflows/mag.nf index de353a40f..b074c4b65 100644 --- a/workflows/mag.nf +++ b/workflows/mag.nf @@ -63,7 +63,7 @@ include { COMBINE_TSV as COMBINE_SUMMARY_TSV } from '../modul workflow MAG { take: - ch_raw_short_reads // channel: samplesheet read in from --input + ch_raw_short_reads // channel: samplesheet read in from --input ch_raw_long_reads ch_input_assemblies @@ -115,8 +115,9 @@ workflow MAG { } if (!params.keep_lambda) { - ch_lambda_db = Channel.value(file( "${params.lambda_reference}" )) - } else { + ch_lambda_db = Channel.value(file("${params.lambda_reference}")) + } + else { ch_lambda_db = Channel.empty() } @@ -162,14 +163,13 @@ workflow MAG { ch_raw_short_reads, ch_host_fasta, ch_phix_db_file, - ch_metaeuk_db + ch_metaeuk_db, ) ch_versions = ch_versions.mix(SHORTREAD_PREPROCESSING.out.versions) ch_multiqc_files = ch_multiqc_files.mix(SHORTREAD_PREPROCESSING.out.multiqc_files.collect { it[1] }.ifEmpty([])) ch_short_reads = SHORTREAD_PREPROCESSING.out.short_reads ch_short_reads_assembly = SHORTREAD_PREPROCESSING.out.short_reads_assembly - } else { ch_short_reads = ch_raw_short_reads.map { meta, reads -> @@ -187,7 +187,7 @@ workflow MAG { LONGREAD_PREPROCESSING( ch_raw_long_reads, ch_short_reads, - ch_lambda_db + ch_lambda_db, ) ch_versions = ch_versions.mix(LONGREAD_PREPROCESSING.out.versions) @@ -218,7 +218,7 @@ workflow MAG { ch_short_reads, ch_db_for_centrifuge, false, - false + false, ) ch_versions = ch_versions.mix(CENTRIFUGE_CENTRIFUGE.out.versions.first()) @@ -255,7 +255,7 @@ workflow MAG { KRAKEN2( ch_short_reads, - ch_db_for_kraken2 + ch_db_for_kraken2, ) ch_versions = ch_versions.mix(KRAKEN2.out.versions.first()) @@ -287,7 +287,7 @@ workflow MAG { KRONA_KTIMPORTTAXONOMY( ch_tax_classifications, - ch_krona_db + ch_krona_db, ) ch_versions = ch_versions.mix(KRONA_KTIMPORTTAXONOMY.out.versions.first()) } @@ -450,7 +450,7 @@ workflow MAG { if (!params.skip_prodigal) { PRODIGAL( ch_assemblies, - 'gff' + 'gff', ) ch_versions = ch_versions.mix(PRODIGAL.out.versions.first()) } @@ -477,7 +477,7 @@ workflow MAG { if (!params.skip_binning || params.ancient_dna) { BINNING_PREPARATION( ch_assemblies, - ch_short_reads + ch_short_reads, ) ch_versions = ch_versions.mix(BINNING_PREPARATION.out.bowtie2_version.first()) } @@ -505,13 +505,13 @@ workflow MAG { if (params.ancient_dna && !params.skip_ancient_damagecorrection) { BINNING( BINNING_PREPARATION.out.grouped_mappings.join(ANCIENT_DNA_ASSEMBLY_VALIDATION.out.contigs_recalled).map { it -> [it[0], it[4], it[2], it[3]] }, - ch_short_reads + ch_short_reads, ) } else { BINNING( BINNING_PREPARATION.out.grouped_mappings, - ch_short_reads + ch_short_reads, ) } ch_versions = ch_versions.mix(BINNING.out.versions) @@ -654,7 +654,7 @@ workflow MAG { } CAT( ch_input_for_postbinning, - ch_cat_db + ch_cat_db, ) // Group all classification results for each sample in a single file ch_cat_summary = CAT.out.tax_classification_names.collectFile(keepHeader: true) { meta, classification -> @@ -692,7 +692,7 @@ workflow MAG { ch_gtdb_bins, ch_bin_qc_summary, gtdb, - gtdb_mash + gtdb_mash, ) ch_versions = ch_versions.mix(GTDBTK.out.versions.first()) ch_gtdbtk_summary = GTDBTK.out.summary @@ -709,7 +709,7 @@ workflow MAG { ch_quast_bins_summary.ifEmpty([]), ch_gtdbtk_summary.ifEmpty([]), ch_cat_global_summary.ifEmpty([]), - params.binqc_tool + params.binqc_tool, ) } @@ -731,7 +731,7 @@ workflow MAG { PROKKA( ch_bins_for_prokka, [], - [] + [], ) ch_versions = ch_versions.mix(PROKKA.out.versions.first()) } @@ -758,9 +758,9 @@ workflow MAG { softwareVersionsToYAML(ch_versions) .collectFile( storeDir: "${params.outdir}/pipeline_info", - name: 'nf_core_' + 'mag_software_' + 'mqc_' + 'versions.yml', + name: 'nf_core_' + 'mag_software_' + 'mqc_' + 'versions.yml', sort: true, - newLine: true + newLine: true, ) .set { ch_collated_versions } @@ -798,7 +798,7 @@ workflow MAG { ch_multiqc_files = ch_multiqc_files.mix( ch_methods_description.collectFile( name: 'methods_description_mqc.yaml', - sort: true + sort: true, ) ) @@ -806,10 +806,10 @@ workflow MAG { ch_multiqc_files = ch_multiqc_files.mix(KRAKEN2.out.report.collect { it[1] }.ifEmpty([])) if (!params.skip_quast) { - ch_multiqc_files = ch_multiqc_files.mix(QUAST.out.report.collect().ifEmpty([])) + ch_multiqc_files = ch_multiqc_files.mix(QUAST.out.report.dump(tag: 'pre-collect').collect().dump(tag: 'post-collect').ifEmpty([])) if (!params.skip_binning) { - ch_multiqc_files = ch_multiqc_files.mix(QUAST_BINS.out.dir.collect().ifEmpty([])) + ch_multiqc_files = ch_multiqc_files.mix(QUAST_BINS.out.dir.dump(tag: 'pre-collect-bin').collect().dump(tag: 'post-collect-bin').ifEmpty([])) } } @@ -827,12 +827,12 @@ workflow MAG { MULTIQC( - ch_multiqc_files.collect(), + ch_multiqc_files.collect().dump(tag: 'final_mqc'), ch_multiqc_config.toList(), ch_multiqc_custom_config.toList(), ch_multiqc_logo.toList(), [], - [] + [], ) emit: From 5e799f591038f3387beafe5735aa3d28c5a40273 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 22 Jan 2025 11:30:27 +0100 Subject: [PATCH 5/9] Remove debugging dumps --- workflows/mag.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workflows/mag.nf b/workflows/mag.nf index b074c4b65..ffe5f8efe 100644 --- a/workflows/mag.nf +++ b/workflows/mag.nf @@ -806,10 +806,10 @@ workflow MAG { ch_multiqc_files = ch_multiqc_files.mix(KRAKEN2.out.report.collect { it[1] }.ifEmpty([])) if (!params.skip_quast) { - ch_multiqc_files = ch_multiqc_files.mix(QUAST.out.report.dump(tag: 'pre-collect').collect().dump(tag: 'post-collect').ifEmpty([])) + ch_multiqc_files = ch_multiqc_files.mix(QUAST.out.report.collect().ifEmpty([])) if (!params.skip_binning) { - ch_multiqc_files = ch_multiqc_files.mix(QUAST_BINS.out.dir.dump(tag: 'pre-collect-bin').collect().dump(tag: 'post-collect-bin').ifEmpty([])) + ch_multiqc_files = ch_multiqc_files.mix(QUAST_BINS.out.dir.collect().ifEmpty([])) } } @@ -827,7 +827,7 @@ workflow MAG { MULTIQC( - ch_multiqc_files.collect().dump(tag: 'final_mqc'), + ch_multiqc_files.collect(), ch_multiqc_config.toList(), ch_multiqc_custom_config.toList(), ch_multiqc_logo.toList(), From 2cff07588ce44a401c4f2c63a69ca8660b4004bf Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 22 Jan 2025 11:31:38 +0100 Subject: [PATCH 6/9] Fix changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 004375b58..feae147e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,10 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Fixed` -### `Dependencies` +- [#752](https://github.com/nf-core/mag/pull/752) - Fix QUAST results not being displayed when skipping certain steps (reported by @amizeranschi, fix by @jfy133) ### `Dependencies` +### `Deprecated` + ## 3.3.0 [2024-12-19] ### `Added` From 1b811a722e7741621e7e9818c0c9e046977b2408 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Thu, 23 Jan 2025 15:42:05 +0100 Subject: [PATCH 7/9] Fix iGenomes support --- nextflow.config | 343 ++++++++++-------- nextflow_schema.json | 6 +- subworkflows/local/shortread_preprocessing.nf | 25 +- .../local/utils_nfcore_mag_pipeline/main.nf | 16 +- workflows/mag.nf | 13 +- 5 files changed, 226 insertions(+), 177 deletions(-) diff --git a/nextflow.config b/nextflow.config index 2e915115a..fdbe12828 100644 --- a/nextflow.config +++ b/nextflow.config @@ -116,16 +116,16 @@ params { save_filtered_longreads = false // binning options - skip_metabat2 = false - skip_maxbin2 = false - skip_concoct = false - bin_domain_classification = false - bin_domain_classification_tool = 'tiara' - tiara_min_length = 3000 - refine_bins_dastool = false - refine_bins_dastool_threshold = 0.5 - postbinning_input = 'raw_bins_only' - exclude_unbins_from_postbinning = false + skip_metabat2 = false + skip_maxbin2 = false + skip_concoct = false + bin_domain_classification = false + bin_domain_classification_tool = 'tiara' + tiara_min_length = 3000 + refine_bins_dastool = false + refine_bins_dastool_threshold = 0.5 + postbinning_input = 'raw_bins_only' + exclude_unbins_from_postbinning = false // Bin QC skip_binqc = false @@ -138,7 +138,8 @@ params { checkm_db = null save_checkm_data = false checkm2_db = null - checkm2_db_version = 5571251 // corresponds to Zenodo record ID + checkm2_db_version = 5571251 + // corresponds to Zenodo record ID save_checkm2_data = false run_gunc = false gunc_database_type = 'progenomes' @@ -159,40 +160,41 @@ params { // References //genome = null // we use --host_genome instead - igenomes_base = 's3://ngi-igenomes/igenomes/' - igenomes_ignore = false + igenomes_base = 's3://ngi-igenomes/igenomes/' + igenomes_ignore = false // MultiQC options - multiqc_config = null - multiqc_title = null - multiqc_logo = null - max_multiqc_email_size = '25.MB' - multiqc_methods_description = null + multiqc_config = null + multiqc_title = null + multiqc_logo = null + max_multiqc_email_size = '25.MB' + multiqc_methods_description = null // Boilerplate options - outdir = null - publish_dir_mode = 'copy' - email = null - email_on_fail = null - plaintext_email = false - monochrome_logs = false - hook_url = null - help = false - help_full = false - show_hidden = false - version = false - pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/' - trace_report_suffix = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')// Config options - config_profile_name = null - config_profile_description = null - - custom_config_version = 'master' - custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" - config_profile_contact = null - config_profile_url = null + outdir = null + publish_dir_mode = 'copy' + email = null + email_on_fail = null + plaintext_email = false + monochrome_logs = false + hook_url = null + help = false + help_full = false + show_hidden = false + version = false + pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/' + trace_report_suffix = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss') + // Config options + config_profile_name = null + config_profile_description = null + + custom_config_version = 'master' + custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" + config_profile_contact = null + config_profile_url = null // Schema validation default options - validate_params = true + validate_params = true } // Load base.config by default for all pipelines @@ -200,90 +202,90 @@ includeConfig 'conf/base.config' profiles { debug { - dumpHashes = true - process.beforeScript = 'echo $HOSTNAME' - cleanup = false + dumpHashes = true + process.beforeScript = 'echo $HOSTNAME' + cleanup = false nextflow.enable.configProcessNamesValidation = true } conda { - conda.enabled = true - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false - conda.channels = ['conda-forge', 'bioconda'] - apptainer.enabled = false + conda.enabled = true + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + conda.channels = ['conda-forge', 'bioconda'] + apptainer.enabled = false } mamba { - conda.enabled = true - conda.useMamba = true - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false - apptainer.enabled = false + conda.enabled = true + conda.useMamba = true + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } docker { - docker.enabled = true - conda.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false - apptainer.enabled = false - docker.runOptions = '-u $(id -u):$(id -g)' + docker.enabled = true + conda.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false + docker.runOptions = '-u $(id -u):$(id -g)' } arm { - docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' + docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' } singularity { - singularity.enabled = true - singularity.autoMounts = true - conda.enabled = false - docker.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false - apptainer.enabled = false + singularity.enabled = true + singularity.autoMounts = true + conda.enabled = false + docker.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } podman { - podman.enabled = true - conda.enabled = false - docker.enabled = false - singularity.enabled = false - shifter.enabled = false - charliecloud.enabled = false - apptainer.enabled = false + podman.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } shifter { - shifter.enabled = true - conda.enabled = false - docker.enabled = false - singularity.enabled = false - podman.enabled = false - charliecloud.enabled = false - apptainer.enabled = false + shifter.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } charliecloud { - charliecloud.enabled = true - conda.enabled = false - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - apptainer.enabled = false + charliecloud.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + apptainer.enabled = false } apptainer { - apptainer.enabled = true - apptainer.autoMounts = true - conda.enabled = false - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false + apptainer.enabled = true + apptainer.autoMounts = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false } wave { apptainer.ociAutoPull = true @@ -293,33 +295,65 @@ profiles { wave.strategy = 'conda,container' } gitpod { - executor.name = 'local' - executor.cpus = 4 - executor.memory = 8.GB + executor.name = 'local' + executor.cpus = 4 + executor.memory = 8.GB process { resourceLimits = [ memory: 8.GB, - cpus : 4, - time : 1.h + cpus: 4, + time: 1.h, ] } } - test { includeConfig 'conf/test.config' } - test_full { includeConfig 'conf/test_full.config' } - test_host_rm { includeConfig 'conf/test_host_rm.config' } - test_hybrid { includeConfig 'conf/test_hybrid.config' } - test_hybrid_host_rm { includeConfig 'conf/test_hybrid_host_rm.config' } - test_busco_auto { includeConfig 'conf/test_busco_auto.config' } - test_ancient_dna { includeConfig 'conf/test_ancient_dna.config' } - test_adapterremoval { includeConfig 'conf/test_adapterremoval.config' } - test_binning_entry { includeConfig 'conf/test_binning_entry.config' } - test_binrefinement { includeConfig 'conf/test_binrefinement.config' } - test_no_clipping { includeConfig 'conf/test_no_clipping.config' } - test_bbnorm { includeConfig 'conf/test_bbnorm.config' } - test_nothing { includeConfig 'conf/test_nothing.config' } - test_virus_identification { includeConfig 'conf/test_virus_identification.config' } - test_single_end { includeConfig 'conf/test_single_end.config' } - test_concoct { includeConfig 'conf/test_concoct.config' } + test { + includeConfig 'conf/test.config' + } + test_full { + includeConfig 'conf/test_full.config' + } + test_host_rm { + includeConfig 'conf/test_host_rm.config' + } + test_hybrid { + includeConfig 'conf/test_hybrid.config' + } + test_hybrid_host_rm { + includeConfig 'conf/test_hybrid_host_rm.config' + } + test_busco_auto { + includeConfig 'conf/test_busco_auto.config' + } + test_ancient_dna { + includeConfig 'conf/test_ancient_dna.config' + } + test_adapterremoval { + includeConfig 'conf/test_adapterremoval.config' + } + test_binning_entry { + includeConfig 'conf/test_binning_entry.config' + } + test_binrefinement { + includeConfig 'conf/test_binrefinement.config' + } + test_no_clipping { + includeConfig 'conf/test_no_clipping.config' + } + test_bbnorm { + includeConfig 'conf/test_bbnorm.config' + } + test_nothing { + includeConfig 'conf/test_nothing.config' + } + test_virus_identification { + includeConfig 'conf/test_virus_identification.config' + } + test_single_end { + includeConfig 'conf/test_single_end.config' + } + test_concoct { + includeConfig 'conf/test_concoct.config' + } } // Load nf-core custom profiles from different Institutions @@ -331,10 +365,10 @@ includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${pa // Set default registry for Apptainer, Docker, Podman, Charliecloud and Singularity independent of -profile // Will not be used unless Apptainer / Docker / Podman / Charliecloud / Singularity are enabled // Set to your registry if you have a mirror of containers -apptainer.registry = 'quay.io' -docker.registry = 'quay.io' -podman.registry = 'quay.io' -singularity.registry = 'quay.io' +apptainer.registry = 'quay.io' +docker.registry = 'quay.io' +podman.registry = 'quay.io' +singularity.registry = 'quay.io' charliecloud.registry = 'quay.io' // Load igenomes.config if required @@ -383,71 +417,72 @@ dag { manifest { name = 'nf-core/mag' - author = """Hadrien Gourlé, Daniel Straub, Sabrina Krakau, James A. Fellows Yates, Maxime Borry""" // The author field is deprecated from Nextflow version 24.10.0, use contributors instead + author = """Hadrien Gourlé, Daniel Straub, Sabrina Krakau, James A. Fellows Yates, Maxime Borry""" + // The author field is deprecated from Nextflow version 24.10.0, use contributors instead contributors = [ [ name: 'Hadrien Gourlé', affiliation: 'Department of Animal Breeding and Genetics, Swedish University of Agricultural Sciences, Uppsala, Swden', email: '', github: 'HadrienG', - contribution: ['author'], // List of contribution types ('author', 'maintainer' or 'contributor') - orcid: '0000-0001-9807-1082 ' + contribution: ['author'], + orcid: '0000-0001-9807-1082 ', ], [ name: 'Daniel Straub', affiliation: 'Quantitative Biology Center (QBiC), University of Tübingen, Tübingen, Germany', email: '', github: 'd4straub', - contribution: ['author', 'maintainer'], // List of contribution types ('author', 'maintainer' or 'contributor') - orcid: '0000-0002-2553-0660 ' + contribution: ['author', 'maintainer'], + orcid: '0000-0002-2553-0660 ', ], [ name: 'Sabrina Krakau', affiliation: 'Quantitative Biology Center (QBiC), University of Tübingen, Tübingen, Germany', email: '', github: 'skrakau', - contribution: ['contributor'], // List of contribution types ('author', 'maintainer' or 'contributor') - orcid: '0000-0003-0603-7907 ' + contribution: ['contributor'], + orcid: '0000-0003-0603-7907 ', ], [ name: 'Antonia Schuster', affiliation: 'Quantitative Biology Center (QBiC), University of Tübingen, Tübingen, Germany', email: '', github: 'AntoniaSchuster', - contribution: ['author'], // List of contribution types ('author', 'maintainer' or 'contributor') - orcid: '' + contribution: ['author'], + orcid: '', ], [ name: 'James A. Fellows Yates', affiliation: 'Department of Archaeogenetics, Max Planck Institute for Evolutionary Anthropology, Leipzig, Germany', email: 'jfy133@gmail.com', github: 'jfy133', - contribution: ['maintainer'], // List of contribution types ('author', 'maintainer' or 'contributor') - orcid: '0000-0001-5585-6277' + contribution: ['maintainer'], + orcid: '0000-0001-5585-6277', ], [ name: 'Maxime Borry', affiliation: 'Department of Archaeogenetics, Max Planck Institute for Evolutionary Anthropology, Leipzig, Germany', email: '', github: 'maxibor', - contribution: ['contributor'], // List of contribution types ('author', 'maintainer' or 'contributor') - orcid: '0000-0001-9140-7559' + contribution: ['contributor'], + orcid: '0000-0001-9140-7559', ], [ name: 'Jim Downie', affiliation: 'Wellcome Sanger Institute, Hinxton, UK', email: '', github: 'prototaxites', - contribution: ['contributor'], // List of contribution types ('author', 'maintainer' or 'contributor') - orcid: '0000-0002-7175-0533' + contribution: ['contributor'], + orcid: '0000-0002-7175-0533', ], [ name: 'Carson Miller', affiliation: 'University of Washington, Seattle, USA', email: '0000-0002-7175-0533', github: 'CarsonJM', - contribution: ['contributor'], // List of contribution types ('author', 'maintainer' or 'contributor') - orcid: '0000-0001-9861-4884' + contribution: ['contributor'], + orcid: '0000-0001-9861-4884', ], ] homePage = 'https://github.com/nf-core/mag' @@ -461,18 +496,18 @@ manifest { // Nextflow plugins plugins { - id 'nf-schema@2.3.0' // Validation of pipeline parameters and creation of an input channel from a sample sheet + id 'nf-schema@2.3.0' } validation { defaultIgnoreParams = ["genomes"] - monochromeLogs = params.monochrome_logs + monochromeLogs = params.monochrome_logs help { - enabled = true - command = "nextflow run nf-core/mag -profile --input samplesheet.csv --outdir " - fullParameter = "help_full" + enabled = true + command = "nextflow run nf-core/mag -profile --input samplesheet.csv --outdir " + fullParameter = "help_full" showHiddenParameter = "show_hidden" - beforeText = """ + beforeText = """ -\033[2m----------------------------------------------------\033[0m- \033[0;32m,--.\033[0;30m/\033[0;32m,-.\033[0m \033[0;34m ___ __ __ __ ___ \033[0;32m/,-._.--~\'\033[0m @@ -482,7 +517,7 @@ validation { \033[0;35m nf-core/mag ${manifest.version}\033[0m -\033[2m----------------------------------------------------\033[0m- """ - afterText = """${manifest.doi ? "\n* The pipeline\n" : ""}${manifest.doi.tokenize(",").collect { " https://doi.org/${it.trim().replace('https://doi.org/','')}"}.join("\n")}${manifest.doi ? "\n" : ""} + afterText = """${manifest.doi ? "\n* The pipeline\n" : ""}${manifest.doi.tokenize(",").collect { " https://doi.org/${it.trim().replace('https://doi.org/', '')}" }.join("\n")}${manifest.doi ? "\n" : ""} * The nf-core framework https://doi.org/10.1038/s41587-020-0439-x @@ -492,7 +527,7 @@ validation { } summary { beforeText = validation.help.beforeText - afterText = validation.help.afterText + afterText = validation.help.afterText } } diff --git a/nextflow_schema.json b/nextflow_schema.json index 18307b051..9159bb864 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -509,7 +509,7 @@ }, "gtdbtk_min_completeness": { "type": "number", - "default": 50, + "default": 50.0, "description": "Min. bin completeness (in %) required to apply GTDB-tk classification.", "help_text": "Completeness assessed with BUSCO analysis (100% - %Missing). Must be greater than 0 (min. 0.01) to avoid GTDB-tk errors. If too low, GTDB-tk classification results can be impaired due to not enough marker genes!", "minimum": 0.01, @@ -517,7 +517,7 @@ }, "gtdbtk_max_contamination": { "type": "number", - "default": 10, + "default": 10.0, "description": "Max. bin contamination (in %) allowed to apply GTDB-tk classification.", "help_text": "Contamination approximated based on BUSCO analysis (%Complete and duplicated). If too high, GTDB-tk classification results can be impaired due to contamination!", "minimum": 0, @@ -525,7 +525,7 @@ }, "gtdbtk_min_perc_aa": { "type": "number", - "default": 10, + "default": 10.0, "description": "Min. fraction of AA (in %) in the MSA for bins to be kept.", "minimum": 0, "maximum": 100 diff --git a/subworkflows/local/shortread_preprocessing.nf b/subworkflows/local/shortread_preprocessing.nf index ad33b56f5..abcee2c38 100644 --- a/subworkflows/local/shortread_preprocessing.nf +++ b/subworkflows/local/shortread_preprocessing.nf @@ -17,10 +17,11 @@ include { BBMAP_BBNORM } from '../../modu workflow SHORTREAD_PREPROCESSING { take: - ch_raw_short_reads // [ [meta] , fastq1, fastq2] (mandatory) - ch_host_fasta // [fasta] (optional) - ch_phix_db_file // [fasta] (optional) - ch_metaeuk_db // [fasta] (optional) + ch_raw_short_reads // [ [meta] , fastq1, fastq2] (mandatory) + ch_host_fasta // [fasta] (optional) + ch_host_genome_index // fasta (optional) + ch_phix_db_file // [fasta] (optional) + ch_metaeuk_db // [fasta] (optional) main: ch_versions = Channel.empty() @@ -38,12 +39,11 @@ workflow SHORTREAD_PREPROCESSING { ch_raw_short_reads, [], params.fastp_save_trimmed_fail, - [] + [], ) ch_short_reads_prepped = FASTP.out.reads ch_versions = ch_versions.mix(FASTP.out.versions.first()) ch_multiqc_files = ch_multiqc_files.mix(FASTP.out.json) - } else if (params.clip_tool == 'adapterremoval') { @@ -80,11 +80,14 @@ workflow SHORTREAD_PREPROCESSING { ch_host_bowtie2index = BOWTIE2_HOST_REMOVAL_BUILD.out.index } } + else if (params.host_genome) { + ch_host_bowtie2index = ch_host_genome_index + } if (params.host_fasta || params.host_genome) { BOWTIE2_HOST_REMOVAL_ALIGN( ch_short_reads_prepped, - ch_host_bowtie2index + ch_host_bowtie2index, ) ch_short_reads_hostremoved = BOWTIE2_HOST_REMOVAL_ALIGN.out.reads ch_versions = ch_versions.mix(BOWTIE2_HOST_REMOVAL_ALIGN.out.versions.first()) @@ -100,7 +103,7 @@ workflow SHORTREAD_PREPROCESSING { ) BOWTIE2_PHIX_REMOVAL_ALIGN( ch_short_reads_hostremoved, - BOWTIE2_PHIX_REMOVAL_BUILD.out.index + BOWTIE2_PHIX_REMOVAL_BUILD.out.index, ) ch_short_reads_phixremoved = BOWTIE2_PHIX_REMOVAL_ALIGN.out.reads ch_versions = ch_versions.mix(BOWTIE2_PHIX_REMOVAL_ALIGN.out.versions.first()) @@ -171,8 +174,8 @@ workflow SHORTREAD_PREPROCESSING { } emit: - short_reads = ch_short_reads + short_reads = ch_short_reads short_reads_assembly = ch_short_reads_assembly - versions = ch_versions - multiqc_files = ch_multiqc_files + versions = ch_versions + multiqc_files = ch_multiqc_files } diff --git a/subworkflows/local/utils_nfcore_mag_pipeline/main.nf b/subworkflows/local/utils_nfcore_mag_pipeline/main.nf index 254658ec5..a8c6dfd2b 100644 --- a/subworkflows/local/utils_nfcore_mag_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_mag_pipeline/main.nf @@ -42,7 +42,7 @@ workflow PIPELINE_INITIALISATION { version, true, outdir, - workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1 + workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1, ) // @@ -51,7 +51,7 @@ workflow PIPELINE_INITIALISATION { UTILS_NFSCHEMA_PLUGIN( workflow, validate_params, - null + null, ) // @@ -342,6 +342,7 @@ def validateInputSamplesheet(meta, sr1, sr2, lr) { // // Get attribute from genome config file e.g. fasta // +// Note: user uses --host_genome in mag def getGenomeAttribute(attribute) { if (params.genomes && params.host_genome && params.genomes.containsKey(params.host_genome)) { if (params.genomes[params.host_genome].containsKey(attribute)) { @@ -350,13 +351,14 @@ def getGenomeAttribute(attribute) { } return null } - // // Exit pipeline if incorrect --genome key provided // +// Note: user uses --host_genome in mag + def genomeExistsError() { - if (params.genomes && params.host_genome && !params.genomes.containsKey(params.genome)) { - def error_string = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " Genome '${params.host_genome}' not found in any config files provided to the pipeline.\n" + " Currently, the available genome keys are:\n" + " ${params.host_genomes.keySet().join(", ")}\n" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + if (params.genomes && params.host_genome && !params.genomes.containsKey(params.host_genome)) { + def error_string = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " Genome '${params.host_genome}' not found in any config files provided to the pipeline.\n" + " Currently, the available genome keys are:\n" + " ${params.genomes.keySet().join(", ")}\n" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" error(error_string) } } @@ -371,7 +373,7 @@ def toolCitationText() { "Tools used in the workflow included:", "FastQC (Andrews 2010),", "MultiQC (Ewels et al. 2016)", - "." + ".", ].join(' ').trim() return citation_text @@ -383,7 +385,7 @@ def toolBibliographyText() { // Uncomment function in methodsDescriptionText to render in MultiQC report def reference_text = [ "
  • Andrews S, (2010) FastQC, URL: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/).
  • ", - "
  • Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. doi: /10.1093/bioinformatics/btw354
  • " + "
  • Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. doi: /10.1093/bioinformatics/btw354
  • ", ].join(' ').trim() return reference_text diff --git a/workflows/mag.nf b/workflows/mag.nf index 3ad2800b2..5b424d62d 100644 --- a/workflows/mag.nf +++ b/workflows/mag.nf @@ -80,13 +80,21 @@ workflow MAG { host_fasta = params.genomes[params.host_genome].fasta ?: false ch_host_fasta = Channel.value(file("${host_fasta}")) host_bowtie2index = params.genomes[params.host_genome].bowtie2 ?: false - ch_host_bowtie2index = Channel.value(file("${host_bowtie2index}/*")) + ch_host_bowtie2index = Channel.fromPath("${host_bowtie2index}", checkIfExists: true).first() } else if (params.host_fasta) { - ch_host_fasta = Channel.value(file("${params.host_fasta}")) + ch_host_fasta = Channel.fromPath("${params.host_fasta}", checkIfExists: true).first() ?: false + + if (params.host_fasta_bowtie2index) { + ch_host_bowtie2index = Channel.fromPath("${params.host_fasta_bowtie2index}", checkIfExists: true).first() + } + else { + ch_host_bowtie2index = Channel.empty() + } } else { ch_host_fasta = Channel.empty() + ch_host_bowtie2index = Channel.empty() } if (params.kraken2_db) { @@ -165,6 +173,7 @@ workflow MAG { SHORTREAD_PREPROCESSING( ch_raw_short_reads, ch_host_fasta, + ch_host_bowtie2index, ch_phix_db_file, ch_metaeuk_db, ) From ac851547ac5637d222b55f43f69036a86a874b4e Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 24 Jan 2025 05:46:50 +0100 Subject: [PATCH 8/9] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d6af54db..81044ea8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#748](https://github.com/nf-core/mag/pull/748) - Fix broken phix reference channel when skipping phix removal (reported by @amizeranschi, fix by @muabnezor) - [#752](https://github.com/nf-core/mag/pull/752) - Fix QUAST results not being displayed when skipping certain steps (reported by @amizeranschi, fix by @jfy133) +- [#753](https://github.com/nf-core/mag/pull/753) - Fix iGenomes reference support for host removal reference genome (reported by @Thomieh73, fix by @jfy133) ### `Deprecated` From 73fd03ce1cac6130bd3666248e339d0a230e04f9 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 24 Jan 2025 04:47:57 +0000 Subject: [PATCH 9/9] [automated] Fix code linting --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81044ea8e..ca448d2bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#748](https://github.com/nf-core/mag/pull/748) - Fix broken phix reference channel when skipping phix removal (reported by @amizeranschi, fix by @muabnezor) - [#752](https://github.com/nf-core/mag/pull/752) - Fix QUAST results not being displayed when skipping certain steps (reported by @amizeranschi, fix by @jfy133) -- [#753](https://github.com/nf-core/mag/pull/753) - Fix iGenomes reference support for host removal reference genome (reported by @Thomieh73, fix by @jfy133) +- [#753](https://github.com/nf-core/mag/pull/753) - Fix iGenomes reference support for host removal reference genome (reported by @Thomieh73, fix by @jfy133) ### `Deprecated`