From 3f1119e4952ebe85b59a7829ef11427fab07b8e6 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 20 Dec 2024 16:50:35 +0100 Subject: [PATCH 01/16] Template update for nf-core/tools version 3.1.0 --- .editorconfig | 4 ++ .github/ISSUE_TEMPLATE/bug_report.yml | 1 - .github/PULL_REQUEST_TEMPLATE.md | 4 +- .github/workflows/download_pipeline.yml | 41 +++++++++++-------- .nf-core.yml | 10 ++--- .prettierignore | 1 + CHANGELOG.md | 2 +- CITATIONS.md | 4 +- LICENSE | 2 +- README.md | 15 ++----- assets/multiqc_config.yml | 4 +- assets/schema_input.json | 2 +- conf/test.config | 4 +- docs/output.md | 11 ++--- docs/usage.md | 2 +- nextflow.config | 9 ++-- nextflow_schema.json | 2 +- ro-crate-metadata.json | 41 ++++++++++++------- .../local/utils_nfcore_mag_pipeline/main.nf | 2 +- 19 files changed, 87 insertions(+), 74 deletions(-) diff --git a/.editorconfig b/.editorconfig index 72dda289..6d9b74cc 100644 --- a/.editorconfig +++ b/.editorconfig @@ -31,3 +31,7 @@ indent_size = unset # ignore python and markdown [*.{py,md}] indent_style = unset + +# ignore ro-crate metadata files +[**/ro-crate-metadata.json] +insert_final_newline = unset diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 146d5516..816733b0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -9,7 +9,6 @@ body: - [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting) - [nf-core/mag pipeline documentation](https://nf-co.re/mag/usage) - - type: textarea id: description attributes: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index e44a93d1..1ffcdcaf 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/master/.github/CONTRIBUTING.md) +Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/mag/tree/main/.github/CONTRIBUTING.md) --> ## PR checklist - [ ] This comment contains a description of changes (with reason). - [ ] If you've fixed a bug or added code that should be tested, add tests! -- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/mag/tree/master/.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/main/.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/download_pipeline.yml b/.github/workflows/download_pipeline.yml index 2576cc0c..13b51e2c 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -28,8 +28,12 @@ env: NXF_ANSI_LOG: false jobs: - download: + configure: runs-on: ubuntu-latest + outputs: + 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: Install Nextflow uses: nf-core/setup-nextflow@v2 @@ -53,22 +57,27 @@ jobs: 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_ENV} - echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV} - echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> ${GITHUB_ENV} + 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 run: | - nf-core pipelines download ${{ env.REPO_LOWERCASE }} \ - --revision ${{ env.REPO_BRANCH }} \ - --outdir ./${{ env.REPOTITLE_LOWERCASE }} \ + nf-core pipelines download ${{ needs.configure.outputs.REPO_LOWERCASE }} \ + --revision ${{ needs.configure.outputs.REPO_BRANCH }} \ + --outdir ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }} \ --compress "none" \ --container-system 'singularity' \ --container-library "quay.io" -l "docker.io" -l "community.wave.seqera.io/library/" \ @@ -76,14 +85,14 @@ jobs: --download-configuration 'yes' - name: Inspect download - run: tree ./${{ env.REPOTITLE_LOWERCASE }} + run: tree ./${{ needs.configure.outputs.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} + echo "IMAGE_COUNT_INITIAL=$image_count" >> "$GITHUB_OUTPUT" - name: Run the downloaded pipeline (stub) id: stub_run_pipeline @@ -91,27 +100,27 @@ jobs: env: 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 + run: nextflow run ./${{needs.configure.outputs.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ needs.configure.outputs.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() }} + if: ${{ steps.stub_run_pipeline.outcome == 'failure' }} env: 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 + run: nextflow run ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ needs.configure.outputs.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} + echo "IMAGE_COUNT_AFTER=$image_count" >> "$GITHUB_OUTPUT" - 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 }} + if [ "${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }}" -ne "${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }}" ]; then + initial_count=${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }} + 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 diff --git a/.nf-core.yml b/.nf-core.yml index e724a711..d6b80c0d 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1,10 +1,10 @@ lint: files_unchanged: - - lib/NfcoreTemplate.groovy + - lib/NfcoreTemplate.groovy nextflow_config: - - config_defaults: - - params.phix_reference - - params.lambda_reference + - config_defaults: + - params.phix_reference + - params.lambda_reference nf_core_version: 3.1.0 repository_type: pipeline template: @@ -16,4 +16,4 @@ template: name: mag org: nf-core outdir: . - version: 3.3.0dev + version: 3.3.0 diff --git a/.prettierignore b/.prettierignore index 437d763d..edd29f01 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,3 +10,4 @@ testing/ testing* *.pyc bin/ +ro-crate-metadata.json diff --git a/CHANGELOG.md b/CHANGELOG.md index c8383add..42737ad9 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.0dev - [date] +## v3.3.0 - [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 0b6c25b1..06da5147 100644 --- a/CITATIONS.md +++ b/CITATIONS.md @@ -12,9 +12,7 @@ - [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/LICENSE b/LICENSE index d90d555c..4502ee82 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) Hadrien Gourlé, Daniel Straub, Sabrina Krakau, James A. Fellows Yates, Maxime Borry +Copyright (c) The nf-core/mag team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index b1f300d1..8f0506ce 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,7 @@ 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) @@ -29,15 +27,12 @@ - - -1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)) -2. Present QC for raw reads ([`MultiQC`](http://multiqc.info/)) +1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/))2. Present QC for raw reads ([`MultiQC`](http://multiqc.info/)) ## 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 a4c656e2..79420f89 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 9485ea88..9beebbc6 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/master/assets/schema_input.json", + "$id": "https://raw.githubusercontent.com/nf-core/mag/main/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/conf/test.config b/conf/test.config index 24ad5b38..d7280238 100644 --- a/conf/test.config +++ b/conf/test.config @@ -25,8 +25,6 @@ params { // Input data // TODO nf-core: Specify the paths to your test data on nf-core/test-datasets // TODO nf-core: Give any required params for the test so that command line flags are not needed - input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' - - // Genome references + input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv'// Genome references genome = 'R64-1-1' } diff --git a/docs/output.md b/docs/output.md index 65e80ff9..ff36398b 100644 --- a/docs/output.md +++ b/docs/output.md @@ -12,8 +12,7 @@ The directories listed below will be created in the results directory after the The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes data using the following steps: -- [FastQC](#fastqc) - Raw read QC -- [MultiQC](#multiqc) - Aggregate report describing results and QC from the whole pipeline +- [FastQC](#fastqc) - Raw read QC- [MultiQC](#multiqc) - Aggregate report describing results and QC from the whole pipeline - [Pipeline information](#pipeline-information) - Report metrics generated during the workflow execution ### FastQC @@ -27,9 +26,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d -[FastQC](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/) gives general quality metrics about your sequenced reads. It provides information about the quality score distribution across your reads, per base sequence content (%A/T/G/C), adapter contamination and overrepresented sequences. For further reading and documentation see the [FastQC help pages](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/). - -### MultiQC +[FastQC](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/) gives general quality metrics about your sequenced reads. It provides information about the quality score distribution across your reads, per base sequence content (%A/T/G/C), adapter contamination and overrepresented sequences. For further reading and documentation see the [FastQC help pages](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/).### MultiQC
Output files @@ -43,9 +40,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d [MultiQC](http://multiqc.info) is a visualization tool that generates a single HTML report summarising all samples in your project. Most of the pipeline QC results are visualised in the report and further statistics are available in the report data directory. -Results generated by MultiQC collate pipeline QC from supported tools e.g. FastQC. The pipeline has special steps which also allow the software versions to be reported in the MultiQC output for future traceability. For more information about how to use MultiQC reports, see . - -### Pipeline information +Results generated by MultiQC collate pipeline QC from supported tools e.g. FastQC. The pipeline has special steps which also allow the software versions to be reported in the MultiQC output for future traceability. For more information about how to use MultiQC reports, see .### Pipeline information
Output files diff --git a/docs/usage.md b/docs/usage.md index 79be2ab9..3d3de1c6 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -130,7 +130,7 @@ Several generic profiles are bundled with the pipeline which instruct the pipeli > [!IMPORTANT] > We highly recommend the use of Docker or Singularity containers for full pipeline reproducibility, however when this is not possible, Conda is also supported. -The pipeline also dynamically loads configurations from [https://github.com/nf-core/configs](https://github.com/nf-core/configs) when it runs, making multiple config profiles for various institutional clusters available at run time. For more information and to check if your system is suported, please see the [nf-core/configs documentation](https://github.com/nf-core/configs#documentation). +The pipeline also dynamically loads configurations from [https://github.com/nf-core/configs](https://github.com/nf-core/configs) when it runs, making multiple config profiles for various institutional clusters available at run time. For more information and to check if your system is supported, please see the [nf-core/configs documentation](https://github.com/nf-core/configs#documentation). Note that multiple profiles can be loaded, for example: `-profile test,docker` - the order of arguments is important! They are loaded in sequence, so later profiles can overwrite earlier profiles. diff --git a/nextflow.config b/nextflow.config index 013de866..a61c5b4d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -273,9 +273,9 @@ manifest { homePage = 'https://github.com/nf-core/mag' description = """Assembly, binning and annotation of metagenomes""" mainScript = 'main.nf' - defaultBranch = 'master' + defaultBranch = 'main' nextflowVersion = '!>=24.04.2' - version = '3.3.0dev' + version = '3.3.0' doi = '' } @@ -307,7 +307,7 @@ validation { https://doi.org/10.1038/s41587-020-0439-x * Software dependencies - https://github.com/nf-core/mag/blob/master/CITATIONS.md + https://github.com/nf-core/mag/blob/main/CITATIONS.md """ } summary { @@ -315,3 +315,6 @@ validation { afterText = validation.help.afterText } } + +// Load modules.config for DSL2 module specific options +includeConfig 'conf/modules.config' diff --git a/nextflow_schema.json b/nextflow_schema.json index 5f022229..9fd246c9 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/master/nextflow_schema.json", + "$id": "https://raw.githubusercontent.com/nf-core/mag/main/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 b54d1610..1e8a6e16 100644 --- a/ro-crate-metadata.json +++ b/ro-crate-metadata.json @@ -21,9 +21,9 @@ { "@id": "./", "@type": "Dataset", - "creativeWorkStatus": "InProgress", - "datePublished": "2024-12-12T11:22:57+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\n\n\n1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/))\n2. 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", + "creativeWorkStatus": "Stable", + "datePublished": "2024-12-20T15:50:33+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", "hasPart": [ { "@id": "main.nf" @@ -99,7 +99,7 @@ }, "mentions": [ { - "@id": "#f5c35f33-89eb-4925-b3dc-fb80b4df13ff" + "@id": "#363fcc6e-14d4-4e9f-a113-1bd2edc23cfd" } ], "name": "nf-core/mag" @@ -121,14 +121,18 @@ }, { "@id": "main.nf", - "@type": ["File", "SoftwareSourceCode", "ComputationalWorkflow"], + "@type": [ + "File", + "SoftwareSourceCode", + "ComputationalWorkflow" + ], "creator": [ { "@id": "https://orcid.org/0000-0001-9807-1082" } ], "dateCreated": "", - "dateModified": "2024-12-12T11:22:57Z", + "dateModified": "2024-12-20T16:50:33Z", "dct:conformsTo": "https://bioschemas.org/profiles/ComputationalWorkflow/1.0-RELEASE/", "keywords": [ "nf-core", @@ -142,21 +146,30 @@ "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/dev/"], - "version": ["3.3.0dev"] + "url": [ + "https://github.com/nf-core/mag", + "https://nf-co.re/mag/3.3.0/" + ], + "version": [ + "3.3.0" + ] }, { "@id": "https://w3id.org/workflowhub/workflow-ro-crate#nextflow", @@ -171,11 +184,11 @@ "version": "!>=24.04.2" }, { - "@id": "#f5c35f33-89eb-4925-b3dc-fb80b4df13ff", + "@id": "#363fcc6e-14d4-4e9f-a113-1bd2edc23cfd", "@type": "TestSuite", "instance": [ { - "@id": "#0df4de77-f6ba-43d7-854f-cdb31291094a" + "@id": "#bc3a6403-7036-414f-b733-d08976d1d9c6" } ], "mainEntity": { @@ -184,7 +197,7 @@ "name": "Test suite for nf-core/mag" }, { - "@id": "#0df4de77-f6ba-43d7-854f-cdb31291094a", + "@id": "#bc3a6403-7036-414f-b733-d08976d1d9c6", "@type": "TestInstance", "name": "GitHub Actions workflow for testing nf-core/mag", "resource": "repos/nf-core/mag/actions/workflows/ci.yml", @@ -319,4 +332,4 @@ "name": "Hadrien Gourl\u00e9" } ] -} +} \ No newline at end of file diff --git a/subworkflows/local/utils_nfcore_mag_pipeline/main.nf b/subworkflows/local/utils_nfcore_mag_pipeline/main.nf index af90a104..15149029 100644 --- a/subworkflows/local/utils_nfcore_mag_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_mag_pipeline/main.nf @@ -117,7 +117,7 @@ workflow PIPELINE_COMPLETION { main: summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") def multiqc_reports = multiqc_report.toList() - + // // Completion email and summary // From d0e1ec8b5cd010f0f29f9b65cdea54551deed1ff Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 20 Dec 2024 16:51:36 +0100 Subject: [PATCH 02/16] Template update for nf-core/tools version 3.1.0 --- ro-crate-metadata.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json index 1e8a6e16..ed22547e 100644 --- a/ro-crate-metadata.json +++ b/ro-crate-metadata.json @@ -22,7 +22,7 @@ "@id": "./", "@type": "Dataset", "creativeWorkStatus": "Stable", - "datePublished": "2024-12-20T15:50:33+00:00", + "datePublished": "2024-12-20T15:51:34+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", "hasPart": [ { @@ -99,7 +99,7 @@ }, "mentions": [ { - "@id": "#363fcc6e-14d4-4e9f-a113-1bd2edc23cfd" + "@id": "#61fc8a70-8352-477b-91fe-e872b9c83a34" } ], "name": "nf-core/mag" @@ -132,7 +132,7 @@ } ], "dateCreated": "", - "dateModified": "2024-12-20T16:50:33Z", + "dateModified": "2024-12-20T16:51:34Z", "dct:conformsTo": "https://bioschemas.org/profiles/ComputationalWorkflow/1.0-RELEASE/", "keywords": [ "nf-core", @@ -184,11 +184,11 @@ "version": "!>=24.04.2" }, { - "@id": "#363fcc6e-14d4-4e9f-a113-1bd2edc23cfd", + "@id": "#61fc8a70-8352-477b-91fe-e872b9c83a34", "@type": "TestSuite", "instance": [ { - "@id": "#bc3a6403-7036-414f-b733-d08976d1d9c6" + "@id": "#9c4d8381-0b65-4e26-8495-b3e9cffdf75b" } ], "mainEntity": { @@ -197,7 +197,7 @@ "name": "Test suite for nf-core/mag" }, { - "@id": "#bc3a6403-7036-414f-b733-d08976d1d9c6", + "@id": "#9c4d8381-0b65-4e26-8495-b3e9cffdf75b", "@type": "TestInstance", "name": "GitHub Actions workflow for testing nf-core/mag", "resource": "repos/nf-core/mag/actions/workflows/ci.yml", From 950e8bcd72d27ed0caa29bb2baf8256d493dae1b Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 20 Dec 2024 16:59:03 +0100 Subject: [PATCH 03/16] Template update for nf-core/tools version 3.1.1 --- .nf-core.yml | 2 +- ro-crate-metadata.json | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.nf-core.yml b/.nf-core.yml index d6b80c0d..ebf94c11 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -5,7 +5,7 @@ lint: - config_defaults: - params.phix_reference - params.lambda_reference -nf_core_version: 3.1.0 +nf_core_version: 3.1.1 repository_type: pipeline template: author: "Hadrien Gourl\xE9, Daniel Straub, Sabrina Krakau, James A. Fellows Yates,\ diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json index ed22547e..e28de57a 100644 --- a/ro-crate-metadata.json +++ b/ro-crate-metadata.json @@ -22,7 +22,7 @@ "@id": "./", "@type": "Dataset", "creativeWorkStatus": "Stable", - "datePublished": "2024-12-20T15:51:34+00:00", + "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", "hasPart": [ { @@ -99,7 +99,7 @@ }, "mentions": [ { - "@id": "#61fc8a70-8352-477b-91fe-e872b9c83a34" + "@id": "#21020cd0-8c47-4a1a-84a3-6e758cb60d64" } ], "name": "nf-core/mag" @@ -132,7 +132,7 @@ } ], "dateCreated": "", - "dateModified": "2024-12-20T16:51:34Z", + "dateModified": "2024-12-20T16:59:00Z", "dct:conformsTo": "https://bioschemas.org/profiles/ComputationalWorkflow/1.0-RELEASE/", "keywords": [ "nf-core", @@ -184,11 +184,11 @@ "version": "!>=24.04.2" }, { - "@id": "#61fc8a70-8352-477b-91fe-e872b9c83a34", + "@id": "#21020cd0-8c47-4a1a-84a3-6e758cb60d64", "@type": "TestSuite", "instance": [ { - "@id": "#9c4d8381-0b65-4e26-8495-b3e9cffdf75b" + "@id": "#acf0ce89-1a77-4ced-8205-a251112f5a94" } ], "mainEntity": { @@ -197,7 +197,7 @@ "name": "Test suite for nf-core/mag" }, { - "@id": "#9c4d8381-0b65-4e26-8495-b3e9cffdf75b", + "@id": "#acf0ce89-1a77-4ced-8205-a251112f5a94", "@type": "TestInstance", "name": "GitHub Actions workflow for testing nf-core/mag", "resource": "repos/nf-core/mag/actions/workflows/ci.yml", From 8175f0f8c3175e2749c5e9e109770b8060baa856 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Thu, 9 Jan 2025 17:10:34 +0100 Subject: [PATCH 04/16] Fix linting --- .nf-core.yml | 8 ++++---- README.md | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.nf-core.yml b/.nf-core.yml index 6db7c5ad..63133597 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1,10 +1,10 @@ lint: files_unchanged: - - lib/NfcoreTemplate.groovy + - lib/NfcoreTemplate.groovy nextflow_config: - - config_defaults: - - params.phix_reference - - params.lambda_reference + - config_defaults: + - params.phix_reference + - params.lambda_reference nf_core_version: 3.1.1 repository_type: pipeline template: diff --git a/README.md b/README.md index b729c542..c5638380 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,6 @@ nf-core/mag workflow overview

- ## Pipeline summary By default, the pipeline currently performs the following: it supports both short and long reads, quality trims the reads and adapters with [fastp](https://github.com/OpenGene/fastp) and [Porechop](https://github.com/rrwick/Porechop), and performs basic QC with [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/), and merge multiple sequencing runs. From f097aa7ba7fdc6b3384c3662a95f3b3a03e9e23e Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Thu, 9 Jan 2025 17:15:00 +0100 Subject: [PATCH 05/16] Fix linting --- assets/multiqc_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index fe5c5b73..5b76f018 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,5 +1,5 @@ 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. report_section_order: From 5ac1004a54816b628676b49b424d45e716d83854 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Sun, 19 Jan 2025 06:26:06 +0000 Subject: [PATCH 06/16] Fix PR template --- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1ffcdcaf..e44a93d1 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 `). From 7ac02b0b075e22be2eea07e571c0059a86699f0b Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Sun, 19 Jan 2025 07:30:30 +0100 Subject: [PATCH 07/16] Apply suggestions from code review --- README.md | 1 + assets/schema_input.json | 2 +- nextflow.config | 4 ++-- nextflow_schema.json | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c5638380..c0f4000d 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ [![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.3589527-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.3589527) [![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com) +[![Cite Publication](https://img.shields.io/badge/Cite%20Us!-Cite%20Publication-orange)](https://doi.org/10.1093/nargab/lqac007) [![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A524.04.2-23aa62.svg)](https://www.nextflow.io/) [![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/) diff --git a/assets/schema_input.json b/assets/schema_input.json index 15e76aa7..01b494b5 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 e54911c3..387fee34 100644 --- a/nextflow.config +++ b/nextflow.config @@ -453,7 +453,7 @@ 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.1dev' doi = '10.1093/nargab/lqac007' @@ -487,7 +487,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 09d068bc..18307b05 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", From 42dd140636ac13d1a7627e65ce7510d74b202bca Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Mon, 20 Jan 2025 14:36:11 +0000 Subject: [PATCH 08/16] 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 1ffcdcaf..e44a93d1 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 e388119e..e2213e03 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 13b51e2c..ab06316e 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 ebf94c11..5ae8e4aa 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 42737ad9..71be1fcf 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 06da5147..0b6c25b1 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 8f0506ce..9a23fd99 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 79420f89..a4c656e2 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 9beebbc6..9485ea88 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 a61c5b4d..ee8d7289 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 9fd246c9..5f022229 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 e28de57a..241911b9 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 09/16] 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 004375b5..1679a584 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 de353a40..3ad2800b 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 10/16] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a37df10..415e9e21 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 11/16] 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 5b76f018..5edd0881 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 701598db..e14432d6 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 de353a40..b074c4b6 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 12/16] 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 b074c4b6..ffe5f8ef 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 13/16] Fix changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 004375b5..feae147e 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 14/16] 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 2e915115..fdbe1282 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 18307b05..9159bb86 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 ad33b56f..abcee2c3 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 254658ec..a8c6dfd2 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 3ad2800b..5b424d62 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 15/16] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d6af54d..81044ea8 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 16/16] [automated] Fix code linting --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81044ea8..ca448d2b 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`