diff --git a/.editorconfig b/.editorconfig index 2f879321..72dda289 100644 --- a/.editorconfig +++ b/.editorconfig @@ -28,14 +28,6 @@ indent_style = unset [/assets/email*] indent_size = unset -# ignore Readme -[README.md] -indent_style = unset - -# ignore Changelog -[CHANGELOG.md] -indent_style = unset - -# ignore python +# ignore python and markdown [*.{py,md}] indent_style = unset diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fc403ae6..c7a4cea8 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -18,7 +18,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/vira - [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/viralrecon/tree/master/.github/CONTRIBUTING.md) - [ ] If necessary, also make a PR on the nf-core/viralrecon _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository. - [ ] Make sure your code lints (`nf-core lint`). -- [ ] Ensure the test suite passes (`nf-test test main.nf.test -profile test,docker`). +- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir `). - [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir `). - [ ] Usage Documentation in `docs/usage.md` is updated. - [ ] Output Documentation in `docs/output.md` is updated. diff --git a/.github/workflows/awsfulltest.yml b/.github/workflows/awsfulltest.yml index 49ad9e39..f993b2e3 100644 --- a/.github/workflows/awsfulltest.yml +++ b/.github/workflows/awsfulltest.yml @@ -8,7 +8,7 @@ on: types: [published] workflow_dispatch: jobs: - run-tower: + run-platform: name: Run AWS full tests if: github.repository == 'nf-core/viralrecon' runs-on: ubuntu-latest @@ -17,7 +17,7 @@ jobs: matrix: platform: ["illumina", "nanopore"] steps: - - name: Launch workflow via tower + - name: Launch workflow via Seqera Platform uses: seqeralabs/action-tower-launch@v2 with: workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }} @@ -33,7 +33,7 @@ jobs: profiles: test_full_${{ matrix.platform }},aws_tower - uses: actions/upload-artifact@v4 with: - name: Tower debug log file + name: Seqera Platform debug log file path: | - tower_action_*.log - tower_action_*.json + seqera_platform_action_*.log + seqera_platform_action_*.json diff --git a/.github/workflows/awstest.yml b/.github/workflows/awstest.yml index e3fa47eb..1b8b29e5 100644 --- a/.github/workflows/awstest.yml +++ b/.github/workflows/awstest.yml @@ -5,13 +5,13 @@ name: nf-core AWS test on: workflow_dispatch: jobs: - run-tower: + run-platform: name: Run AWS tests if: github.repository == 'nf-core/viralrecon' runs-on: ubuntu-latest steps: - # Launch workflow using Tower CLI tool action - - name: Launch workflow via tower + # Launch workflow using Seqera Platform CLI tool action + - name: Launch workflow via Seqera Platform uses: seqeralabs/action-tower-launch@v2 with: workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }} @@ -27,7 +27,7 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: Tower debug log file + name: Seqera Platform debug log file path: | - tower_action_*.log - tower_action_*.json + seqera_platform_action_*.log + seqera_platform_action_*.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a55943f..31ad830b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - "latest-everything" steps: - name: Check out pipeline code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - name: Free some space run: | @@ -40,7 +40,7 @@ jobs: uses: jlumbroso/free-disk-space@v1.3.1 - name: Install Nextflow - uses: nf-core/setup-nextflow@v1 + uses: nf-core/setup-nextflow@v2 with: version: "${{ matrix.NXF_VER }}" @@ -125,7 +125,7 @@ jobs: strategy: matrix: parameters: - - "--gff false" + - "--gff false --freyja_depthcutoff 1" - "--additional_annotation ./GCA_009858895.3_ASM985889v3_genomic.gtf.gz" - "--input false" - "--min_barcode_reads 10000" diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml index 08622fd5..2d20d644 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -14,6 +14,8 @@ on: pull_request: types: - opened + - edited + - synchronize branches: - master pull_request_target: @@ -28,11 +30,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Nextflow - uses: nf-core/setup-nextflow@v1 + uses: nf-core/setup-nextflow@v2 - - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 + - name: Disk space cleanup + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 with: - python-version: "3.11" + python-version: "3.12" architecture: "x64" - uses: eWaterCycle/setup-singularity@931d4e31109e875b13309ae1d07c70ca8fbc8537 # v7 with: @@ -65,8 +70,17 @@ jobs: - name: Inspect download run: tree ./${{ env.REPOTITLE_LOWERCASE }} - - name: Run the downloaded pipeline + - name: Run the downloaded pipeline (stub) + id: stub_run_pipeline + continue-on-error: true env: NXF_SINGULARITY_CACHEDIR: ./ NXF_SINGULARITY_HOME_MOUNT: true run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results + - name: Run the downloaded pipeline (stub run not supported) + id: run_pipeline + if: ${{ job.steps.stub_run_pipeline.status == failure() }} + env: + NXF_SINGULARITY_CACHEDIR: ./ + NXF_SINGULARITY_HOME_MOUNT: true + run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -profile test,singularity --outdir ./results diff --git a/.github/workflows/fix-linting.yml b/.github/workflows/fix-linting.yml index 7425a84b..85c55435 100644 --- a/.github/workflows/fix-linting.yml +++ b/.github/workflows/fix-linting.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: # Use the @nf-core-bot token to check out so we can push later - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 with: token: ${{ secrets.nf_core_bot_auth_token }} @@ -32,9 +32,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }} # Install and run pre-commit - - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 with: - python-version: 3.11 + python-version: "3.12" - name: Install pre-commit run: pip install pre-commit diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 073e1876..1fcafe88 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -14,13 +14,12 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - - name: Set up Python 3.11 - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 + - name: Set up Python 3.12 + uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 with: - python-version: 3.11 - cache: "pip" + python-version: "3.12" - name: Install pre-commit run: pip install pre-commit @@ -32,14 +31,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out pipeline code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - name: Install Nextflow - uses: nf-core/setup-nextflow@v1 + uses: nf-core/setup-nextflow@v2 - - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 with: - python-version: "3.11" + python-version: "3.12" architecture: "x64" - name: Install dependencies @@ -60,7 +59,7 @@ jobs: - name: Upload linting log file artifact if: ${{ always() }} - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4 + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 with: name: linting-logs path: | diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml index b706875f..40acc23f 100644 --- a/.github/workflows/linting_comment.yml +++ b/.github/workflows/linting_comment.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download lint results - uses: dawidd6/action-download-artifact@f6b0bace624032e30a85a8fd9c1a7f8f611f5737 # v3 + uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3 with: workflow: linting.yml workflow_conclusion: completed diff --git a/.github/workflows/release-announcements.yml b/.github/workflows/release-announcements.yml index d468aeaa..03ecfcf7 100644 --- a/.github/workflows/release-announcements.yml +++ b/.github/workflows/release-announcements.yml @@ -12,7 +12,7 @@ jobs: - name: get topics and convert to hashtags id: get_topics run: | - curl -s https://nf-co.re/pipelines.json | jq -r '.remote_workflows[] | select(.full_name == "${{ github.repository }}") | .topics[]' | awk '{print "#"$0}' | tr '\n' ' ' >> $GITHUB_OUTPUT + echo "topics=$(curl -s https://nf-co.re/pipelines.json | jq -r '.remote_workflows[] | select(.full_name == "${{ github.repository }}") | .topics[]' | awk '{print "#"$0}' | tr '\n' ' ')" >> $GITHUB_OUTPUT - uses: rzr/fediverse-action@master with: @@ -25,13 +25,13 @@ jobs: Please see the changelog: ${{ github.event.release.html_url }} - ${{ steps.get_topics.outputs.GITHUB_OUTPUT }} #nfcore #openscience #nextflow #bioinformatics + ${{ steps.get_topics.outputs.topics }} #nfcore #openscience #nextflow #bioinformatics send-tweet: runs-on: ubuntu-latest steps: - - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 with: python-version: "3.10" - name: Install dependencies diff --git a/.nf-core.yml b/.nf-core.yml index 40bcac74..3782ced8 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1,6 +1,6 @@ repository_type: pipeline +nf_core_version: "2.14.1" lint: files_unchanged: - assets/email_template.html - assets/email_template.txt - - lib/NfcoreTemplate.groovy diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index af57081f..4dc0f1dc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,6 +3,9 @@ repos: rev: "v3.1.0" hooks: - id: prettier + additional_dependencies: + - prettier@3.2.5 + - repo: https://github.com/editorconfig-checker/editorconfig-checker.python rev: "2.7.3" hooks: diff --git a/README.md b/README.md index f4b3dd9d..95c8f301 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ [![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/) [![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/) [![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/) -[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://tower.nf/launch?pipeline=https://github.com/nf-core/viralrecon) +[![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/viralrecon) [![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23viralrecon-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/viralrecon)[![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) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml new file mode 100644 index 00000000..64d28a63 --- /dev/null +++ b/assets/multiqc_config.yml @@ -0,0 +1,15 @@ +report_comment: > + This report has been generated by the nf-core/viralrecon + analysis pipeline. For information about how to interpret these results, please see the + documentation. +report_section_order: + "nf-core-viralrecon-methods-description": + order: -1000 + software_versions: + order: -1001 + "nf-core-viralrecon-summary": + order: -1002 + +export_plots: true + +disable_version_detection: true diff --git a/conf/base.config b/conf/base.config index 5d954310..73ed4d11 100644 --- a/conf/base.config +++ b/conf/base.config @@ -57,7 +57,4 @@ process { errorStrategy = 'retry' maxRetries = 2 } - withName:CUSTOM_DUMPSOFTWAREVERSIONS { - cache = false - } } diff --git a/conf/modules.config b/conf/modules.config index 048ae623..c7b907d6 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -21,23 +21,6 @@ process { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - withName: 'SAMPLESHEET_CHECK' { - publishDir = [ - path: { "${params.outdir}/pipeline_info" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - - withName: 'CUSTOM_DUMPSOFTWAREVERSIONS' { - publishDir = [ - path: { "${params.outdir}/pipeline_info" }, - mode: params.publish_dir_mode, - pattern: '*_versions.yml' - ] - } -} - withName: 'MULTIQC' { ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } publishDir = [ @@ -46,6 +29,7 @@ process { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } +} if (params.platform == 'nanopore') { includeConfig 'modules_nanopore.config' diff --git a/conf/test.config b/conf/test.config index c3d1b51a..bcebb448 100644 --- a/conf/test.config +++ b/conf/test.config @@ -20,7 +20,7 @@ params { max_time = '6.h' // Input data to test amplicon analysis - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/v2.6/samplesheet_test_amplicon_illumina.csv' + input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/v2.6/samplesheet_test_amplicon_illumina.csv' platform = 'illumina' protocol = 'amplicon' primer_set = 'artic' diff --git a/conf/test_full.config b/conf/test_full.config index 3703af44..5382ff51 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -15,7 +15,7 @@ params { config_profile_description = 'Full test dataset to check pipeline function' // Input data for full test of amplicon analysis - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/v2.6/samplesheet_full_amplicon_illumina.csv' + input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/v2.6/samplesheet_full_amplicon_illumina.csv' platform = 'illumina' protocol = 'amplicon' primer_set = 'artic' diff --git a/docs/usage.md b/docs/usage.md index ac7f5e5b..ed2387d7 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -282,6 +282,8 @@ If `-profile` is not specified, the pipeline will run locally and expect all sof - A generic configuration profile to be used with [Charliecloud](https://hpc.github.io/charliecloud/) - `apptainer` - A generic configuration profile to be used with [Apptainer](https://apptainer.org/) +- `wave` + - A generic configuration profile to enable [Wave](https://seqera.io/wave/) containers. Use together with one of the above (requires Nextflow ` 24.03.0-edge` or later). - `conda` - A generic configuration profile to be used with [Conda](https://conda.io/docs/). Please only use Conda as a last resort i.e. when it's not possible to run the pipeline with Docker, Singularity, Podman, Shifter, Charliecloud, or Apptainer. diff --git a/modules.json b/modules.json index b529c5b6..02ef0a88 100644 --- a/modules.json +++ b/modules.json @@ -37,7 +37,7 @@ }, "bcftools/mpileup": { "branch": "master", - "git_sha": "44096c08ffdbc694f5f92ae174ea0f7ba0f37e09", + "git_sha": "e7df38a545d7d72083eededabd8849f731a01502", "installed_by": ["modules"] }, "bcftools/norm": { @@ -52,7 +52,7 @@ }, "bcftools/sort": { "branch": "master", - "git_sha": "487d92367b4d7bb9f1ca694bf72736be90720b15", + "git_sha": "b42fec6f7c6e5d0716685cabb825ef6bf6e386b5", "installed_by": ["modules"] }, "bcftools/stats": { @@ -62,7 +62,7 @@ }, "bedtools/getfasta": { "branch": "master", - "git_sha": "3b248b84694d1939ac4bb33df84bf6233a34d668", + "git_sha": "cdcdd5e3d806f0ff3983c40c69e0b07bb44ec299", "installed_by": ["modules"] }, "bedtools/maskfasta": { @@ -97,7 +97,7 @@ }, "cat/fastq": { "branch": "master", - "git_sha": "0997b47c93c06b49aa7b3fefda87e728312cf2ca", + "git_sha": "4fc983ad0b30e6e32696fa7d980c76c7bfe1c03e", "installed_by": ["modules"] }, "custom/getchromsizes": { @@ -167,12 +167,12 @@ }, "mosdepth": { "branch": "master", - "git_sha": "30d3ca4346ae38f0de821c57a9c517b8b0b135d6", + "git_sha": "e0616fba0919adb190bfe070d17fb12d76ba3a26", "installed_by": ["modules"] }, "nanoplot": { "branch": "master", - "git_sha": "a31407dfaf0cb0d04768d5cb439fc6f4523a6981", + "git_sha": "3135090b46f308a260fc9d5991d7d2f9c0785309", "installed_by": ["modules"] }, "nextclade/datasetget": { diff --git a/modules/nf-core/bcftools/mpileup/main.nf b/modules/nf-core/bcftools/mpileup/main.nf index 5e57644a..6bf8bc2d 100644 --- a/modules/nf-core/bcftools/mpileup/main.nf +++ b/modules/nf-core/bcftools/mpileup/main.nf @@ -55,4 +55,18 @@ process BCFTOOLS_MPILEUP { bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bcftools_stats.txt + echo "" | gzip > ${prefix}.vcf.gz + touch ${prefix}.vcf.gz.tbi + echo "" | gzip > ${prefix}.mpileup.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/nf-core/bcftools/mpileup/tests/main.nf.test b/modules/nf-core/bcftools/mpileup/tests/main.nf.test index 6478bbc2..dc35c542 100644 --- a/modules/nf-core/bcftools/mpileup/tests/main.nf.test +++ b/modules/nf-core/bcftools/mpileup/tests/main.nf.test @@ -33,13 +33,43 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.vcf, - process.out.tbi, - process.out.stats, - process.out.mpileup, - process.out.versions - ).match() } + { assert snapshot(file(process.out.vcf[0][1]).name).match("bam_fasta_false.vcf.gz") }, + { assert snapshot(file(process.out.tbi[0][1]).name).match("bam_fasta_false.vcf.gz.tbi") }, + { assert snapshot(file(process.out.stats[0][1]).name).match("bam_fasta_false.bcftools_stats.txt") }, + { assert snapshot(process.out.versions).match("bam_fasta_false_versions") } + ) + } + + } + + test("sarscov2 - [bam, []], fasta, false stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + [] + ] + input[1] = [ + [ id:'sarscov2' ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + input[2] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.vcf[0][1]).name).match("bam_fasta_false_stub.vcf.gz") }, + { assert snapshot(file(process.out.tbi[0][1]).name).match("bam_fasta_false_stub.vcf.gz.tbi") }, + { assert snapshot(file(process.out.stats[0][1]).name).match("bam_fasta_false_stub.bcftools_stats.txt") }, + { assert snapshot(process.out.versions).match("bam_fasta_false_stub_versions") } ) } @@ -67,13 +97,45 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.vcf, - process.out.tbi, - process.out.stats, - process.out.mpileup, - process.out.versions - ).match() } + { assert snapshot(file(process.out.vcf[0][1]).name).match("bam_bed_fasta_true_stub.vcf.gz") }, + { assert snapshot(file(process.out.tbi[0][1]).name).match("bam_bed_fasta_true_stub.vcf.gz.tbi") }, + { assert snapshot(file(process.out.stats[0][1]).name).match("bam_bed_fasta_true_stub.bcftools_stats.txt") }, + { assert snapshot(file(process.out.mpileup[0][1]).name).match("bam_bed_fasta_true_stub.mpileup.gz") }, + { assert snapshot(process.out.versions).match("bam_bed_fasta_true_stub_versions") } + ) + } + + } + + test("sarscov2 - [bam, []], fasta, true stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + [] + ] + input[1] = [ + [ id:'sarscov2' ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + input[2] = true + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.vcf[0][1]).name).match("bam_bed_fasta_true.vcf.gz") }, + { assert snapshot(file(process.out.tbi[0][1]).name).match("bam_bed_fasta_true.vcf.gz.tbi") }, + { assert snapshot(file(process.out.stats[0][1]).name).match("bam_bed_fasta_true.bcftools_stats.txt") }, + { assert snapshot(file(process.out.mpileup[0][1]).name).match("bam_bed_fasta_true.mpileup.gz") }, + { assert snapshot(process.out.versions).match("bam_bed_fasta_true_versions") } ) } @@ -101,13 +163,43 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.vcf, - process.out.tbi, - process.out.stats, - process.out.mpileup, - process.out.versions - ).match() } + { assert snapshot(file(process.out.vcf[0][1]).name).match("bam_bed_fasta_false.vcf.gz") }, + { assert snapshot(file(process.out.tbi[0][1]).name).match("bam_bed_fasta_false.vcf.gz.tbi") }, + { assert snapshot(file(process.out.stats[0][1]).name).match("bam_bed_fasta_false.bcftools_stats.txt") }, + { assert snapshot(process.out.versions).match("bam_bed_fasta_false_versions") } + ) + } + + } + + test("sarscov2 - [bam, bed], fasta, false stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) + ] + input[1] = [ + [ id:'sarscov2' ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + input[2] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.vcf[0][1]).name).match("bam_bed_fasta_false_stub.vcf.gz") }, + { assert snapshot(file(process.out.tbi[0][1]).name).match("bam_bed_fasta_false_stub.vcf.gz.tbi") }, + { assert snapshot(file(process.out.stats[0][1]).name).match("bam_bed_fasta_false_stub.bcftools_stats.txt") }, + { assert snapshot(process.out.versions).match("bam_bed_fasta_false_stub_versions") } ) } diff --git a/modules/nf-core/bcftools/mpileup/tests/main.nf.test.snap b/modules/nf-core/bcftools/mpileup/tests/main.nf.test.snap index ef80ab1b..8b8d5eab 100644 --- a/modules/nf-core/bcftools/mpileup/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/mpileup/tests/main.nf.test.snap @@ -1,112 +1,274 @@ { - "sarscov2 - [bam, []], fasta, true": { + "bam_bed_fasta_true.vcf.gz.tbi": { + "content": [ + "test.vcf.gz.tbi" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:45.172966" + }, + "bam_bed_fasta_false_stub.vcf.gz": { + "content": [ + "test.vcf.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:57.815085" + }, + "bam_fasta_false_stub.vcf.gz.tbi": { + "content": [ + "test.vcf.gz.tbi" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:39:15.731277" + }, + "bam_bed_fasta_false_stub.bcftools_stats.txt": { + "content": [ + "test.bcftools_stats.txt" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:57.844573" + }, + "bam_bed_fasta_true_stub.mpileup.gz": { + "content": [ + "test.mpileup.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:39.462382" + }, + "bam_bed_fasta_true.vcf.gz": { + "content": [ + "test.vcf.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:45.146525" + }, + "bam_bed_fasta_true_stub.vcf.gz": { + "content": [ + "test.vcf.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:39.42754" + }, + "bam_fasta_false_versions": { "content": [ - [ - [ - { - "id": "test" - }, - "test.vcf.gz:md5,0f2f2c8488e97e7f13979380d5d3b6b5" - ] - ], - [ - [ - { - "id": "test" - }, - "test.vcf.gz.tbi:md5,34cb2eeb73f4d2b98218acecebd92704" - ] - ], - [ - [ - { - "id": "test" - }, - "test.bcftools_stats.txt:md5,a988fbcd2ea5d1ce30970dcb60a77ed7" - ] - ], - [ - [ - { - "id": "test" - }, - "test.mpileup.gz:md5,73b4a00398bddab2cd065b40d17ca4dc" - ] - ], [ "versions.yml:md5,e09c59d941374bb293aadc36e2f29dbf" ] ], - "timestamp": "2023-11-29T14:11:54.549517279" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:39:10.137483" }, - "sarscov2 - [bam, bed], fasta, false": { + "bam_fasta_false_stub.bcftools_stats.txt": { + "content": [ + "test.bcftools_stats.txt" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:39:15.746204" + }, + "bam_bed_fasta_false_versions": { "content": [ - [ - [ - { - "id": "test" - }, - "test.vcf.gz:md5,687244dbf71d05b3b973ab08ecf05310" - ] - ], - [ - [ - { - "id": "test" - }, - "test.vcf.gz.tbi:md5,3785df15f3d7faf35f3ad70d167a50f7" - ] - ], - [ - [ - { - "id": "test" - }, - "test.bcftools_stats.txt:md5,f8c5ab149c4bf0e5f51c518346cb87b5" - ] - ], - [ - - ], [ "versions.yml:md5,e09c59d941374bb293aadc36e2f29dbf" ] ], - "timestamp": "2023-11-29T14:12:00.865439661" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:51.772936" }, - "sarscov2 - [bam, []], fasta, false": { + "bam_bed_fasta_false.vcf.gz": { + "content": [ + "test.vcf.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:51.72798" + }, + "bam_bed_fasta_true_versions": { "content": [ [ - [ - { - "id": "test" - }, - "test.vcf.gz:md5,0f2f2c8488e97e7f13979380d5d3b6b5" - ] - ], - [ - [ - { - "id": "test" - }, - "test.vcf.gz.tbi:md5,34cb2eeb73f4d2b98218acecebd92704" - ] - ], + "versions.yml:md5,e09c59d941374bb293aadc36e2f29dbf" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:45.20135" + }, + "bam_fasta_false.vcf.gz": { + "content": [ + "test.vcf.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:39:10.051991" + }, + "bam_fasta_false.bcftools_stats.txt": { + "content": [ + "test.bcftools_stats.txt" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:39:10.123726" + }, + "bam_bed_fasta_false.bcftools_stats.txt": { + "content": [ + "test.bcftools_stats.txt" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:51.761517" + }, + "bam_bed_fasta_false_stub.vcf.gz.tbi": { + "content": [ + "test.vcf.gz.tbi" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:57.832271" + }, + "bam_bed_fasta_false.vcf.gz.tbi": { + "content": [ + "test.vcf.gz.tbi" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:51.748389" + }, + "bam_fasta_false_stub.vcf.gz": { + "content": [ + "test.vcf.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:39:15.709802" + }, + "bam_bed_fasta_true_stub.bcftools_stats.txt": { + "content": [ + "test.bcftools_stats.txt" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:39.453121" + }, + "bam_fasta_false.vcf.gz.tbi": { + "content": [ + "test.vcf.gz.tbi" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:39:10.108027" + }, + "bam_fasta_false_stub_versions": { + "content": [ [ - [ - { - "id": "test" - }, - "test.bcftools_stats.txt:md5,a988fbcd2ea5d1ce30970dcb60a77ed7" - ] - ], + "versions.yml:md5,e09c59d941374bb293aadc36e2f29dbf" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:39:15.770612" + }, + "bam_bed_fasta_true.bcftools_stats.txt": { + "content": [ + "test.bcftools_stats.txt" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:45.18304" + }, + "bam_bed_fasta_true_stub.vcf.gz.tbi": { + "content": [ + "test.vcf.gz.tbi" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:39.442077" + }, + "bam_bed_fasta_false_stub_versions": { + "content": [ [ - - ], + "versions.yml:md5,e09c59d941374bb293aadc36e2f29dbf" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:57.868309" + }, + "bam_bed_fasta_true.mpileup.gz": { + "content": [ + "test.mpileup.gz" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:45.192888" + }, + "bam_bed_fasta_true_stub_versions": { + "content": [ [ "versions.yml:md5,e09c59d941374bb293aadc36e2f29dbf" ] ], - "timestamp": "2023-11-29T14:11:47.814900494" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-22T18:37:39.470988" } } \ No newline at end of file diff --git a/modules/nf-core/bcftools/sort/main.nf b/modules/nf-core/bcftools/sort/main.nf index c982944c..246148d6 100644 --- a/modules/nf-core/bcftools/sort/main.nf +++ b/modules/nf-core/bcftools/sort/main.nf @@ -49,9 +49,9 @@ process BCFTOOLS_SORT { args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" : args.contains("--output-type v") || args.contains("-Ov") ? "vcf" : "vcf" - + def create_cmd = extension.endsWith(".gz") ? "echo '' | gzip >" : "touch" """ - touch ${prefix}.${extension} + ${create_cmd} ${prefix}.${extension} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/bcftools/sort/tests/main.nf.test b/modules/nf-core/bcftools/sort/tests/main.nf.test index fec59cfe..8a496dda 100644 --- a/modules/nf-core/bcftools/sort/tests/main.nf.test +++ b/modules/nf-core/bcftools/sort/tests/main.nf.test @@ -9,7 +9,29 @@ nextflow_process { tag "bcftools" tag "bcftools/sort" - test("SarsCov2 VCF") { + test("sarscov2 - vcf") { + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match("vcf") } + ) + } + + } + + test("sarscov2 - vcf - stub") { + options "-stub" when { process { """ diff --git a/modules/nf-core/bcftools/sort/tests/main.nf.test.snap b/modules/nf-core/bcftools/sort/tests/main.nf.test.snap index 7f599559..6200cc42 100644 --- a/modules/nf-core/bcftools/sort/tests/main.nf.test.snap +++ b/modules/nf-core/bcftools/sort/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "SarsCov2 VCF": { + "vcf": { "content": [ { "0": [ @@ -28,8 +28,41 @@ ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.04.2" + "nextflow": "24.03.0" }, - "timestamp": "2024-03-18T12:50:10.340362246" + "timestamp": "2024-05-02T16:55:21.237927554" + }, + "sarscov2 - vcf - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + "versions.yml:md5,622bd32d4ff0fac3360cd534ae0f0168" + ], + "vcf": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,622bd32d4ff0fac3360cd534ae0f0168" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.03.0" + }, + "timestamp": "2024-05-03T12:32:50.506309198" } } \ No newline at end of file diff --git a/modules/nf-core/bedtools/getfasta/main.nf b/modules/nf-core/bedtools/getfasta/main.nf index 50549c7d..b316117d 100644 --- a/modules/nf-core/bedtools/getfasta/main.nf +++ b/modules/nf-core/bedtools/getfasta/main.nf @@ -1,5 +1,5 @@ process BEDTOOLS_GETFASTA { - tag "$bed" + tag "$meta.id" label 'process_single' conda "${moduleDir}/environment.yml" @@ -8,19 +8,20 @@ process BEDTOOLS_GETFASTA { 'biocontainers/bedtools:2.31.1--hf5e1c6e_0' }" input: - path bed + tuple val(meta), path(bed) path fasta output: - path "*.fa" , emit: fasta - path "versions.yml" , emit: versions + tuple val(meta), path("*.fa"), emit: fasta + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${bed.baseName}" + def prefix = task.ext.prefix ?: "${meta.id}" + if ("$fasta" == "${prefix}.fa") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ bedtools \\ getfasta \\ @@ -34,4 +35,16 @@ process BEDTOOLS_GETFASTA { bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + if ("$fasta" == "${prefix}.fa") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" + """ + touch ${prefix}.fa + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") + END_VERSIONS + """ } diff --git a/modules/nf-core/bedtools/getfasta/meta.yml b/modules/nf-core/bedtools/getfasta/meta.yml index 25fb19a1..41917fe3 100644 --- a/modules/nf-core/bedtools/getfasta/meta.yml +++ b/modules/nf-core/bedtools/getfasta/meta.yml @@ -8,9 +8,14 @@ tools: - bedtools: description: | A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. - documentation: https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/getfasta.html licence: ["MIT"] input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - bed: type: file description: Bed feature file @@ -20,6 +25,11 @@ input: description: Input fasta file pattern: "*.{fa,fasta}" output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - fasta: type: file description: Output fasta file with extracted sequences diff --git a/modules/nf-core/bedtools/getfasta/tests/main.nf.test b/modules/nf-core/bedtools/getfasta/tests/main.nf.test new file mode 100644 index 00000000..4da7552c --- /dev/null +++ b/modules/nf-core/bedtools/getfasta/tests/main.nf.test @@ -0,0 +1,62 @@ +nextflow_process { + + name "Test Process BEDTOOLS_GETFASTA" + script "../main.nf" + process "BEDTOOLS_GETFASTA" + + tag "modules" + tag "modules_nfcore" + tag "bedtools" + tag "bedtools/getfasta" + + test("sarscov2 - bed - fasta") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false], + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true), + ] + + input[1] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - bed - fasta - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false], + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true), + ] + + input[1] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/bedtools/getfasta/tests/main.nf.test.snap b/modules/nf-core/bedtools/getfasta/tests/main.nf.test.snap new file mode 100644 index 00000000..69bf33f7 --- /dev/null +++ b/modules/nf-core/bedtools/getfasta/tests/main.nf.test.snap @@ -0,0 +1,72 @@ +{ + "sarscov2 - bed - fasta": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fa:md5,41c3a45a57a16c04f828d8f8bb52df70" + ] + ], + "1": [ + "versions.yml:md5,427b4f64b2f05f28f0beef96c9f0d310" + ], + "fasta": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fa:md5,41c3a45a57a16c04f828d8f8bb52df70" + ] + ], + "versions": [ + "versions.yml:md5,427b4f64b2f05f28f0beef96c9f0d310" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-03T14:16:19.383758985" + }, + "sarscov2 - bed - fasta - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fa:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,427b4f64b2f05f28f0beef96c9f0d310" + ], + "fasta": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fa:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,427b4f64b2f05f28f0beef96c9f0d310" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-03T14:16:47.47010536" + } +} \ No newline at end of file diff --git a/modules/nf-core/bedtools/getfasta/tests/tags.yml b/modules/nf-core/bedtools/getfasta/tests/tags.yml new file mode 100644 index 00000000..42ec3026 --- /dev/null +++ b/modules/nf-core/bedtools/getfasta/tests/tags.yml @@ -0,0 +1,2 @@ +bedtools/getfasta: + - "modules/nf-core/bedtools/getfasta/**" diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test b/modules/nf-core/cat/fastq/tests/main.nf.test index dab2e14c..a71dcb8d 100644 --- a/modules/nf-core/cat/fastq/tests/main.nf.test +++ b/modules/nf-core/cat/fastq/tests/main.nf.test @@ -1,3 +1,5 @@ +// NOTE The version snaps may not be consistant +// https://github.com/nf-core/modules/pull/4087#issuecomment-1767948035 nextflow_process { name "Test Process CAT_FASTQ" diff --git a/modules/nf-core/mosdepth/environment.yml b/modules/nf-core/mosdepth/environment.yml index 88c7126c..bcb9d64a 100644 --- a/modules/nf-core/mosdepth/environment.yml +++ b/modules/nf-core/mosdepth/environment.yml @@ -5,4 +5,4 @@ channels: - defaults dependencies: # renovate: datasource=conda depName=bioconda/mosdepth - - mosdepth=0.3.6 + - mosdepth=0.3.8 diff --git a/modules/nf-core/mosdepth/main.nf b/modules/nf-core/mosdepth/main.nf index 0190a09d..6f4a8383 100644 --- a/modules/nf-core/mosdepth/main.nf +++ b/modules/nf-core/mosdepth/main.nf @@ -4,8 +4,8 @@ process MOSDEPTH { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mosdepth:0.3.6--hd299d5a_0' : - 'biocontainers/mosdepth:0.3.6--hd299d5a_0'}" + 'https://depot.galaxyproject.org/singularity/mosdepth:0.3.8--hd299d5a_0' : + 'biocontainers/mosdepth:0.3.8--hd299d5a_0'}" input: tuple val(meta), path(bam), path(bai), path(bed) diff --git a/modules/nf-core/mosdepth/tests/main.nf.test.snap b/modules/nf-core/mosdepth/tests/main.nf.test.snap index 00f4cd97..c604540b 100644 --- a/modules/nf-core/mosdepth/tests/main.nf.test.snap +++ b/modules/nf-core/mosdepth/tests/main.nf.test.snap @@ -39,7 +39,7 @@ ] ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ [ @@ -222,15 +222,15 @@ ] ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-03-28T12:29:04.084192" + "timestamp": "2024-04-29T13:33:16.953408231" }, "homo_sapiens - cram, crai, bed": { "content": [ @@ -260,7 +260,7 @@ ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ [ @@ -289,7 +289,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "6": [ @@ -307,7 +307,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,47669cfe41f3e222e74d81e1b1be191f" + "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" ] ], "8": [ @@ -340,7 +340,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "per_base_d4": [ @@ -367,7 +367,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,47669cfe41f3e222e74d81e1b1be191f" + "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" ] ], "regions_txt": [ @@ -395,15 +395,15 @@ ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-03-28T12:28:16.664319" + "timestamp": "2024-04-29T13:32:50.160217828" }, "homo_sapiens - bam, bai, [] - quantized": { "content": [ @@ -433,7 +433,7 @@ ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ @@ -456,7 +456,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "6": [ @@ -480,7 +480,7 @@ "id": "test", "single_end": true }, - "test.quantized.bed.gz.csi:md5,be9617f551f19a33923f1e886eaefb93" + "test.quantized.bed.gz.csi:md5,4f69e6ace50206a2768be66ded3a56f0" ] ], "global_txt": [ @@ -507,7 +507,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "per_base_d4": [ @@ -528,7 +528,7 @@ "id": "test", "single_end": true }, - "test.quantized.bed.gz.csi:md5,be9617f551f19a33923f1e886eaefb93" + "test.quantized.bed.gz.csi:md5,4f69e6ace50206a2768be66ded3a56f0" ] ], "regions_bed": [ @@ -556,15 +556,15 @@ ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-03-28T12:28:35.978752" + "timestamp": "2024-04-29T13:33:01.164885111" }, "homo_sapiens - bam, bai, bed": { "content": [ @@ -594,7 +594,7 @@ ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ [ @@ -623,7 +623,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "6": [ @@ -641,7 +641,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,47669cfe41f3e222e74d81e1b1be191f" + "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" ] ], "8": [ @@ -674,7 +674,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "per_base_d4": [ @@ -701,7 +701,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,47669cfe41f3e222e74d81e1b1be191f" + "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" ] ], "regions_txt": [ @@ -729,15 +729,15 @@ ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-03-28T12:27:55.598384" + "timestamp": "2024-04-29T13:32:39.071657456" }, "homo_sapiens - bam, bai, [] - window": { "content": [ @@ -767,7 +767,7 @@ ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ [ @@ -775,7 +775,7 @@ "id": "test", "single_end": true }, - "test.mosdepth.region.dist.txt:md5,39e0e707ec32feb5176fd20a95f1f468" + "test.mosdepth.region.dist.txt:md5,0b6ea9f0da1228252d9aef2d3b6f7f76" ] ], "3": [ @@ -796,7 +796,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "6": [ @@ -814,7 +814,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,257d67678136963d9dd904330079609d" + "test.regions.bed.gz.csi:md5,2a30bcb7f5c7632136b3efce24723970" ] ], "8": [ @@ -847,7 +847,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "per_base_d4": [ @@ -874,7 +874,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,257d67678136963d9dd904330079609d" + "test.regions.bed.gz.csi:md5,2a30bcb7f5c7632136b3efce24723970" ] ], "regions_txt": [ @@ -883,7 +883,7 @@ "id": "test", "single_end": true }, - "test.mosdepth.region.dist.txt:md5,39e0e707ec32feb5176fd20a95f1f468" + "test.mosdepth.region.dist.txt:md5,0b6ea9f0da1228252d9aef2d3b6f7f76" ] ], "summary_txt": [ @@ -902,15 +902,15 @@ ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-03-28T12:28:26.37386" + "timestamp": "2024-04-29T13:32:55.631776118" }, "homo_sapiens - bam, bai, []": { "content": [ @@ -940,7 +940,7 @@ ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ @@ -963,7 +963,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "6": [ @@ -1002,7 +1002,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "per_base_d4": [ @@ -1039,15 +1039,15 @@ ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-03-28T12:27:44.658599" + "timestamp": "2024-04-29T13:32:33.642125299" }, "homo_sapiens - cram, crai, []": { "content": [ @@ -1077,7 +1077,7 @@ ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ @@ -1100,7 +1100,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "6": [ @@ -1139,7 +1139,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "per_base_d4": [ @@ -1176,15 +1176,15 @@ ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-03-28T12:28:06.482838" + "timestamp": "2024-04-29T13:32:44.704920941" }, "homo_sapiens - bam, bai, bed - thresholds": { "content": [ @@ -1222,11 +1222,11 @@ "id": "test", "single_end": true }, - "test.thresholds.bed.gz.csi:md5,912055ee9452229439df6fae95644196" + "test.thresholds.bed.gz.csi:md5,219414a0751185adb98d2235d83ea055" ] ], "12": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ], "2": [ [ @@ -1255,7 +1255,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "6": [ @@ -1273,7 +1273,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,47669cfe41f3e222e74d81e1b1be191f" + "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" ] ], "8": [ @@ -1306,7 +1306,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,9e649ac749ff6c6073bef5ab63e8aaa4" + "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" ] ], "per_base_d4": [ @@ -1333,7 +1333,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,47669cfe41f3e222e74d81e1b1be191f" + "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" ] ], "regions_txt": [ @@ -1369,18 +1369,18 @@ "id": "test", "single_end": true }, - "test.thresholds.bed.gz.csi:md5,912055ee9452229439df6fae95644196" + "test.thresholds.bed.gz.csi:md5,219414a0751185adb98d2235d83ea055" ] ], "versions": [ - "versions.yml:md5,f8b1896c9c6784181f1234e87225f0e8" + "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" ] } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.0" + "nextflow": "23.10.1" }, - "timestamp": "2024-03-28T12:28:45.918241" + "timestamp": "2024-04-29T13:33:06.737266831" } } \ No newline at end of file diff --git a/modules/nf-core/nanoplot/main.nf b/modules/nf-core/nanoplot/main.nf index 9fe43c0e..c1816caf 100644 --- a/modules/nf-core/nanoplot/main.nf +++ b/modules/nf-core/nanoplot/main.nf @@ -22,7 +22,7 @@ process NANOPLOT { script: def args = task.ext.args ?: '' - def input_file = ("$ontfile".endsWith(".fastq.gz")) ? "--fastq ${ontfile}" : + def input_file = ("$ontfile".endsWith(".fastq.gz") || "$ontfile".endsWith(".fq.gz")) ? "--fastq ${ontfile}" : ("$ontfile".endsWith(".txt")) ? "--summary ${ontfile}" : '' """ NanoPlot \\ diff --git a/nextflow.config b/nextflow.config index 5a5b50e1..15e1d831 100644 --- a/nextflow.config +++ b/nextflow.config @@ -39,9 +39,6 @@ params { // Nanopore/Illumina options asciigenome_read_depth = 50 asciigenome_window_size = 50 - multiqc_title = null - multiqc_config = null - max_multiqc_email_size = '25.MB' skip_freyja = false skip_freyja_boot = false freyja_repeats = 100 @@ -58,6 +55,13 @@ params { skip_variants_long_table = false skip_multiqc = false +// MultiQC options + multiqc_config = null + multiqc_title = null + multiqc_logo = null + max_multiqc_email_size = '25.MB' + multiqc_methods_description = null + // Illumina QC, read trimming and filtering options kraken2_db = 's3://ngi-igenomes/test-data/viralrecon/kraken2_human.tar.gz' kraken2_db_name = 'human' @@ -98,15 +102,16 @@ params { skip_assembly = false // 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 - version = false + outdir = null + publish_dir_mode = 'copy' + email = null + email_on_fail = null + plaintext_email = false + monochrome_logs = false + hook_url = null + help = false + version = false + pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/' // Config options config_profile_name = null @@ -141,109 +146,110 @@ try { System.err.println("WARNING: Could not load nf-core/config profiles: ${params.custom_config_base}/nfcore_custom.config") } -// Load nf-core/viralrecon custom config. -// The default 'genomes.config' used by the pipeline can be found here and is auto-loaded via the pipeline config: -// https://github.com/nf-core/configs/blob/master/conf/pipeline/viralrecon/genomes.config +// Load nf-core/viralrecon custom profiles from different institutions. try { includeConfig "${params.custom_config_base}/pipeline/viralrecon.config" } catch (Exception e) { System.err.println("WARNING: Could not load nf-core/config/viralrecon profiles: ${params.custom_config_base}/pipeline/viralrecon.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 - channels = ['conda-forge', 'bioconda', 'defaults'] - apptainer.enabled = false - // Increase time available to build Conda environment - conda.createTimeout = "120 min" + conda.enabled = true + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + conda.channels = ['conda-forge', 'bioconda', 'defaults'] + 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.createTimeout = "120 min" + 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 + singularity.ociAutoPull = true + wave.enabled = true + wave.freeze = true + 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 } test { includeConfig 'conf/test.config' } test_sispa { includeConfig 'conf/test_sispa.config' } diff --git a/nextflow_schema.json b/nextflow_schema.json index e69110b3..c1ab246b 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -47,6 +47,11 @@ "fa_icon": "fas fa-envelope", "help_text": "Set this parameter to your e-mail address to get a summary e-mail with details of the run sent to you when the workflow exits. If set in your user config file (`~/.nextflow/config`) then you don't need to specify this on the command line for every run.", "pattern": "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$" + }, + "multiqc_title": { + "type": "string", + "description": "MultiQC report title. Printed as page header, used for filename if not otherwise specified.", + "fa_icon": "fas fa-file-signature" } } }, @@ -301,20 +306,6 @@ "fa_icon": "fas fa-file", "description": "Metadata of lineages that match barcode, default is most recent from UShER database." }, - "multiqc_title": { - "type": "string", - "hidden": true, - "fa_icon": "fas fa-signature", - "description": "Custom title for the MultiQC report." - }, - "multiqc_config": { - "type": "string", - "format": "file-path", - "mimetype": "text/plain", - "description": "Custom config file to supply to MultiQC.", - "fa_icon": "fas fa-cog", - "hidden": true - }, "max_multiqc_email_size": { "type": "string", "description": "File size limit when attaching MultiQC reports to summary emails.", @@ -642,6 +633,24 @@ "help_text": "Incoming hook URL for messaging service. Currently, only MS Teams is supported.", "hidden": true }, + "multiqc_config": { + "type": "string", + "format": "file-path", + "description": "Custom config file to supply to MultiQC.", + "fa_icon": "fas fa-cog", + "hidden": true + }, + "multiqc_logo": { + "type": "string", + "description": "Custom logo file to supply to MultiQC. File name must also be set in the MultiQC config file", + "fa_icon": "fas fa-image", + "hidden": true + }, + "multiqc_methods_description": { + "type": "string", + "description": "Custom MultiQC yaml file containing HTML including a methods description.", + "fa_icon": "fas fa-cog" + }, "validate_params": { "type": "boolean", "description": "Boolean whether to validate parameters against the schema at runtime", @@ -669,6 +678,13 @@ "description": "Validation of parameters in lenient more.", "hidden": true, "help_text": "Allows string values that are parseable as numbers or booleans. For further information see [JSONSchema docs](https://github.com/everit-org/json-schema#lenient-mode)." + }, + "pipelines_testdata_base_path": { + "type": "string", + "fa_icon": "far fa-check-circle", + "description": "Base URL or local path to location of pipeline test dataset files", + "default": "https://raw.githubusercontent.com/nf-core/test-datasets/", + "hidden": true } } }, diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 56110621..00000000 --- a/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -# Config file for Python. Mostly used to configure linting of bin/*.py with Ruff. -# Should be kept the same as nf-core/tools to avoid fighting with template synchronisation. -[tool.ruff] -line-length = 120 -target-version = "py38" -cache-dir = "~/.cache/ruff" - -[tool.ruff.lint] -select = ["I", "E1", "E4", "E7", "E9", "F", "UP", "N"] - -[tool.ruff.lint.isort] -known-first-party = ["nf_core"] - -[tool.ruff.lint.per-file-ignores] -"__init__.py" = ["E402", "F401"] diff --git a/subworkflows/local/prepare_genome_illumina.nf b/subworkflows/local/prepare_genome_illumina.nf index 8ebacb0f..27768726 100644 --- a/subworkflows/local/prepare_genome_illumina.nf +++ b/subworkflows/local/prepare_genome_illumina.nf @@ -141,7 +141,7 @@ workflow PREPARE_GENOME { } } else { BEDTOOLS_GETFASTA ( - ch_primer_bed, + ch_primer_bed.map { [ [:], it ] }, ch_fasta ) ch_primer_fasta = BEDTOOLS_GETFASTA.out.fasta diff --git a/subworkflows/local/utils_nfcore_viralrecon_pipeline/main.nf b/subworkflows/local/utils_nfcore_viralrecon_pipeline/main.nf index ed116d33..adebe51d 100644 --- a/subworkflows/local/utils_nfcore_viralrecon_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_viralrecon_pipeline/main.nf @@ -153,6 +153,10 @@ workflow PIPELINE_COMPLETION { imNotification(summary_params, hook_url) } } + + workflow.onError { + log.error "Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting" + } } /* @@ -288,8 +292,16 @@ def methodsDescriptionText(mqc_methods_yaml) { meta["manifest_map"] = workflow.manifest.toMap() // Pipeline DOI - meta["doi_text"] = meta.manifest_map.doi ? "(doi: ${meta.manifest_map.doi})" : "" - meta["nodoi_text"] = meta.manifest_map.doi ? "": "
  • If available, make sure to update the text to include the Zenodo DOI of version of the pipeline used.
  • " + if (meta.manifest_map.doi) { + // Using a loop to handle multiple DOIs + // Removing `https://doi.org/` to handle pipelines using DOIs vs DOI resolvers + // Removing ` ` since the manifest.doi is a string and not a proper list + def temp_doi_ref = "" + String[] manifest_doi = meta.manifest_map.doi.tokenize(",") + for (String doi_ref: manifest_doi) temp_doi_ref += "(doi: ${doi_ref.replace("https://doi.org/", "").replace(" ", "")}), " + meta["doi_text"] = temp_doi_ref.substring(0, temp_doi_ref.length() - 2) + } else meta["doi_text"] = "" + meta["nodoi_text"] = meta.manifest_map.doi ? "" : "
  • If available, make sure to update the text to include the Zenodo DOI of version of the pipeline used.
  • " // Tool references meta["tool_citations"] = "" diff --git a/subworkflows/local/variants_qc.nf b/subworkflows/local/variants_qc.nf index cded165c..cd5762b3 100644 --- a/subworkflows/local/variants_qc.nf +++ b/subworkflows/local/variants_qc.nf @@ -31,7 +31,7 @@ workflow VARIANTS_QC { ch_snpeff_txt = Channel.empty() ch_snpeff_html = Channel.empty() ch_snpsift_txt = Channel.empty() - if (params.gff && !params.skip_snpeff) { + if (gff && !params.skip_snpeff) { SNPEFF_SNPSIFT ( vcf, snpeff_db, diff --git a/workflows/illumina.nf b/workflows/illumina.nf index 7de8bbe4..e43382f2 100644 --- a/workflows/illumina.nf +++ b/workflows/illumina.nf @@ -428,8 +428,8 @@ workflow ILLUMINA { PREPARE_GENOME.out.fasta, (params.protocol == 'amplicon' || !params.skip_asciigenome || !params.skip_markduplicates) ? PREPARE_GENOME.out.fai : [], (params.protocol == 'amplicon' || !params.skip_asciigenome || !params.skip_markduplicates) ? PREPARE_GENOME.out.chrom_sizes : [], - params.gff ? PREPARE_GENOME.out.gff : [], - (params.protocol == 'amplicon' && params.primer_bed) ? PREPARE_GENOME.out.primer_bed : [], + ch_genome_gff ? PREPARE_GENOME.out.gff : [], + (params.protocol == 'amplicon' && ch_primer_bed) ? PREPARE_GENOME.out.primer_bed : [], PREPARE_GENOME.out.snpeff_db, PREPARE_GENOME.out.snpeff_config, ch_ivar_variants_header_mqc @@ -451,8 +451,8 @@ workflow ILLUMINA { ch_bam, PREPARE_GENOME.out.fasta, (params.protocol == 'amplicon' || !params.skip_asciigenome || !params.skip_markduplicates) ? PREPARE_GENOME.out.chrom_sizes : [], - params.gff ? PREPARE_GENOME.out.gff : [], - (params.protocol == 'amplicon' && params.primer_bed) ? PREPARE_GENOME.out.primer_bed : [], + ch_genome_gff ? PREPARE_GENOME.out.gff : [], + (params.protocol == 'amplicon' && ch_primer_bed) ? PREPARE_GENOME.out.primer_bed : [], PREPARE_GENOME.out.snpeff_db, PREPARE_GENOME.out.snpeff_config ) @@ -492,7 +492,7 @@ workflow ILLUMINA { CONSENSUS_IVAR ( ch_bam, PREPARE_GENOME.out.fasta, - params.gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], + ch_genome_gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], PREPARE_GENOME.out.nextclade_db ) @@ -511,7 +511,7 @@ workflow ILLUMINA { ch_vcf, ch_tbi, PREPARE_GENOME.out.fasta, - params.gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], + ch_genome_gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], PREPARE_GENOME.out.nextclade_db ) @@ -543,7 +543,7 @@ workflow ILLUMINA { // // SUBWORKFLOW: Create variants long table report // - if (!params.skip_variants && !params.skip_variants_long_table && params.gff && !params.skip_snpeff) { + if (!params.skip_variants && !params.skip_variants_long_table && ch_genome_gff && !params.skip_snpeff) { VARIANTS_LONG_TABLE ( ch_vcf, ch_tbi, @@ -575,7 +575,7 @@ workflow ILLUMINA { if (params.protocol == 'amplicon' && !params.skip_assembly && !params.skip_cutadapt) { CUTADAPT ( ch_assembly_fastq, - PREPARE_GENOME.out.primer_fasta + PREPARE_GENOME.out.primer_fasta.collect { it[1] } ) ch_assembly_fastq = CUTADAPT.out.reads ch_cutadapt_multiqc = CUTADAPT.out.log @@ -599,7 +599,7 @@ workflow ILLUMINA { params.spades_mode, ch_spades_hmm, PREPARE_GENOME.out.fasta, - params.gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], + ch_genome_gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], PREPARE_GENOME.out.blast_db, ch_blast_outfmt6_header ) @@ -615,7 +615,7 @@ workflow ILLUMINA { ASSEMBLY_UNICYCLER ( ch_assembly_fastq.map { meta, fastq -> [ meta, fastq, [] ] }, PREPARE_GENOME.out.fasta, - params.gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], + ch_genome_gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], PREPARE_GENOME.out.blast_db, ch_blast_outfmt6_header ) @@ -631,7 +631,7 @@ workflow ILLUMINA { ASSEMBLY_MINIA ( ch_assembly_fastq, PREPARE_GENOME.out.fasta, - params.gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], + ch_genome_gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], PREPARE_GENOME.out.blast_db, ch_blast_outfmt6_header ) @@ -643,21 +643,37 @@ workflow ILLUMINA { // Collate and save software versions // softwareVersionsToYAML(ch_versions) - .collectFile(storeDir: "${params.outdir}/pipeline_info", name: 'nf_core_pipeline_software_mqc_versions.yml', sort: true, newLine: true) - .set { ch_collated_versions } + .collectFile( + storeDir: "${params.outdir}/pipeline_info", + name: 'nf_core_pipeline_software_mqc_versions.yml', + sort: true, + newLine: true + ).set { ch_collated_versions } // // MODULE: MultiQC // if (!params.skip_multiqc) { - summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") + summary_params = paramsSummaryMap( + workflow, parameters_schema: "nextflow_schema.json") ch_workflow_summary = Channel.value(paramsSummaryMultiqc(summary_params)) - ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("$projectDir/assets/methods_description_template.yml", checkIfExists: true) - ch_methods_description = Channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) - ch_multiqc_logo = params.multiqc_logo ? Channel.fromPath(params.multiqc_logo, checkIfExists: true) : Channel.empty() - ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) + ch_multiqc_custom_methods_description = params.multiqc_methods_description ? + file(params.multiqc_methods_description, checkIfExists: true) : + file("$projectDir/assets/methods_description_template.yml", checkIfExists: true) + ch_methods_description = Channel.value( + methodsDescriptionText(ch_multiqc_custom_methods_description)) + + ch_multiqc_logo = params.multiqc_logo ? + Channel.fromPath(params.multiqc_logo, checkIfExists: true) : + Channel.empty() + + ch_multiqc_files = ch_multiqc_files.mix( + ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) - ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: false)) + ch_multiqc_files = ch_multiqc_files.mix( + ch_methods_description.collectFile( + name: 'methods_description_mqc.yaml', + sort: false)) MULTIQC ( ch_multiqc_files.collect(), diff --git a/workflows/nanopore.nf b/workflows/nanopore.nf index a46fca24..36eaf440 100644 --- a/workflows/nanopore.nf +++ b/workflows/nanopore.nf @@ -481,7 +481,7 @@ workflow NANOPORE { QUAST ( ch_to_quast, PREPARE_GENOME.out.fasta.collect().map { [ [:], it ] }, - params.gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], + ch_genome_gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], ) ch_quast_multiqc = QUAST.out.tsv ch_versions = ch_versions.mix(QUAST.out.versions) @@ -492,7 +492,7 @@ workflow NANOPORE { // ch_snpeff_multiqc = Channel.empty() ch_snpsift_txt = Channel.empty() - if (params.gff && !params.skip_snpeff) { + if (ch_genome_gff && !params.skip_snpeff) { SNPEFF_SNPSIFT ( VCFLIB_VCFUNIQ.out.vcf, PREPARE_GENOME.out.snpeff_db.collect(), @@ -524,7 +524,7 @@ workflow NANOPORE { ch_asciigenome, PREPARE_GENOME.out.fasta.collect(), PREPARE_GENOME.out.chrom_sizes.collect(), - params.gff ? PREPARE_GENOME.out.gff : [], + ch_genome_gff ? PREPARE_GENOME.out.gff : [], PREPARE_GENOME.out.primer_bed.collect(), params.asciigenome_window_size, params.asciigenome_read_depth @@ -535,7 +535,7 @@ workflow NANOPORE { // // SUBWORKFLOW: Create variants long table report // - if (!params.skip_variants_long_table && params.gff && !params.skip_snpeff) { + if (!params.skip_variants_long_table && ch_genome_gff && !params.skip_snpeff) { VARIANTS_LONG_TABLE ( VCFLIB_VCFUNIQ.out.vcf, TABIX_TABIX.out.tbi, @@ -564,22 +564,38 @@ workflow NANOPORE { // MODULE: Pipeline reporting // softwareVersionsToYAML(ch_versions) - .collectFile(storeDir: "${params.outdir}/pipeline_info", name: 'nf_core_pipeline_software_mqc_versions.yml', sort: true, newLine: true) - .set { ch_collated_versions } + .collectFile( + storeDir: "${params.outdir}/pipeline_info", + name: 'nf_core_pipeline_software_mqc_versions.yml', + sort: true, + newLine: true + ).set { ch_collated_versions } // // MODULE: MultiQC // if (!params.skip_multiqc) { - summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") + summary_params = paramsSummaryMap( + workflow, parameters_schema: "nextflow_schema.json") ch_workflow_summary = Channel.value(paramsSummaryMultiqc(summary_params)) - ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("$projectDir/assets/methods_description_template.yml", checkIfExists: true) - ch_methods_description = Channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) - ch_multiqc_logo = params.multiqc_logo ? Channel.fromPath(params.multiqc_logo, checkIfExists: true) : Channel.empty() - ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) + ch_multiqc_custom_methods_description = params.multiqc_methods_description ? + file(params.multiqc_methods_description, checkIfExists: true) : + file("$projectDir/assets/methods_description_template.yml", checkIfExists: true) + ch_methods_description = Channel.value( + methodsDescriptionText(ch_multiqc_custom_methods_description)) + + ch_multiqc_logo = params.multiqc_logo ? + Channel.fromPath(params.multiqc_logo, checkIfExists: true) : + Channel.empty() + + ch_multiqc_files = ch_multiqc_files.mix( + ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) - ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: false)) + ch_multiqc_files = ch_multiqc_files.mix( + ch_methods_description.collectFile( + name: 'methods_description_mqc.yaml', + sort: false)) MULTIQC ( ch_multiqc_files.collect(),