diff --git a/.github/workflows/awsfulltest_screening.yml b/.github/workflows/awsfulltest_screening.yml index 6c2d2b9b..8a847217 100644 --- a/.github/workflows/awsfulltest_screening.yml +++ b/.github/workflows/awsfulltest_screening.yml @@ -14,7 +14,7 @@ jobs: run-platform: name: Run AWS full tests # run only if the PR is approved by at least 2 reviewers and against the master/main branch or manually triggered - if: github.repository == 'nf-core/crisprseq' && github.event.review.state == 'approved' && (github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'main') || github.event_name == 'workflow_dispatch' + if: github.repository == 'nf-core/crisprseq' && github.event.review.state == 'approved' && (github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'main') || github.event_name == 'workflow_dispatch' || github.event_name == 'release' runs-on: ubuntu-latest steps: - name: Set revision variable @@ -26,19 +26,19 @@ jobs: uses: seqeralabs/action-tower-launch@v2 with: - workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }} + workspace_id: ${{ vars.TOWER_WORKSPACE_ID }} access_token: ${{ secrets.TOWER_ACCESS_TOKEN }} - compute_env: ${{ secrets.TOWER_COMPUTE_ENV }} + compute_env: ${{ vars.TOWER_COMPUTE_ENV }} revision: ${{ steps.revision.outputs.revision }} - workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/crisprseq/work-${{ steps.revision.outputs.revision }} + workdir: s3://${{ vars.AWS_S3_BUCKET }}/work/crisprseq/work-${{ steps.revision.outputs.revision }} parameters: | { "hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}", - "outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/crisprseq/results-${{ steps.revision.outputs.revision }}/screening_test" + "outdir": "s3://${{ vars.AWS_S3_BUCKET }}/crisprseq/results-${{ steps.revision.outputs.revision }}/screening_test" } profiles: test_screening_full - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 with: name: Seqera Platform debug log file path: | diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index cf15fb8d..cb226c25 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -78,7 +78,7 @@ jobs: - isMain: false profile: "singularity" NXF_VER: - - "25.04.0" + - "25.10.3" - "latest-everything" env: NXF_ANSI_LOG: false diff --git a/.nf-core.yml b/.nf-core.yml index 3df49210..e997be10 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -6,7 +6,7 @@ lint: - tests/default.nf.test files_unchanged: - .github/PULL_REQUEST_TEMPLATE.md -nf_core_version: 3.5.1 +nf_core_version: 3.5.2 repository_type: pipeline template: author: "J\xFAlia Mir Pedrol, Laurence Kuhlburger" diff --git a/README.md b/README.md index dba5faea..b701f0c0 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ [![GitHub Actions Linting Status](https://github.com/nf-core/crisprseq/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/crisprseq/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/crisprseq/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) -[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.04.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/) +[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.10.3-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/) [![nf-core template version](https://img.shields.io/badge/nf--core_template-3.5.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.5.1) [![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/) diff --git a/conf/modules.config b/conf/modules.config index b1cc3bd0..da966ff8 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -23,7 +23,6 @@ process { publishDir = [ path: { "${params.outdir}/preprocessing/sequences" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, enabled: false ] } @@ -32,7 +31,6 @@ process { publishDir = [ path: { "${params.outdir}/preprocessing/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -40,7 +38,6 @@ process { publishDir = [ path: { "${params.outdir}/preprocessing/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -48,7 +45,6 @@ process { publishDir = [ path: { "${params.outdir}/bagel2/bayes_factor/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -56,7 +52,6 @@ process { publishDir = [ path: { "${params.outdir}/bagel2/precision_recall/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -64,7 +59,6 @@ process { publishDir = [ path: { "${params.outdir}/bagel2/fold_change/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } withName: DRUGZ { @@ -73,7 +67,6 @@ process { publishDir = [ path: { "${params.outdir}/drugz/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -81,7 +74,6 @@ process { publishDir = [ path: { "${params.outdir}/bagel2/graphs/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -90,7 +82,6 @@ process { publishDir = [ path: { "${params.outdir}/preprocessing/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -98,7 +89,6 @@ process { publishDir = [ path: { "${params.outdir}/preprocessing/adapters" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -118,7 +108,6 @@ process { publishDir = [ path: { "${params.outdir}/bowtie/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -126,7 +115,6 @@ process { publishDir = [ path: { "${params.outdir}/mageck/count/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] ext.prefix = 'count_table' } @@ -135,7 +123,6 @@ process { publishDir = [ path: { "${params.outdir}/mageck/mle/${meta.id}/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] ext.args = params.crisprcleanr ? '--norm-method none' : '' @@ -147,7 +134,6 @@ process { publishDir = [ path: { "${params.outdir}/mageck/rra/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -160,7 +146,6 @@ process { publishDir = [ path: { "${params.outdir}/mageck/FluteMLE/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -169,7 +154,6 @@ process { publishDir = [ path: { "${params.outdir}/hitselection/drugz/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -178,7 +162,6 @@ process { publishDir = [ path: { "${params.outdir}/hitselection/mle/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -188,7 +171,6 @@ process { publishDir = [ path: { "${params.outdir}/hitselection/bagel2/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -197,7 +179,6 @@ process { publishDir = [ path: { "${params.outdir}/hitselection/rra/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -206,7 +187,6 @@ process { publishDir = [ path: { "${params.outdir}/venndiagram/${meta.id}/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -215,7 +195,6 @@ process { publishDir = [ path: { "${params.outdir}/mageck/mle/day0/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -223,7 +202,6 @@ process { publishDir = [ path: { "${params.outdir}/crisprcleanr/normalization/" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -232,7 +210,6 @@ process { publishDir = [ path: { "${params.outdir}/preprocessing/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -241,7 +218,6 @@ process { publishDir = [ path: { "${params.outdir}/preprocessing/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -250,7 +226,6 @@ process { publishDir = [ path: { "${params.outdir}/preprocessing/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -259,7 +234,6 @@ process { publishDir = [ path: { "${params.outdir}/preprocessing/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -283,7 +257,6 @@ process { publishDir = [ path: { "${params.outdir}/summary/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, enabled: false ] } @@ -292,7 +265,6 @@ process { publishDir = [ path: { "${params.outdir}/design_matrix" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -302,7 +274,6 @@ process { publishDir = [ path: { "${params.outdir}/minimap2_umi" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -312,7 +283,6 @@ process { publishDir = [ path: { "${params.outdir}/minimap2_umi" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -322,7 +292,6 @@ process { publishDir = [ path: { "${params.outdir}/racon_umi" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -332,7 +301,6 @@ process { publishDir = [ path: { "${params.outdir}/racon_umi" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -346,7 +314,6 @@ process { publishDir = [ path: { "${params.outdir}/preprocessing/UMI" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, enabled: false ] } @@ -355,7 +322,6 @@ process { publishDir = [ path: { "${params.outdir}/summary/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, enabled: false ] } @@ -368,7 +334,6 @@ process { publishDir = [ path: { "${params.outdir}/summary/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -376,7 +341,6 @@ process { publishDir = [ path: { "${params.outdir}/${params.aligner}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -384,7 +348,6 @@ process { publishDir = [ path: { "${params.outdir}/preprocessing/sequences" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -394,7 +357,6 @@ process { publishDir = [ path: { "${params.outdir}/preprocessing/sequences" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -407,7 +369,6 @@ process { publishDir = [ path: { "${params.outdir}/plots" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -416,7 +377,6 @@ process { publishDir = [ path: { "${params.outdir}/multiqc" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } diff --git a/conf/test_targeted_full.config b/conf/test_targeted_full.config index ff6f1c17..5e260981 100644 --- a/conf/test_targeted_full.config +++ b/conf/test_targeted_full.config @@ -24,3 +24,9 @@ params { // Steps overrepresented = true } + +process { + withName: 'MULTIQC' { + memory = '12.GB' + } +} diff --git a/main.nf b/main.nf index 0c6640cc..71e0fc62 100644 --- a/main.nf +++ b/main.nf @@ -83,7 +83,6 @@ workflow { PIPELINE_INITIALISATION ( params.version, params.validate_params, - params.monochrome_logs, args, params.outdir, params.input, diff --git a/modules.json b/modules.json index 267d0820..590d6033 100644 --- a/modules.json +++ b/modules.json @@ -7,116 +7,111 @@ "nf-core": { "bowtie2/align": { "branch": "master", - "git_sha": "0fe30831abbc2ed115e46e92330edf38f56edc3d", + "git_sha": "92b8df948fd8cdb223e051f5f5e414818a073ee0", "installed_by": ["modules"] }, "bowtie2/build": { "branch": "master", - "git_sha": "1fea64f5132a813ec97c1c6d3a74e0aee7142b6d", + "git_sha": "447f7bc0fa41dfc2400c8cad4c0291880dc060cf", "installed_by": ["modules"] }, "bwa/index": { "branch": "master", - "git_sha": "086fa66260595e123b0ea47a6512539b72a9afa3", + "git_sha": "966ba9887e2b04d89d64db06c01508873bde13b1", "installed_by": ["modules"] }, "bwa/mem": { "branch": "master", - "git_sha": "0c34b8159f62cde451c4ff249629c9d0a4f3f9c3", + "git_sha": "707241c72951f24fd89982c4c80c5983a4c437ef", "installed_by": ["modules"] }, "cat/fastq": { "branch": "master", - "git_sha": "4fc983ad0b30e6e32696fa7d980c76c7bfe1c03e", + "git_sha": "5d28ea7cfaebcfae6f74d1067ea766d8ff19dff3", "installed_by": ["modules"] }, "crisprcleanr/normalize": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "ad65d06c959cff1da9e94c4a972deaf7430931fa", "installed_by": ["modules"], "patch": "modules/nf-core/crisprcleanr/normalize/crisprcleanr-normalize.diff" }, "cutadapt": { "branch": "master", - "git_sha": "6618151ed69274863dc6fe6d2920afa90abaca1f", + "git_sha": "624977dfaf562211e68a8a868ca80acc8461f1ac", "installed_by": ["modules"], "patch": "modules/nf-core/cutadapt/cutadapt.diff" }, "fastqc": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "3009f27c4e4b6e99da4eeebe82799e13924a4a1f", "installed_by": ["modules"] }, "mageck/count": { "branch": "master", - "git_sha": "3fd600f14c03766f840acf29e1a6a1bc45d5c9a0", + "git_sha": "fe0ec4b67b1abd71ff9b5ece41fd5a4d8abadad5", "installed_by": ["modules"], "patch": "modules/nf-core/mageck/count/mageck-count.diff" }, "mageck/mle": { "branch": "master", - "git_sha": "a179c03b8933e96cdf232e8de9addf5c83a05d24", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"], "patch": "modules/nf-core/mageck/mle/mageck-mle.diff" }, "mageck/test": { "branch": "master", - "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "git_sha": "fe0ec4b67b1abd71ff9b5ece41fd5a4d8abadad5", "installed_by": ["modules"], "patch": "modules/nf-core/mageck/test/mageck-test.diff" }, "medaka": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"], "patch": "modules/nf-core/medaka/medaka.diff" }, "minimap2/align": { "branch": "master", - "git_sha": "72e277acfd9e61a9f1368eafb4a9e83f5bcaa9f5", + "git_sha": "5c9f8d5b7671237c906abadc9ff732b301ca15ca", "installed_by": ["modules"], "patch": "modules/nf-core/minimap2/align/minimap2-align.diff" }, - "minimap2/index": { - "branch": "master", - "git_sha": "72e277acfd9e61a9f1368eafb4a9e83f5bcaa9f5", - "installed_by": ["modules"] - }, "multiqc": { "branch": "master", - "git_sha": "af27af1be706e6a2bb8fe454175b0cdf77f47b49", + "git_sha": "2c73cc8fa92cf48de3da0b643fdf357a8a290b36", "installed_by": ["modules"] }, "pear": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "73e4b85ab52c4a84756cf329887cb7dfd1e15fc9", "installed_by": ["modules"] }, "racon": { "branch": "master", - "git_sha": "f5ed3ac0834b68e80a00a06a61d04ce8e896f275", + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", "installed_by": ["modules"], "patch": "modules/nf-core/racon/racon.diff" }, "samtools/index": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", + "git_sha": "1d2fbdcbca677bbe8da0f9d0d2bb7c02f2cab1c9", "installed_by": ["modules"] }, "seqtk/seq": { "branch": "master", - "git_sha": "7f88aae93c69586c0789322b77743ee0ef469502", + "git_sha": "a46713779030a5f508117080cbf4b693dd4c6e33", "installed_by": ["modules"] }, "vsearch/cluster": { "branch": "master", - "git_sha": "d97b335eb448073c1b680710303c02a55f40c77c", + "git_sha": "694b2cdc2d695926dc10ac149e59b7b5b563cef9", "installed_by": ["modules"], "patch": "modules/nf-core/vsearch/cluster/vsearch-cluster.diff" }, "vsearch/sort": { "branch": "master", - "git_sha": "97cf4c4a37a8931e19ef728de92f930a366669f2", + "git_sha": "694b2cdc2d695926dc10ac149e59b7b5b563cef9", "installed_by": ["modules"] } } diff --git a/modules/local/bagel2/bf.nf b/modules/local/bagel2/bf.nf index 5ae0a8c2..8d60dd37 100644 --- a/modules/local/bagel2/bf.nf +++ b/modules/local/bagel2/bf.nf @@ -26,7 +26,7 @@ process BAGEL2_BF { def prefix = task.ext.prefix ?: "${meta.id}" """ - BAGEL.py bf -i $foldchange -o '${meta.id}.bf' $args -e $reference_essentials -n $reference_nonessentials -c ${meta.treatment} + BAGEL.py bf -i $foldchange -o '${prefix}.bf' $args -e $reference_essentials -n $reference_nonessentials -c ${meta.treatment} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/local/bagel2/fc.nf b/modules/local/bagel2/fc.nf index 1f414f63..fad422f0 100644 --- a/modules/local/bagel2/fc.nf +++ b/modules/local/bagel2/fc.nf @@ -23,7 +23,7 @@ process BAGEL2_FC { def prefix = task.ext.prefix ?: "${meta.id}" """ - BAGEL.py fc -i $count_table -o ${meta.id} -c $meta.reference $args + BAGEL.py fc -i $count_table -o ${prefix} -c $meta.reference $args cat <<-END_VERSIONS > versions.yml "${task.process}": python: \$(python --version | sed 's/Python //g') diff --git a/modules/local/bagel2/graph.nf b/modules/local/bagel2/graph.nf index c79c264f..2af5a7bb 100644 --- a/modules/local/bagel2/graph.nf +++ b/modules/local/bagel2/graph.nf @@ -18,7 +18,6 @@ process BAGEL2_GRAPH { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ @@ -42,7 +41,7 @@ process BAGEL2_GRAPH { plt.title('Precision-Recall Plot') # Save the plot to a PNG file - file_name = 'PR_plot_{}.png'.format('${meta.id}') + file_name = 'PR_plot_{}.png'.format('${prefix}') plt.savefig(file_name) @@ -53,7 +52,7 @@ process BAGEL2_GRAPH { plt.xlabel('Bayes Factor') plt.ylabel('Number of Genes') - file_name = 'barplot_{}.png'.format('${meta.id}') + file_name = 'barplot_{}.png'.format('${prefix}') plt.savefig(file_name) plt.show() diff --git a/modules/local/bagel2/pr.nf b/modules/local/bagel2/pr.nf index 271234cf..81023cc3 100644 --- a/modules/local/bagel2/pr.nf +++ b/modules/local/bagel2/pr.nf @@ -23,7 +23,7 @@ process BAGEL2_PR { def prefix = task.ext.prefix ?: "${meta.id}" """ - BAGEL.py pr -i $bf -o '${meta.id}.tsv' -e $reference_essentials -n $reference_nonessentials $args + BAGEL.py pr -i $bf -o '${prefix}.tsv' -e $reference_essentials -n $reference_nonessentials $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/local/extract_umis.nf b/modules/local/extract_umis.nf index 00532293..eabfbd97 100644 --- a/modules/local/extract_umis.nf +++ b/modules/local/extract_umis.nf @@ -16,7 +16,6 @@ process EXTRACT_UMIS { path "versions.yml" , emit: versions script: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ extract_umis.py \ diff --git a/modules/local/find_adapters.nf b/modules/local/find_adapters.nf index ee0ea1ff..d842b549 100644 --- a/modules/local/find_adapters.nf +++ b/modules/local/find_adapters.nf @@ -15,7 +15,6 @@ process FIND_ADAPTERS { path "versions.yml", emit: versions script: - def args = task.ext.args ?: '' """ #!/usr/bin/env Rscript library(fastqcr) diff --git a/modules/local/hitselection.nf b/modules/local/hitselection.nf index 59cb936a..d99a3235 100644 --- a/modules/local/hitselection.nf +++ b/modules/local/hitselection.nf @@ -23,7 +23,6 @@ process HITSELECTION { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ @@ -243,7 +242,6 @@ process HITSELECTION { """ stub: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ diff --git a/modules/local/mageck/graphrra.nf b/modules/local/mageck/graphrra.nf index 8db6e601..858cfb31 100644 --- a/modules/local/mageck/graphrra.nf +++ b/modules/local/mageck/graphrra.nf @@ -18,7 +18,6 @@ process MAGECK_GRAPHRRA { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ diff --git a/modules/local/orient_reference.nf b/modules/local/orient_reference.nf index 5e176368..84927acc 100644 --- a/modules/local/orient_reference.nf +++ b/modules/local/orient_reference.nf @@ -16,7 +16,6 @@ process ORIENT_REFERENCE { path "versions.yml" , emit: versions script: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ revComp_reference.R \\ diff --git a/modules/local/venndiagram.nf b/modules/local/venndiagram.nf index 208fd318..31c65ee6 100644 --- a/modules/local/venndiagram.nf +++ b/modules/local/venndiagram.nf @@ -18,7 +18,6 @@ process VENNDIAGRAM { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ #!/usr/bin/env Rscript diff --git a/modules/nf-core/bowtie2/align/environment.yml b/modules/nf-core/bowtie2/align/environment.yml index d2796359..066ff52e 100644 --- a/modules/nf-core/bowtie2/align/environment.yml +++ b/modules/nf-core/bowtie2/align/environment.yml @@ -1,9 +1,13 @@ -name: bowtie2_align +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::bowtie2=2.5.2 - - bioconda::samtools=1.18 - - conda-forge::pigz=2.6 + # renovate: datasource=conda depName=bioconda/bowtie2 + - bioconda::bowtie2=2.5.4 + # renovate: datasource=conda depName=bioconda/htslib + - bioconda::htslib=1.21 + # renovate: datasource=conda depName=bioconda/samtools + - bioconda::samtools=1.21 + - conda-forge::pigz=2.8 diff --git a/modules/nf-core/bowtie2/align/main.nf b/modules/nf-core/bowtie2/align/main.nf index 96a7027d..0a8c1a0c 100644 --- a/modules/nf-core/bowtie2/align/main.nf +++ b/modules/nf-core/bowtie2/align/main.nf @@ -1,11 +1,11 @@ process BOWTIE2_ALIGN { tag "$meta.id" - label "process_high" + label 'process_high' conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:f70b31a2db15c023d641c32f433fb02cd04df5a6-0' : - 'biocontainers/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:f70b31a2db15c023d641c32f433fb02cd04df5a6-0' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/b4/b41b403e81883126c3227fc45840015538e8e2212f13abc9ae84e4b98891d51c/data' : + 'community.wave.seqera.io/library/bowtie2_htslib_samtools_pigz:edeb13799090a2a6' }" input: tuple val(meta) , path(reads) @@ -22,7 +22,9 @@ process BOWTIE2_ALIGN { tuple val(meta), path("*.crai") , emit: crai , optional:true tuple val(meta), path("*.log") , emit: log tuple val(meta), path("*fastq.gz") , emit: fastq , optional:true - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('bowtie2'), eval("bowtie2 --version 2>&1 | sed -n '1s/.*bowtie2-align-s version //p'"), emit: versions_bowtie2, topic: versions + tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), emit: versions_samtools, topic: versions + tuple val("${task.process}"), val('pigz'), eval("pigz --version 2>&1 | sed 's/pigz //'"), emit: versions_pigz, topic: versions when: task.ext.when == null || task.ext.when @@ -31,6 +33,7 @@ process BOWTIE2_ALIGN { def args = task.ext.args ?: "" def args2 = task.ext.args2 ?: "" def prefix = task.ext.prefix ?: "${meta.id}" + def rg = args.contains("--rg-id") ? "" : "--rg-id ${prefix} --rg SM:${prefix}" def unaligned = "" def reads_args = "" @@ -59,8 +62,9 @@ process BOWTIE2_ALIGN { $reads_args \\ --threads $task.cpus \\ $unaligned \\ + $rg \\ $args \\ - 2> >(tee ${prefix}.bowtie2.log >&2) \\ + 2>| >(tee ${prefix}.bowtie2.log >&2) \\ | samtools $samtools_command $args2 --threads $task.cpus ${reference} -o ${prefix}.${extension} - if [ -f ${prefix}.unmapped.fastq.1.gz ]; then @@ -70,13 +74,6 @@ process BOWTIE2_ALIGN { if [ -f ${prefix}.unmapped.fastq.2.gz ]; then mv ${prefix}.unmapped.fastq.2.gz ${prefix}.unmapped_2.fastq.gz fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bowtie2: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS """ stub: @@ -90,7 +87,6 @@ process BOWTIE2_ALIGN { } else { create_unmapped = save_unaligned ? "touch ${prefix}.unmapped_1.fastq.gz && touch ${prefix}.unmapped_2.fastq.gz" : "" } - def reference = fasta && extension=="cram" ? "--reference ${fasta}" : "" if (!fasta && extension=="cram") error "Fasta reference is required for CRAM output" def create_index = "" @@ -105,13 +101,6 @@ process BOWTIE2_ALIGN { ${create_index} touch ${prefix}.bowtie2.log ${create_unmapped} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bowtie2: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS """ } diff --git a/modules/nf-core/bowtie2/align/meta.yml b/modules/nf-core/bowtie2/align/meta.yml index e66811d0..2d8051da 100644 --- a/modules/nf-core/bowtie2/align/meta.yml +++ b/modules/nf-core/bowtie2/align/meta.yml @@ -14,28 +14,41 @@ tools: sequencing reads to long reference sequences. homepage: http://bowtie-bio.sourceforge.net/bowtie2/index.shtml documentation: http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml - doi: 10.1038/nmeth.1923 + doi: 10.1186/gb-2009-10-3-r25 licence: ["GPL-3.0-or-later"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test', single_end:false ] - - index: - type: file - description: Bowtie2 genome index files - pattern: "*.ebwt" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + ontologies: [] + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test', single_end:false ] + - index: + type: file + description: Bowtie2 genome index files + pattern: "*.ebwt" + ontologies: [] + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Bowtie2 genome fasta file + pattern: "*.fasta" + ontologies: [] - save_unaligned: type: boolean description: | @@ -46,22 +59,131 @@ input: description: use samtools sort (true) or samtools view (false) pattern: "true or false" output: - - aligned: - type: file - description: Output BAM/SAM file containing read alignments - pattern: "*.{bam,sam}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - fastq: - type: file - description: Unaligned FastQ files - pattern: "*.fastq.gz" - - log: - type: file - description: Aligment log - pattern: "*.log" + sam: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.sam": + type: file + description: Output SAM file containing read alignments + pattern: "*.sam" + ontologies: [] + bam: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.bam": + type: file + description: Output BAM file containing read alignments + pattern: "*.bam" + ontologies: [] + cram: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.cram": + type: file + description: Output CRAM file containing read alignments + pattern: "*.cram" + ontologies: [] + csi: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.csi": + type: file + description: Output SAM/BAM index for large inputs + pattern: "*.csi" + ontologies: [] + crai: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.crai": + type: file + description: Output CRAM index + pattern: "*.crai" + ontologies: [] + log: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.log": + type: file + description: Alignment log + pattern: "*.log" + ontologies: [] + fastq: + - - meta: + type: map + description: Groovy Map containing sample information + - "*fastq.gz": + type: file + description: Unaligned FastQ files + pattern: "*.fastq.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + versions_bowtie2: + - - ${task.process}: + type: string + description: The name of the process + - bowtie2: + type: string + description: The name of the tool + - "bowtie2 --version 2>&1 | sed -n '1s/.*bowtie2-align-s version //p'": + type: eval + description: The expression to obtain the version of bowtie2 + versions_samtools: + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - "samtools version | sed '1!d;s/.* //'": + type: eval + description: The expression to obtain the version of samtools + versions_pigz: + - - ${task.process}: + type: string + description: The name of the process + - pigz: + type: string + description: The name of the tool + - "pigz --version 2>&1 | sed 's/pigz //'": + type: eval + description: The expression to obtain the version of pigz + +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - bowtie2: + type: string + description: The name of the tool + - "bowtie2 --version 2>&1 | sed -n '1s/.*bowtie2-align-s version //p'": + type: eval + description: The expression to obtain the version of bowtie2 + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - "samtools version | sed '1!d;s/.* //'": + type: eval + description: The expression to obtain the version of samtools + - - ${task.process}: + type: string + description: The name of the process + - pigz: + type: string + description: The name of the tool + - "pigz --version 2>&1 | sed 's/pigz //'": + type: eval + description: The expression to obtain the version of pigz + authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/bowtie2/align/tests/large_index.config b/modules/nf-core/bowtie2/align/tests/large_index.config index fdc1c59d..b2f0c405 100644 --- a/modules/nf-core/bowtie2/align/tests/large_index.config +++ b/modules/nf-core/bowtie2/align/tests/large_index.config @@ -2,4 +2,4 @@ process { withName: BOWTIE2_BUILD { ext.args = '--large-index' } -} \ No newline at end of file +} diff --git a/modules/nf-core/bowtie2/align/tests/main.nf.test b/modules/nf-core/bowtie2/align/tests/main.nf.test index 03aeaf9e..1705b66d 100644 --- a/modules/nf-core/bowtie2/align/tests/main.nf.test +++ b/modules/nf-core/bowtie2/align/tests/main.nf.test @@ -18,7 +18,7 @@ nextflow_process { """ input[0] = [ [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -30,10 +30,10 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] input[1] = BOWTIE2_BUILD.out.index - input[2] = [[ id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + input[2] = [[ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[3] = false //save_unaligned input[4] = false //sort """ @@ -47,7 +47,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -64,7 +64,7 @@ nextflow_process { """ input[0] = [ [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -76,10 +76,10 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] input[1] = BOWTIE2_BUILD.out.index - input[2] = [[ id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + input[2] = [[ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[3] = false //save_unaligned input[4] = false //sort """ @@ -93,7 +93,7 @@ nextflow_process { file(process.out.sam[0][1]).readLines()[0..4], process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -110,7 +110,7 @@ nextflow_process { """ input[0] = [ [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -122,10 +122,10 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] input[1] = BOWTIE2_BUILD.out.index - input[2] = [[ id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + input[2] = [[ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[3] = false //save_unaligned input[4] = false //sort """ @@ -139,7 +139,7 @@ nextflow_process { file(process.out.sam[0][1]).readLines()[0..4], process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -155,7 +155,7 @@ nextflow_process { """ input[0] = [ [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -167,10 +167,10 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] input[1] = BOWTIE2_BUILD.out.index - input[2] = [[ id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + input[2] = [[ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[3] = false //save_unaligned input[4] = false //sort """ @@ -184,7 +184,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -200,7 +200,7 @@ nextflow_process { """ input[0] = [ [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -213,12 +213,12 @@ nextflow_process { input[0] = [ [ id:'test', single_end:false ], // meta map [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ] input[1] = BOWTIE2_BUILD.out.index - input[2] = [[ id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + input[2] = [[ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[3] = false //save_unaligned input[4] = false //sort """ @@ -232,7 +232,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -248,7 +248,7 @@ nextflow_process { """ input[0] = [ [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -261,12 +261,12 @@ nextflow_process { input[0] = [ [ id:'test', single_end:false ], // meta map [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ] input[1] = BOWTIE2_BUILD.out.index - input[2] = [[ id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + input[2] = [[ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[3] = false //save_unaligned input[4] = false //sort """ @@ -280,7 +280,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -297,7 +297,7 @@ nextflow_process { """ input[0] = [ [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -309,10 +309,10 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] input[1] = BOWTIE2_BUILD.out.index - input[2] = [[ id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + input[2] = [[ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[3] = false //save_unaligned input[4] = false //sort """ @@ -326,7 +326,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -343,7 +343,7 @@ nextflow_process { """ input[0] = [ [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -356,12 +356,12 @@ nextflow_process { input[0] = [ [ id:'test', single_end:false ], // meta map [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ] input[1] = BOWTIE2_BUILD.out.index - input[2] = [[ id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + input[2] = [[ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[3] = false //save_unaligned input[4] = false //sort """ @@ -375,7 +375,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -391,7 +391,7 @@ nextflow_process { """ input[0] = [ [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -404,12 +404,12 @@ nextflow_process { input[0] = [ [ id:'test', single_end:false ], // meta map [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ] input[1] = BOWTIE2_BUILD.out.index - input[2] = [[ id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + input[2] = [[ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[3] = false //save_unaligned input[4] = false //sort """ @@ -423,7 +423,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -439,7 +439,7 @@ nextflow_process { """ input[0] = [ [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -451,10 +451,10 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] input[1] = BOWTIE2_BUILD.out.index - input[2] = [[ id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + input[2] = [[ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[3] = false //save_unaligned input[4] = false //sort """ @@ -468,7 +468,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) @@ -486,7 +486,7 @@ nextflow_process { """ input[0] = [ [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -499,12 +499,12 @@ nextflow_process { input[0] = [ [ id:'test', single_end:false ], // meta map [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ] input[1] = BOWTIE2_BUILD.out.index - input[2] = [[ id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + input[2] = [[ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[3] = false //save_unaligned input[4] = true //sort """ @@ -533,7 +533,7 @@ nextflow_process { """ input[0] = [ [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -546,12 +546,12 @@ nextflow_process { input[0] = [ [ id:'test', single_end:false ], // meta map [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ] input[1] = BOWTIE2_BUILD.out.index - input[2] = [[ id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + input[2] = [[ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[3] = false //save_unaligned input[4] = false //sort """ @@ -566,7 +566,7 @@ nextflow_process { file(process.out.csi[0][1]).name, file(process.out.log[0][1]).name, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -583,7 +583,7 @@ nextflow_process { """ input[0] = [ [ id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -595,10 +595,10 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] input[1] = BOWTIE2_BUILD.out.index - input[2] = [[ id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + input[2] = [[ id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[3] = false //save_unaligned input[4] = false //sort """ @@ -613,7 +613,7 @@ nextflow_process { file(process.out.csi[0][1]).name, file(process.out.log[0][1]).name, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } diff --git a/modules/nf-core/bowtie2/align/tests/main.nf.test.snap b/modules/nf-core/bowtie2/align/tests/main.nf.test.snap index 028e7da6..b1df41e7 100644 --- a/modules/nf-core/bowtie2/align/tests/main.nf.test.snap +++ b/modules/nf-core/bowtie2/align/tests/main.nf.test.snap @@ -14,24 +14,44 @@ [ ], - [ - "versions.yml:md5,01d18ab035146ea790e9a0f70adb758f" - ] + { + "versions_bowtie2": [ + [ + "BOWTIE2_ALIGN", + "bowtie2", + "2.5.4" + ] + ], + "versions_pigz": [ + [ + "BOWTIE2_ALIGN", + "pigz", + "2.8" + ] + ], + "versions_samtools": [ + [ + "BOWTIE2_ALIGN", + "samtools", + "1.21" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-03-18T13:19:25.337323" + "timestamp": "2026-02-03T15:18:12.706444258" }, "sarscov2 - fastq, index, fasta, false, false - sam2": { "content": [ [ - "ERR5069949.2151832\t16\tMT192765.1\t17453\t42\t150M\t*\t0\t0\tACGCACATTGCTAACTAAGGGCACACTAGAACCAGAATATTTCAATTCAGTGTGTAGACTTATGAAAACTATAGGTCCAGACATGTTCCTCGGAACTTGTCGGCGTTGTCCTGCTGAAATTGTTGACACTGTGAGTGCTTTGGTTTATGA\tAAAA&1 | head -1 | sed "s/^.*bowtie2-align-s version //; s/ .*//"'), emit: versions_bowtie2, topic: versions when: task.ext.when == null || task.ext.when @@ -22,10 +22,6 @@ process BOWTIE2_BUILD { """ mkdir bowtie2 bowtie2-build $args --threads $task.cpus $fasta bowtie2/${fasta.baseName} - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bowtie2: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') - END_VERSIONS """ stub: @@ -33,10 +29,5 @@ process BOWTIE2_BUILD { mkdir bowtie2 touch bowtie2/${fasta.baseName}.{1..4}.bt2 touch bowtie2/${fasta.baseName}.rev.{1,2}.bt2 - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bowtie2: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/bowtie2/build/meta.yml b/modules/nf-core/bowtie2/build/meta.yml index 2d687991..3a9d31cf 100644 --- a/modules/nf-core/bowtie2/build/meta.yml +++ b/modules/nf-core/bowtie2/build/meta.yml @@ -15,29 +15,52 @@ tools: documentation: http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml doi: 10.1038/nmeth.1923 licence: ["GPL-3.0-or-later"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Input genome fasta file + - - meta: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Input genome fasta file + ontologies: [] output: - - meta: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test', single_end:false ] - - index: - type: file - description: Bowtie2 genome index files - pattern: "*.bt2" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + index: + - - meta: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test', single_end:false ] + - bowtie2: + type: directory + description: Bowtie2 genome index files + pattern: "*.bt2" + ontologies: [] + versions_bowtie2: + - - ${task.process}: + type: string + description: The name of the process + - bowtie2: + type: string + description: The name of the tool + - 'bowtie2 --version 2>&1 | head -1 | sed "s/^.*bowtie2-align-s version //; s/ .*//"': + type: eval + description: The expression to obtain the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - bowtie2: + type: string + description: The name of the tool + - 'bowtie2 --version 2>&1 | head -1 | sed "s/^.*bowtie2-align-s version //; s/ .*//"': + type: eval + description: The expression to obtain the version of the tool + authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/bowtie2/build/tests/main.nf.test b/modules/nf-core/bowtie2/build/tests/main.nf.test index 16376025..a4bad2a1 100644 --- a/modules/nf-core/bowtie2/build/tests/main.nf.test +++ b/modules/nf-core/bowtie2/build/tests/main.nf.test @@ -1,7 +1,7 @@ nextflow_process { name "Test Process BOWTIE2_BUILD" - script "modules/nf-core/bowtie2/build/main.nf" + script "../main.nf" process "BOWTIE2_BUILD" tag "modules" tag "modules_nfcore" @@ -15,15 +15,20 @@ nextflow_process { """ input[0] = [ [ id:'test' ], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } } then { - assert process.success - assert snapshot(process.out).match() + assertAll ( + { assert process.success }, + { assert snapshot( + process.out.index, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } + ) } } diff --git a/modules/nf-core/bowtie2/build/tests/main.nf.test.snap b/modules/nf-core/bowtie2/build/tests/main.nf.test.snap index 6875e021..9f1bf080 100644 --- a/modules/nf-core/bowtie2/build/tests/main.nf.test.snap +++ b/modules/nf-core/bowtie2/build/tests/main.nf.test.snap @@ -1,45 +1,35 @@ { "Should run without failures": { "content": [ - { - "0": [ + [ + [ + { + "id": "test" + }, [ - { - "id": "test" - }, - [ - "genome.1.bt2:md5,cbe3d0bbea55bc57c99b4bfa25b5fbdf", - "genome.2.bt2:md5,47b153cd1319abc88dda532462651fcf", - "genome.3.bt2:md5,4ed93abba181d8dfab2e303e33114777", - "genome.4.bt2:md5,c25be5f8b0378abf7a58c8a880b87626", - "genome.rev.1.bt2:md5,52be6950579598a990570fbcf5372184", - "genome.rev.2.bt2:md5,e3b4ef343dea4dd571642010a7d09597" - ] + "genome.1.bt2:md5,cbe3d0bbea55bc57c99b4bfa25b5fbdf", + "genome.2.bt2:md5,47b153cd1319abc88dda532462651fcf", + "genome.3.bt2:md5,4ed93abba181d8dfab2e303e33114777", + "genome.4.bt2:md5,c25be5f8b0378abf7a58c8a880b87626", + "genome.rev.1.bt2:md5,52be6950579598a990570fbcf5372184", + "genome.rev.2.bt2:md5,e3b4ef343dea4dd571642010a7d09597" ] - ], - "1": [ - "versions.yml:md5,1df11e9b82891527271c889c880d3974" - ], - "index": [ + ] + ], + { + "versions_bowtie2": [ [ - { - "id": "test" - }, - [ - "genome.1.bt2:md5,cbe3d0bbea55bc57c99b4bfa25b5fbdf", - "genome.2.bt2:md5,47b153cd1319abc88dda532462651fcf", - "genome.3.bt2:md5,4ed93abba181d8dfab2e303e33114777", - "genome.4.bt2:md5,c25be5f8b0378abf7a58c8a880b87626", - "genome.rev.1.bt2:md5,52be6950579598a990570fbcf5372184", - "genome.rev.2.bt2:md5,e3b4ef343dea4dd571642010a7d09597" - ] + "BOWTIE2_BUILD", + "bowtie2", + "2.5.4" ] - ], - "versions": [ - "versions.yml:md5,1df11e9b82891527271c889c880d3974" ] } ], - "timestamp": "2023-11-23T11:51:01.107681997" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-01-28T17:52:30.165111" } } \ No newline at end of file diff --git a/modules/nf-core/bowtie2/build/tests/tags.yml b/modules/nf-core/bowtie2/build/tests/tags.yml deleted file mode 100644 index 81aa61da..00000000 --- a/modules/nf-core/bowtie2/build/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -bowtie2/build: - - modules/nf-core/bowtie2/build/** diff --git a/modules/nf-core/bwa/index/environment.yml b/modules/nf-core/bwa/index/environment.yml index 126e0034..54e67949 100644 --- a/modules/nf-core/bwa/index/environment.yml +++ b/modules/nf-core/bwa/index/environment.yml @@ -1,7 +1,13 @@ -name: bwa_index +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults + dependencies: - - bioconda::bwa=0.7.18 + # renovate: datasource=conda depName=bioconda/bwa + - bioconda::bwa=0.7.19 + # renovate: datasource=conda depName=bioconda/htslib + - bioconda::htslib=1.22.1 + # renovate: datasource=conda depName=bioconda/samtools + - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/bwa/index/main.nf b/modules/nf-core/bwa/index/main.nf index 2e48b6ca..6be2c43b 100644 --- a/modules/nf-core/bwa/index/main.nf +++ b/modules/nf-core/bwa/index/main.nf @@ -1,18 +1,20 @@ process BWA_INDEX { tag "$fasta" - label 'process_single' + // NOTE requires 5.37N memory where N is the size of the database + // source: https://bio-bwa.sourceforge.net/bwa.shtml#8 + memory { 6.B * fasta.size() } conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bwa:0.7.18--he4a0461_0' : - 'biocontainers/bwa:0.7.18--he4a0461_0' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/d7/d7e24dc1e4d93ca4d3a76a78d4c834a7be3985b0e1e56fddd61662e047863a8a/data' : + 'community.wave.seqera.io/library/bwa_htslib_samtools:83b50ff84ead50d0' }" input: tuple val(meta), path(fasta) output: - tuple val(meta), path(bwa) , emit: index - path "versions.yml" , emit: versions + tuple val(meta), path("bwa"), emit: index + tuple val("${task.process}"), val('bwa'), eval('bwa 2>&1 | sed -n "s/^Version: //p"'), topic: versions, emit: versions_bwa when: task.ext.when == null || task.ext.when @@ -27,27 +29,16 @@ process BWA_INDEX { $args \\ -p bwa/${prefix} \\ $fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') - END_VERSIONS """ stub: def prefix = task.ext.prefix ?: "${fasta.baseName}" """ mkdir bwa - touch bwa/${prefix}.amb touch bwa/${prefix}.ann touch bwa/${prefix}.bwt touch bwa/${prefix}.pac touch bwa/${prefix}.sa - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/bwa/index/meta.yml b/modules/nf-core/bwa/index/meta.yml index 4c7d30f3..f5bf7f52 100644 --- a/modules/nf-core/bwa/index/meta.yml +++ b/modules/nf-core/bwa/index/meta.yml @@ -11,36 +11,61 @@ tools: BWA is a software package for mapping DNA sequences against a large reference genome, such as the human genome. homepage: http://bio-bwa.sourceforge.net/ - documentation: http://www.htslib.org/doc/samtools.html + documentation: https://bio-bwa.sourceforge.net/bwa.shtml arxiv: arXiv:1303.3997 licence: ["GPL-3.0-or-later"] + identifier: "biotools:bwa" input: - - meta: - type: map - description: | - Groovy Map containing reference information. - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Input genome fasta file + - - meta: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Input genome fasta file + ontologies: + - edam: "http://edamontology.org/data_2044" # Sequence + - edam: "http://edamontology.org/format_1929" # FASTA output: - - meta: - type: map - description: | - Groovy Map containing reference information. - e.g. [ id:'test', single_end:false ] - - index: - type: file - description: BWA genome index files - pattern: "*.{amb,ann,bwt,pac,sa}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + index: + - - meta: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - bwa: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + pattern: "*.{amb,ann,bwt,pac,sa}" + ontologies: + - edam: "http://edamontology.org/data_3210" # Genome index + versions_bwa: + - - ${task.process}: + type: string + description: The process the versions were collected from + - bwa: + type: string + description: The tool name + - 'bwa 2>&1 | sed -n "s/^Version: //p"': + type: string + description: The command used to generate the version of the tool +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - bwa: + type: string + description: The tool name + - 'bwa 2>&1 | sed -n "s/^Version: //p"': + type: string + description: The command used to generate the version of the tool authors: - "@drpatelh" - "@maxulysse" maintainers: - - "@drpatelh" - "@maxulysse" - "@gallvp" diff --git a/modules/nf-core/bwa/index/tests/main.nf.test b/modules/nf-core/bwa/index/tests/main.nf.test index af33e73c..f0fba82a 100644 --- a/modules/nf-core/bwa/index/tests/main.nf.test +++ b/modules/nf-core/bwa/index/tests/main.nf.test @@ -22,8 +22,32 @@ nextflow_process { } then { + assert process.success + assertAll( + { assert snapshot(process.out).match() } + ) + } + + } + + test("BWA index - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [id: 'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assert process.success assertAll( - { assert process.success }, { assert snapshot(process.out).match() } ) } diff --git a/modules/nf-core/bwa/index/tests/main.nf.test.snap b/modules/nf-core/bwa/index/tests/main.nf.test.snap index 7c8f0465..21a6f73c 100644 --- a/modules/nf-core/bwa/index/tests/main.nf.test.snap +++ b/modules/nf-core/bwa/index/tests/main.nf.test.snap @@ -1,4 +1,57 @@ { + "BWA index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "genome.amb:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.ann:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.bwt:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.pac:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.sa:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + [ + "BWA_INDEX", + "bwa", + "0.7.19-r1273" + ] + ], + "index": [ + [ + { + "id": "test" + }, + [ + "genome.amb:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.ann:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.bwt:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.pac:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.sa:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions_bwa": [ + [ + "BWA_INDEX", + "bwa", + "0.7.19-r1273" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-01-23T16:58:59.966558606" + }, "BWA index": { "content": [ { @@ -17,7 +70,11 @@ ] ], "1": [ - "versions.yml:md5,a64462ac7dfb21f4ade9b02e7f65c5bb" + [ + "BWA_INDEX", + "bwa", + "0.7.19-r1273" + ] ], "index": [ [ @@ -33,15 +90,19 @@ ] ] ], - "versions": [ - "versions.yml:md5,a64462ac7dfb21f4ade9b02e7f65c5bb" + "versions_bwa": [ + [ + "BWA_INDEX", + "bwa", + "0.7.19-r1273" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-05-16T11:40:09.925307" + "timestamp": "2026-01-23T16:58:53.330725134" } } \ No newline at end of file diff --git a/modules/nf-core/bwa/index/tests/tags.yml b/modules/nf-core/bwa/index/tests/tags.yml deleted file mode 100644 index 28bb483c..00000000 --- a/modules/nf-core/bwa/index/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -bwa/index: - - modules/nf-core/bwa/index/** diff --git a/modules/nf-core/bwa/mem/environment.yml b/modules/nf-core/bwa/mem/environment.yml index 3aa9f0cc..54e67949 100644 --- a/modules/nf-core/bwa/mem/environment.yml +++ b/modules/nf-core/bwa/mem/environment.yml @@ -1,10 +1,13 @@ -name: bwa_mem +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults + dependencies: - - bwa=0.7.18 + # renovate: datasource=conda depName=bioconda/bwa + - bioconda::bwa=0.7.19 + # renovate: datasource=conda depName=bioconda/htslib + - bioconda::htslib=1.22.1 # renovate: datasource=conda depName=bioconda/samtools - - samtools=1.20 - - htslib=1.20.0 + - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/bwa/mem/main.nf b/modules/nf-core/bwa/mem/main.nf index 9c815f0c..e3732673 100644 --- a/modules/nf-core/bwa/mem/main.nf +++ b/modules/nf-core/bwa/mem/main.nf @@ -4,8 +4,8 @@ process BWA_MEM { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:1bd8542a8a0b42e0981337910954371d0230828e-0' : - 'biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:1bd8542a8a0b42e0981337910954371d0230828e-0' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/d7/d7e24dc1e4d93ca4d3a76a78d4c834a7be3985b0e1e56fddd61662e047863a8a/data' : + 'community.wave.seqera.io/library/bwa_htslib_samtools:83b50ff84ead50d0' }" input: tuple val(meta) , path(reads) @@ -18,7 +18,8 @@ process BWA_MEM { tuple val(meta), path("*.cram") , emit: cram, optional: true tuple val(meta), path("*.csi") , emit: csi, optional: true tuple val(meta), path("*.crai") , emit: crai, optional: true - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('bwa'), eval('bwa 2>&1 | sed -n "s/^Version: //p"'), topic: versions, emit: versions_bwa + tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), topic: versions, emit: versions_samtools when: task.ext.when == null || task.ext.when @@ -44,19 +45,11 @@ process BWA_MEM { \$INDEX \\ $reads \\ | samtools $samtools_command $args2 ${reference} --threads $task.cpus -o ${prefix}.${extension} - - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ stub: - def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def samtools_command = sort_bam ? 'sort' : 'view' def extension = args2.contains("--output-fmt sam") ? "sam" : args2.contains("--output-fmt cram") ? "cram": sort_bam && args2.contains("-O cram")? "cram": @@ -66,11 +59,5 @@ process BWA_MEM { touch ${prefix}.${extension} touch ${prefix}.csi touch ${prefix}.crai - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/bwa/mem/meta.yml b/modules/nf-core/bwa/mem/meta.yml index 1532c261..450a3fe9 100644 --- a/modules/nf-core/bwa/mem/meta.yml +++ b/modules/nf-core/bwa/mem/meta.yml @@ -14,58 +14,131 @@ tools: BWA is a software package for mapping DNA sequences against a large reference genome, such as the human genome. homepage: http://bio-bwa.sourceforge.net/ - documentation: http://www.htslib.org/doc/samtools.html + documentation: https://bio-bwa.sourceforge.net/bwa.shtml arxiv: arXiv:1303.3997 - licence: ["GPL-3.0-or-later"] + licence: + - "GPL-3.0-or-later" + identifier: "biotools:bwa" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - meta2: - type: map - description: | - Groovy Map containing reference information. - e.g. [ id:'test', single_end:false ] - - index: - type: file - description: BWA genome index files - pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" - - fasta: - type: file - description: Reference genome in FASTA format - pattern: "*.{fasta,fa}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + ontologies: + - edam: "http://edamontology.org/data_2044" + - edam: "http://edamontology.org/format_1930" + - - meta2: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - index: + type: file + description: BWA genome index files + pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" + ontologies: + - edam: "http://edamontology.org/data_3210" + - - meta3: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Reference genome in FASTA format + pattern: "*.{fasta,fa}" + ontologies: + - edam: "http://edamontology.org/data_2044" + - edam: "http://edamontology.org/format_1929" - sort_bam: type: boolean description: use samtools sort (true) or samtools view (false) pattern: "true or false" output: - - bam: - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" - - cram: - type: file - description: Output CRAM file containing read alignments - pattern: "*.{cram}" - - csi: - type: file - description: Optional index file for BAM file - pattern: "*.{csi}" - - crai: - type: file - description: Optional index file for CRAM file - pattern: "*.{crai}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + bam: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.bam": + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + ontologies: + - edam: "http://edamontology.org/format_2572" + cram: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.cram": + type: file + description: Output CRAM file containing read alignments + pattern: "*.{cram}" + ontologies: + - edam: "http://edamontology.org/format_3462" + csi: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.csi": + type: file + description: Optional index file for BAM file + pattern: "*.{csi}" + ontologies: [] + crai: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.crai": + type: file + description: Optional index file for CRAM file + pattern: "*.{crai}" + ontologies: [] + versions_bwa: + - - ${task.process}: + type: string + description: The name of the process + - bwa: + type: string + description: The name of the tool + - 'bwa 2>&1 | sed -n "s/^Version: //p"': + type: eval + description: The expression to obtain the version of the tool + versions_samtools: + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - bwa: + type: string + description: The name of the tool + - 'bwa 2>&1 | sed -n "s/^Version: //p"': + type: eval + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool authors: - "@drpatelh" - "@jeremy1805" diff --git a/modules/nf-core/bwa/mem/tests/main.nf.test b/modules/nf-core/bwa/mem/tests/main.nf.test index 463b76f8..6486ab00 100644 --- a/modules/nf-core/bwa/mem/tests/main.nf.test +++ b/modules/nf-core/bwa/mem/tests/main.nf.test @@ -9,21 +9,21 @@ nextflow_process { script "../main.nf" process "BWA_MEM" - test("Single-End") { - - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } + setup { + run("BWA_INDEX") { + script "../../index/main.nf" + process { + """ + input[0] = [ + [id: 'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ } } + } + + test("Single-End") { when { process { @@ -48,8 +48,8 @@ nextflow_process { process.out.cram, process.out.csi, process.out.crai, - process.out.versions, - file(process.out.bam[0][1]).name + process.out.findAll { key, val -> key.startsWith("versions") }, + bam(process.out.bam[0][1]).getReadsMD5() ).match() } ) @@ -59,20 +59,6 @@ nextflow_process { test("Single-End Sort") { - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - } - when { process { """ @@ -96,8 +82,8 @@ nextflow_process { process.out.cram, process.out.csi, process.out.crai, - process.out.versions, - file(process.out.bam[0][1]).name + process.out.findAll { key, val -> key.startsWith("versions") }, + bam(process.out.bam[0][1]).getReadsMD5() ).match() } ) @@ -107,20 +93,6 @@ nextflow_process { test("Paired-End") { - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - } - when { process { """ @@ -145,8 +117,8 @@ nextflow_process { process.out.cram, process.out.csi, process.out.crai, - process.out.versions, - file(process.out.bam[0][1]).name + process.out.findAll { key, val -> key.startsWith("versions") }, + bam(process.out.bam[0][1]).getReadsMD5() ).match() } ) @@ -156,20 +128,6 @@ nextflow_process { test("Paired-End Sort") { - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - } - when { process { """ @@ -194,8 +152,8 @@ nextflow_process { process.out.cram, process.out.csi, process.out.crai, - process.out.versions, - file(process.out.bam[0][1]).name + process.out.findAll { key, val -> key.startsWith("versions") }, + bam(process.out.bam[0][1]).getReadsMD5() ).match() } ) @@ -205,20 +163,6 @@ nextflow_process { test("Paired-End - no fasta") { - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - } - when { process { """ @@ -243,8 +187,8 @@ nextflow_process { process.out.cram, process.out.csi, process.out.crai, - process.out.versions, - file(process.out.bam[0][1]).name + process.out.findAll { key, val -> key.startsWith("versions") }, + bam(process.out.bam[0][1]).getReadsMD5() ).match() } ) @@ -253,20 +197,9 @@ nextflow_process { } test("Single-end - stub") { + options "-stub" - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - } + when { process { """ @@ -286,30 +219,15 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - file(process.out.bam[0][1]).name, - file(process.out.csi[0][1]).name, - process.out.versions - ).match() } + { assert snapshot(process.out).match() } ) } } test("Paired-end - stub") { + options "-stub" - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - } + when { process { """ @@ -330,11 +248,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - file(process.out.bam[0][1]).name, - file(process.out.csi[0][1]).name, - process.out.versions - ).match() } + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/bwa/mem/tests/main.nf.test.snap b/modules/nf-core/bwa/mem/tests/main.nf.test.snap index 038ee7b7..8aca4b23 100644 --- a/modules/nf-core/bwa/mem/tests/main.nf.test.snap +++ b/modules/nf-core/bwa/mem/tests/main.nf.test.snap @@ -10,16 +10,29 @@ [ ], - [ - "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" - ], - "test.bam" + { + "versions_bwa": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "versions_samtools": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] + ] + }, + "798439cbd7fd81cbcc5078022dc5479d" ], + "timestamp": "2026-02-18T12:42:52.901827", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-20T08:44:32.953673185" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "Single-End Sort": { "content": [ @@ -32,16 +45,29 @@ [ ], - [ - "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" - ], - "test.bam" + { + "versions_bwa": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "versions_samtools": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] + ] + }, + "94fcf617f5b994584c4e8d4044e16b4f" ], + "timestamp": "2026-02-18T12:43:01.149915", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-20T08:44:45.27066093" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "Paired-End": { "content": [ @@ -54,16 +80,29 @@ [ ], - [ - "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" - ], - "test.bam" + { + "versions_bwa": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "versions_samtools": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] + ] + }, + "57aeef88ed701a8ebc8e2f0a381b2a6" ], + "timestamp": "2026-02-18T12:43:09.528042", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-20T08:44:57.706852274" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "Paired-End Sort": { "content": [ @@ -76,30 +115,128 @@ [ ], - [ - "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" - ], - "test.bam" + { + "versions_bwa": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "versions_samtools": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] + ] + }, + "af8628d9df18b2d3d4f6fd47ef2bb872" ], + "timestamp": "2026-02-18T12:43:17.876121", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-20T08:45:10.376505036" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "Single-end - stub": { "content": [ - "test.bam", - "test.csi", - [ - "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "5": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "crai": [ + [ + { + "id": "test", + "single_end": true + }, + "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "cram": [ + + ], + "csi": [ + [ + { + "id": "test", + "single_end": true + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_bwa": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "versions_samtools": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] + ] + } ], + "timestamp": "2026-02-18T12:43:33.853248", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-20T08:46:07.182072398" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "Paired-End - no fasta": { "content": [ @@ -112,29 +249,127 @@ [ ], - [ - "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" - ], - "test.bam" + { + "versions_bwa": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "versions_samtools": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] + ] + }, + "57aeef88ed701a8ebc8e2f0a381b2a6" ], + "timestamp": "2026-02-18T12:43:26.121474", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-20T08:45:53.813076501" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } }, "Paired-end - stub": { "content": [ - "test.bam", - "test.csi", - [ - "versions.yml:md5,478b816fbd37871f5e8c617833d51d80" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "5": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "crai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "cram": [ + + ], + "csi": [ + [ + { + "id": "test", + "single_end": false + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_bwa": [ + [ + "BWA_MEM", + "bwa", + "0.7.19-r1273" + ] + ], + "versions_samtools": [ + [ + "BWA_MEM", + "samtools", + "1.22.1" + ] + ] + } ], + "timestamp": "2026-02-18T12:43:42.119907", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-20T08:46:18.412916364" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } } } \ No newline at end of file diff --git a/modules/nf-core/bwa/mem/tests/tags.yml b/modules/nf-core/bwa/mem/tests/tags.yml deleted file mode 100644 index 82992d1f..00000000 --- a/modules/nf-core/bwa/mem/tests/tags.yml +++ /dev/null @@ -1,3 +0,0 @@ -bwa/mem: - - modules/nf-core/bwa/index/** - - modules/nf-core/bwa/mem/** diff --git a/modules/nf-core/cat/fastq/environment.yml b/modules/nf-core/cat/fastq/environment.yml index 8c69b121..9b926b1f 100644 --- a/modules/nf-core/cat/fastq/environment.yml +++ b/modules/nf-core/cat/fastq/environment.yml @@ -1,7 +1,12 @@ -name: cat_fastq +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - conda-forge::coreutils=8.30 + - conda-forge::coreutils=9.5 + - conda-forge::grep=3.11 + - conda-forge::gzip=1.13 + - conda-forge::lbzip2=2.5 + - conda-forge::sed=4.8 + - conda-forge::tar=1.34 diff --git a/modules/nf-core/cat/fastq/main.nf b/modules/nf-core/cat/fastq/main.nf index f132b2ad..e70af3d1 100644 --- a/modules/nf-core/cat/fastq/main.nf +++ b/modules/nf-core/cat/fastq/main.nf @@ -1,79 +1,69 @@ process CAT_FASTQ { - tag "$meta.id" + tag "${meta.id}" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'nf-core/ubuntu:20.04' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/52/52ccce28d2ab928ab862e25aae26314d69c8e38bd41ca9431c67ef05221348aa/data' + : 'community.wave.seqera.io/library/coreutils_grep_gzip_lbzip2_pruned:838ba80435a629f8'}" input: tuple val(meta), path(reads, stageAs: "input*/*") output: tuple val(meta), path("*.merged.fastq.gz"), emit: reads - path "versions.yml" , emit: versions + tuple val("${task.process}"), val("cat"), eval("cat --version 2>&1 | head -n 1 | sed 's/^.*coreutils) //; s/ .*\$//'"), emit: versions_cat, topic: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def readList = reads instanceof List ? reads.collect{ it.toString() } : [reads.toString()] + def readList = reads instanceof List ? reads.collect { item -> item.toString() } : [reads.toString()] + def compress = readList[0]?.endsWith('.gz') ? '' : '| gzip' if (meta.single_end) { if (readList.size >= 1) { """ - cat ${readList.join(' ')} > ${prefix}.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS + cat ${readList.join(' ')} ${compress} > ${prefix}.merged.fastq.gz """ + } else { + error("Could not find any FASTQ files to concatenate in the process input") } - } else { + } + else { if (readList.size >= 2) { def read1 = [] def read2 = [] - readList.eachWithIndex{ v, ix -> ( ix & 1 ? read2 : read1 ) << v } + readList.eachWithIndex { v, ix -> (ix & 1 ? read2 : read1) << v } """ - cat ${read1.join(' ')} > ${prefix}_1.merged.fastq.gz - cat ${read2.join(' ')} > ${prefix}_2.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS + cat ${read1.join(' ')} ${compress} > ${prefix}_1.merged.fastq.gz + cat ${read2.join(' ')} ${compress} > ${prefix}_2.merged.fastq.gz """ + } else { + error("Could not find any FASTQ file pairs to concatenate in the process input") } } stub: def prefix = task.ext.prefix ?: "${meta.id}" - def readList = reads instanceof List ? reads.collect{ it.toString() } : [reads.toString()] + def readList = reads instanceof List ? reads.collect { item -> item.toString() } : [reads.toString()] if (meta.single_end) { - if (readList.size > 1) { + if (readList.size >= 1) { """ - touch ${prefix}.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS + echo '' | gzip > ${prefix}.merged.fastq.gz """ + } else { + error("Could not find any FASTQ files to concatenate in the process input") } - } else { - if (readList.size > 2) { + } + else { + if (readList.size >= 2) { """ - touch ${prefix}_1.merged.fastq.gz - touch ${prefix}_2.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS + echo '' | gzip > ${prefix}_1.merged.fastq.gz + echo '' | gzip > ${prefix}_2.merged.fastq.gz """ + } else { + error("Could not find any FASTQ file pairs to concatenate in the process input") } } } diff --git a/modules/nf-core/cat/fastq/meta.yml b/modules/nf-core/cat/fastq/meta.yml index db4ac3c7..6fefd6e0 100644 --- a/modules/nf-core/cat/fastq/meta.yml +++ b/modules/nf-core/cat/fastq/meta.yml @@ -1,39 +1,64 @@ name: cat_fastq -description: Concatenates fastq files +description: Concatenates fastq files. Supports both compressed (.gz) and uncompressed inputs; uncompressed files are automatically gzip-compressed during concatenation. keywords: - cat - fastq - concatenate + - compress tools: - cat: description: | The cat utility reads files sequentially, writing them to the standard output. documentation: https://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html licence: ["GPL-3.0-or-later"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files to be concatenated. + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files to be concatenated. + Accepts both gzip-compressed (.fastq.gz) and uncompressed (.fastq) files. + ontologies: [] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: Merged fastq file - pattern: "*.{merged.fastq.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + reads: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.merged.fastq.gz": + type: file + description: Merged fastq file + pattern: "*.{merged.fastq.gz}" + ontologies: [] + versions_cat: + - - ${task.process}: + type: string + description: The process the versions were collected from + - cat: + type: string + description: The tool name + - cat --version 2>&1 | head -n 1 | sed 's/^.*coreutils) //; s/ .*\$//': + type: eval + description: The expression to obtain the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - cat: + type: string + description: The tool name + - cat --version 2>&1 | head -n 1 | sed 's/^.*coreutils) //; s/ .*\$//': + type: eval + description: The expression to obtain the version of the tool + authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test b/modules/nf-core/cat/fastq/tests/main.nf.test index a71dcb8d..21052d90 100644 --- a/modules/nf-core/cat/fastq/tests/main.nf.test +++ b/modules/nf-core/cat/fastq/tests/main.nf.test @@ -1,5 +1,3 @@ -// 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" @@ -9,13 +7,11 @@ nextflow_process { tag "modules_nfcore" tag "cat" tag "cat/fastq" + tag "gunzip" test("test_cat_fastq_single_end") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -38,9 +34,6 @@ nextflow_process { test("test_cat_fastq_paired_end") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -65,9 +58,6 @@ nextflow_process { test("test_cat_fastq_single_end_same_name") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -90,9 +80,6 @@ nextflow_process { test("test_cat_fastq_paired_end_same_name") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -114,12 +101,202 @@ nextflow_process { } } + test("test_cat_fastq_single_end_uncompressed") { + + setup { + run("GUNZIP") { + script "../../../gunzip/main.nf" + process { + """ + input[0] = Channel.of( + [[ id:'r1' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)], + [[ id:'r2' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ) + """ + } + } + } + + when { + process { + """ + input[0] = GUNZIP.out.gunzip + .toSortedList { a, b -> a[0].id <=> b[0].id } + .map { items -> [[ id: 'test', single_end: true ], items.collect { it[1] }] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_paired_end_uncompressed") { + + setup { + run("GUNZIP") { + script "../../../gunzip/main.nf" + process { + """ + input[0] = Channel.of( + [[ id:'a' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)], + [[ id:'b' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)], + [[ id:'c' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_1.fastq.gz', checkIfExists: true)], + [[ id:'d' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_2.fastq.gz', checkIfExists: true)] + ) + """ + } + } + } + + when { + process { + """ + input[0] = GUNZIP.out.gunzip + .toSortedList { a, b -> a[0].id <=> b[0].id } + .map { items -> [[ id: 'test', single_end: false ], items.collect { it[1] }] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + test("test_cat_fastq_single_end_single_file") { when { - params { - outdir = "$outputDir" + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_single_end - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_paired_end - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_2.fastq.gz', checkIfExists: true)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_single_end_same_name - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_paired_end_same_name - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ]) + """ } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_single_end_single_file - stub") { + + options "-stub" + + when { process { """ input[0] = Channel.of([ @@ -137,4 +314,92 @@ nextflow_process { ) } } + + test("test_cat_fastq_single_end_no_files") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [] + ]) + """ + } + } + + then { + assertAll( + { assert process.failed }, + { assert snapshot(process.stdout.find { it.contains("-- Check script") }.split(" -- Check script")[0]).match() } + ) + } + } + + test("test_cat_fastq_paired_end_no_files") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [] + ]) + """ + } + } + + then { + assertAll( + { assert process.failed }, + { assert snapshot(process.stdout.find { it.contains("-- Check script") }.split(" -- Check script")[0]).match() } + ) + } + } + + test("test_cat_fastq_single_end_no_files - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [] + ]) + """ + } + } + + then { + assertAll( + { assert process.failed }, + { assert snapshot(process.stdout.find { it.contains("-- Check script") }.split(" -- Check script")[0]).match() } + ) + } + } + + test("test_cat_fastq_paired_end_no_files - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [] + ]) + """ + } + } + + then { + assertAll( + { assert process.failed }, + { assert snapshot(process.stdout.find { it.contains("-- Check script") }.split(" -- Check script")[0]).match() } + ) + } + } } diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test.snap b/modules/nf-core/cat/fastq/tests/main.nf.test.snap index 43dfe28f..6375b2ab 100644 --- a/modules/nf-core/cat/fastq/tests/main.nf.test.snap +++ b/modules/nf-core/cat/fastq/tests/main.nf.test.snap @@ -1,4 +1,247 @@ { + "test_cat_fastq_paired_end_no_files - stub": { + "content": [ + " Could not find any FASTQ file pairs to concatenate in the process input" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-25T17:14:51.248685461" + }, + "test_cat_fastq_single_end_single_file": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:42.84401526" + }, + "test_cat_fastq_paired_end_same_name": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", + "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + ] + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", + "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + ] + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:36.820489323" + }, + "test_cat_fastq_paired_end_same_name - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:32:06.262192935" + }, + "test_cat_fastq_single_end_uncompressed": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,ee314a9bd568d06617171b0c85f508da" + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,ee314a9bd568d06617171b0c85f508da" + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-02-09T10:03:24.344628" + }, + "test_cat_fastq_paired_end_uncompressed": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", + "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + ] + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", + "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + ] + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-02-09T10:03:37.568053" + }, "test_cat_fastq_single_end": { "content": [ { @@ -12,7 +255,11 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -23,12 +270,20 @@ "test.merged.fastq.gz:md5,ee314a9bd568d06617171b0c85f508da" ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:30:39.816981" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:18.859169785" }, "test_cat_fastq_single_end_same_name": { "content": [ @@ -43,7 +298,11 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -54,14 +313,22 @@ "test.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22" ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:32:35.229332" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:30.942615287" }, - "test_cat_fastq_single_end_single_file": { + "test_cat_fastq_single_end - stub": { "content": [ { "0": [ @@ -70,11 +337,15 @@ "id": "test", "single_end": true }, - "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -82,17 +353,88 @@ "id": "test", "single_end": true }, - "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:34:00.058829" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:48.827990633" }, - "test_cat_fastq_paired_end_same_name": { + "test_cat_fastq_paired_end_no_files": { + "content": [ + " Could not find any FASTQ file pairs to concatenate in the process input" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-25T17:14:40.806088747" + }, + "test_cat_fastq_single_end_no_files - stub": { + "content": [ + " Could not find any FASTQ files to concatenate in the process input" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-25T17:14:45.852365218" + }, + "test_cat_fastq_single_end_same_name - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:32:00.586584379" + }, + "test_cat_fastq_paired_end": { "content": [ { "0": [ @@ -108,7 +450,11 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -122,14 +468,32 @@ ] ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:33:33.031555" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:25.159365603" }, - "test_cat_fastq_paired_end": { + "test_cat_fastq_single_end_no_files": { + "content": [ + " Could not find any FASTQ files to concatenate in the process input" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-25T17:14:35.695192409" + }, + "test_cat_fastq_paired_end - stub": { "content": [ { "0": [ @@ -139,13 +503,17 @@ "single_end": false }, [ - "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", - "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -154,16 +522,67 @@ "single_end": false }, [ - "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", - "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:54.850702874" + }, + "test_cat_fastq_single_end_single_file - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:32:02.270935" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:32:11.746498148" } } \ No newline at end of file diff --git a/modules/nf-core/cat/fastq/tests/tags.yml b/modules/nf-core/cat/fastq/tests/tags.yml deleted file mode 100644 index 6ac43614..00000000 --- a/modules/nf-core/cat/fastq/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -cat/fastq: - - modules/nf-core/cat/fastq/** diff --git a/modules/nf-core/crisprcleanr/normalize/crisprcleanr-normalize.diff b/modules/nf-core/crisprcleanr/normalize/crisprcleanr-normalize.diff index c3438e19..9880ed67 100644 --- a/modules/nf-core/crisprcleanr/normalize/crisprcleanr-normalize.diff +++ b/modules/nf-core/crisprcleanr/normalize/crisprcleanr-normalize.diff @@ -1,4 +1,4 @@ -Changes in module 'nf-core/crisprcleanr/normalize' +Changes in component 'nf-core/crisprcleanr/normalize' 'modules/nf-core/crisprcleanr/normalize/environment.yml' is unchanged 'modules/nf-core/crisprcleanr/normalize/meta.yml' is unchanged Changes in 'crisprcleanr/normalize/main.nf': @@ -21,7 +21,7 @@ Changes in 'crisprcleanr/normalize/main.nf': path "versions.yml", emit: versions when: -@@ -26,20 +29,49 @@ +@@ -25,20 +28,49 @@ """ #!/usr/bin/env Rscript library(CRISPRcleanR) @@ -79,4 +79,6 @@ Changes in 'crisprcleanr/normalize/main.nf': version_crisprcleanr <- paste(unlist(packageVersion("CRISPRcleanR")), collapse = ".") f <- file(version_file_path, "w") +'modules/nf-core/crisprcleanr/normalize/tests/main.nf.test.snap' is unchanged +'modules/nf-core/crisprcleanr/normalize/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/crisprcleanr/normalize/environment.yml b/modules/nf-core/crisprcleanr/normalize/environment.yml index b183c62d..3f693476 100644 --- a/modules/nf-core/crisprcleanr/normalize/environment.yml +++ b/modules/nf-core/crisprcleanr/normalize/environment.yml @@ -1,7 +1,7 @@ -name: crisprcleanr_normalize +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::r-crisprcleanr=3.0.0 diff --git a/modules/nf-core/crisprcleanr/normalize/main.nf b/modules/nf-core/crisprcleanr/normalize/main.nf index 07f286f2..4f0fa32c 100644 --- a/modules/nf-core/crisprcleanr/normalize/main.nf +++ b/modules/nf-core/crisprcleanr/normalize/main.nf @@ -23,7 +23,6 @@ process CRISPRCLEANR_NORMALIZE { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ @@ -81,4 +80,17 @@ process CRISPRCLEANR_NORMALIZE { close(f) """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + touch ${prefix}_norm_table.tsv + cat <<-END_VERSIONS > versions.yml + "${task.process}": + R: R --version | sed '1!d; s/.*version //; s/ .*//' + CRISPRcleanR: Rscript -e 'packageVersion("CRISPRcleanR")' + END_VERSIONS + """ + } diff --git a/modules/nf-core/crisprcleanr/normalize/meta.yml b/modules/nf-core/crisprcleanr/normalize/meta.yml index e76a414f..1f11f9b2 100644 --- a/modules/nf-core/crisprcleanr/normalize/meta.yml +++ b/modules/nf-core/crisprcleanr/normalize/meta.yml @@ -7,40 +7,58 @@ keywords: - CRISPR tools: - "crisprcleanr": - description: "Analysis of CRISPR functional genomics, remove false positive due to CNVs." + description: "Analysis of CRISPR functional genomics, remove false positive due + to CNVs." homepage: "https://github.com/francescojm/CRISPRcleanR" documentation: "https://github.com/francescojm/CRISPRcleanR/blob/master/Quick_start.pdf" tool_dev_url: "https://github.com/francescojm/CRISPRcleanR/tree/v3.0.0" doi: "10.1186/s12864-018-4989-y" - licence: "['MIT']" + licence: ["MIT"] + identifier: biotools:crisprcleanr input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - count_file: - type: file - description: sgRNA raw counts - pattern: "*.tsv" - - library_file: - type: file - description: sgRNA library - pattern: "*.tsv" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - count_file: + type: file + description: sgRNA raw counts + pattern: "*.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + - library_file: + type: file + description: sgRNA library + pattern: "*.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + - min_reads: + type: integer + description: Minimum number of reads + - min_targeted_genes: + type: integer + description: Minimum number of targeted genes output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - norm_count_file: - type: file - description: normalized count file - pattern: "*.tsv" + norm_count_file: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*_norm_table.tsv": + type: file + description: normalized count file + pattern: "*.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@LaurenceKuhl" maintainers: diff --git a/modules/nf-core/crisprcleanr/normalize/tests/main.nf.test b/modules/nf-core/crisprcleanr/normalize/tests/main.nf.test new file mode 100644 index 00000000..ad8673cf --- /dev/null +++ b/modules/nf-core/crisprcleanr/normalize/tests/main.nf.test @@ -0,0 +1,71 @@ +nextflow_process { + + name "Test Process CRISPRCLEANR_NORMALIZE" + script "../main.nf" + process "CRISPRCLEANR_NORMALIZE" + + + tag "modules" + tag "modules_nfcore" + tag "crisprcleanr" + tag "crisprcleanr/normalize" + + + test("homo_sapiens - [crispr_functional_counts, crispr_functional_library]") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/tsv/functional_genomics_counts.tsv', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/tsv/library_functional_genomics.tsv', checkIfExists: true) + ] + input[1] = 30 + input[2] = 5 + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert file(process.out.norm_count_file[0][1]).text.contains("sgRNA") }, + { assert snapshot( + file(process.out.norm_count_file[0][1]).name, + process.out.versions + ).match() + } + ) + + } + + } + + test("homo_sapiens - [crispr_functional_counts, crispr_functional_library] - stub") { + options "-stub" + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/tsv/functional_genomics_counts.tsv', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/tsv/library_functional_genomics.tsv', checkIfExists: true) + ] + input[1] = 30 + input[2] = 5 + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + + } + + } + +} diff --git a/modules/nf-core/crisprcleanr/normalize/tests/main.nf.test.snap b/modules/nf-core/crisprcleanr/normalize/tests/main.nf.test.snap new file mode 100644 index 00000000..fe50739b --- /dev/null +++ b/modules/nf-core/crisprcleanr/normalize/tests/main.nf.test.snap @@ -0,0 +1,50 @@ +{ + "homo_sapiens - [crispr_functional_counts, crispr_functional_library]": { + "content": [ + "test_norm_table.tsv", + [ + "versions.yml:md5,e954dc2bfa394dae2e55be2b1c16ae31" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T07:11:43.173471859" + }, + "homo_sapiens - [crispr_functional_counts, crispr_functional_library] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test_norm_table.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,d927535d45027d86be9f9348d5bca474" + ], + "norm_count_file": [ + [ + { + "id": "test", + "single_end": false + }, + "test_norm_table.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,d927535d45027d86be9f9348d5bca474" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-30T07:16:03.002248203" + } +} \ No newline at end of file diff --git a/modules/nf-core/cutadapt/cutadapt.diff b/modules/nf-core/cutadapt/cutadapt.diff index 2816f8ac..82c233db 100644 --- a/modules/nf-core/cutadapt/cutadapt.diff +++ b/modules/nf-core/cutadapt/cutadapt.diff @@ -1,8 +1,11 @@ -Changes in module 'nf-core/cutadapt' +Changes in component 'nf-core/cutadapt' +'modules/nf-core/cutadapt/environment.yml' is unchanged +'modules/nf-core/cutadapt/meta.yml' is unchanged +Changes in 'cutadapt/main.nf': --- modules/nf-core/cutadapt/main.nf +++ modules/nf-core/cutadapt/main.nf @@ -8,7 +8,7 @@ - 'biocontainers/cutadapt:4.6--py39hf95cd2a_1' }" + 'biocontainers/cutadapt:5.2--py311haab0aaa_0'}" input: - tuple val(meta), path(reads) @@ -10,20 +13,8 @@ Changes in module 'nf-core/cutadapt' output: tuple val(meta), path('*.trim.fastq.gz'), emit: reads -@@ -30,12 +30,13 @@ - $trimmed \\ - $reads \\ - > ${prefix}.cutadapt.log -+ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cutadapt: \$(cutadapt --version) - END_VERSIONS - """ -- -+ - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - def trimmed = meta.single_end ? "${prefix}.trim.fastq.gz" : "${prefix}_1.trim.fastq.gz ${prefix}_2.trim.fastq.gz" +'modules/nf-core/cutadapt/tests/main.nf.test.snap' is unchanged +'modules/nf-core/cutadapt/tests/nextflow.config' is unchanged +'modules/nf-core/cutadapt/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/cutadapt/environment.yml b/modules/nf-core/cutadapt/environment.yml index 288ea6f0..cf84fbfa 100644 --- a/modules/nf-core/cutadapt/environment.yml +++ b/modules/nf-core/cutadapt/environment.yml @@ -1,7 +1,7 @@ -name: cutadapt +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::cutadapt=4.6 + - bioconda::cutadapt=5.2 diff --git a/modules/nf-core/cutadapt/main.nf b/modules/nf-core/cutadapt/main.nf index 128faa88..0501252d 100644 --- a/modules/nf-core/cutadapt/main.nf +++ b/modules/nf-core/cutadapt/main.nf @@ -3,9 +3,9 @@ process CUTADAPT { label 'process_medium' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/cutadapt:4.6--py39hf95cd2a_1' : - 'biocontainers/cutadapt:4.6--py39hf95cd2a_1' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/cutadapt:5.2--py311haab0aaa_0' : + 'biocontainers/cutadapt:5.2--py311haab0aaa_0'}" input: tuple val(meta), path(reads), path(adapter_seq) @@ -13,7 +13,7 @@ process CUTADAPT { output: tuple val(meta), path('*.trim.fastq.gz'), emit: reads tuple val(meta), path('*.log') , emit: log - path "versions.yml" , emit: versions + tuple val("${task.process}"), val("cutadapt"), eval('cutadapt --version'), topic: versions, emit: versions_cutadapt when: task.ext.when == null || task.ext.when @@ -24,29 +24,24 @@ process CUTADAPT { def trimmed = meta.single_end ? "-o ${prefix}.trim.fastq.gz" : "-o ${prefix}_1.trim.fastq.gz -p ${prefix}_2.trim.fastq.gz" """ cutadapt \\ - -Z \\ --cores $task.cpus \\ $args \\ $trimmed \\ $reads \\ > ${prefix}.cutadapt.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cutadapt: \$(cutadapt --version) - END_VERSIONS """ - + stub: - def prefix = task.ext.prefix ?: "${meta.id}" - def trimmed = meta.single_end ? "${prefix}.trim.fastq.gz" : "${prefix}_1.trim.fastq.gz ${prefix}_2.trim.fastq.gz" + def prefix = task.ext.prefix ?: "${meta.id}" + if (meta.single_end) { + output_command = "echo '' | gzip > ${prefix}.trim.fastq.gz ;" + } + else { + output_command = "echo '' | gzip > ${prefix}_1.trim.fastq.gz ;" + output_command += "echo '' | gzip > ${prefix}_2.trim.fastq.gz ;" + } """ + ${output_command} touch ${prefix}.cutadapt.log - touch ${trimmed} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cutadapt: \$(cutadapt --version) - END_VERSIONS """ } diff --git a/modules/nf-core/cutadapt/meta.yml b/modules/nf-core/cutadapt/meta.yml index 5ecfe27a..a4717b56 100644 --- a/modules/nf-core/cutadapt/meta.yml +++ b/modules/nf-core/cutadapt/meta.yml @@ -1,49 +1,89 @@ name: cutadapt -description: Perform adapter/quality trimming on sequencing reads +description: Removes adapter sequences from sequencing reads keywords: + - adapter + - primers + - poly-A tails - trimming - - adapter trimming - - adapters - - quality trimming + - fastq tools: - - cuatadapt: + - cutadapt: description: | - Cutadapt finds and removes adapter sequences, primers, poly-A tails and other types of unwanted sequence from your high-throughput sequencing reads. - documentation: https://cutadapt.readthedocs.io/en/stable/index.html + Cutadapt finds and removes adapter sequences, primers, poly-A tails + and other types of unwanted sequence from your high-throughput sequencing reads. + homepage: https://cutadapt.readthedocs.io/en/stable/index.html + documentation: https://github.com/marcelm/cutadapt doi: 10.14806/ej.17.1.200 licence: ["MIT"] + identifier: biotools:cutadapt + input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + pattern: "*.{fq,fastq,fq.gz,fastq.gz}" + ontologies: + - edam: "http://edamontology.org/format_1930" # FASTQ output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: The trimmed/modified fastq reads - pattern: "*fastq.gz" - - log: - type: file - description: cuatadapt log file - pattern: "*cutadapt.log" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + reads: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.trim.fastq.gz": + type: file + description: The trimmed/modified fastq reads + pattern: "*fastq.gz" + ontologies: + - edam: "http://edamontology.org/format_1930" # FASTQ + - edam: http://edamontology.org/format_3989 # GZIP format + log: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.log": + type: file + description: cutadapt log file + pattern: "*cutadapt.log" + ontologies: + - edam: "http://edamontology.org/format_2330" # Textual format + versions_cutadapt: + - - ${task.process}: + type: string + description: The name of the process + - cutadapt: + type: string + description: The name of the tool + - cutadapt --version: + type: eval + description: The expression to obtain the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - cutadapt: + type: string + description: The name of the tool + - cutadapt --version: + type: eval + description: The expression to obtain the version of the tool + authors: - "@drpatelh" - "@kevinmenden" maintainers: - "@drpatelh" - "@kevinmenden" + - "@vagkaratzas" diff --git a/modules/nf-core/cutadapt/tests/main.nf.test b/modules/nf-core/cutadapt/tests/main.nf.test index b7ea6ef9..0e3f7fef 100644 --- a/modules/nf-core/cutadapt/tests/main.nf.test +++ b/modules/nf-core/cutadapt/tests/main.nf.test @@ -3,22 +3,20 @@ nextflow_process { name "Test Process CUTADAPT" script "../main.nf" process "CUTADAPT" + tag "modules" tag "modules_nfcore" tag "cutadapt" - test("sarscov2 Illumina single end [fastq]") { + test("sarscov2 - fastq - single-end") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = [ [ id: 'test', single_end:true ], [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] ] """ @@ -28,27 +26,25 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert process.out.reads != null }, - { assert process.out.reads.get(0).get(1) ==~ ".*.trim.fastq.gz" }, - { assert snapshot(process.out.versions).match("versions_single_end") }, - { assert snapshot(path(process.out.reads.get(0).get(1)).linesGzip[0]).match() } + { assert snapshot( + process.out.reads, + file(process.out.log[0][1]).readLines()[1..10], // python versions differ in the default conda env and container + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() } ) } } - test("sarscov2 Illumina paired-end [fastq]") { + test("sarscov2 - fastq - paired-end") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = [ [ id: 'test', single_end:false ], [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ] """ @@ -58,11 +54,39 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert process.out.reads != null }, - { assert process.out.reads.get(0).get(1).get(0) ==~ ".*.1.trim.fastq.gz" }, - { assert process.out.reads.get(0).get(1).get(1) ==~ ".*.2.trim.fastq.gz" }, - { assert snapshot(path(process.out.reads.get(0).get(1).get(1)).linesGzip[0]).match() }, - { assert snapshot(process.out.versions).match("versions_paired_end") } + { assert snapshot( + process.out.reads, + file(process.out.log[0][1]).readLines()[1..14], // python versions differ in the default conda env and container + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() } + ) + } + } + + test("sarscov2 - fastq - single-end - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id: 'test', single_end:true ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll ( + { assert snapshot( + process.out.reads, + process.out.log, + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() } ) } } diff --git a/modules/nf-core/cutadapt/tests/main.nf.test.snap b/modules/nf-core/cutadapt/tests/main.nf.test.snap index 3df7389e..baf5c4a2 100644 --- a/modules/nf-core/cutadapt/tests/main.nf.test.snap +++ b/modules/nf-core/cutadapt/tests/main.nf.test.snap @@ -1,46 +1,123 @@ { - "sarscov2 Illumina single end [fastq]": { + "sarscov2 - fastq - single-end - stub": { "content": [ - "@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/1" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-06T10:27:15.235936866" - }, - "sarscov2 Illumina paired-end [fastq]": { - "content": [ - "@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/2" + [ + [ + { + "id": "test", + "single_end": true + }, + "test.trim.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.cutadapt.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + { + "versions_cutadapt": [ + [ + "CUTADAPT", + "cutadapt", + "5.2" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-03-06T10:27:24.38468252" + "timestamp": "2025-12-11T12:48:07.964157954" }, - "versions_paired_end": { + "sarscov2 - fastq - paired-end": { "content": [ [ - "versions.yml:md5,bc9892c68bfa7084ec5dbffbb9e8322f" - ] + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.trim.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec", + "test_2.trim.fastq.gz:md5,2ebae722295ea66d84075a3b042e2b42" + ] + ] + ], + [ + "Command line parameters: --cores 2 -o test_1.trim.fastq.gz -p test_2.trim.fastq.gz test_1.fastq.gz test_2.fastq.gz", + "Processing paired-end reads on 2 cores ...", + "", + "=== Summary ===", + "", + "Total read pairs processed: 100", + "Pairs written (passing filters): 100 (100.0%)", + "", + "Total basepairs processed: 27,645 bp", + " Read 1: 13,897 bp", + " Read 2: 13,748 bp", + "Total written (filtered): 27,645 bp (100.0%)", + " Read 1: 13,897 bp", + " Read 2: 13,748 bp" + ], + { + "versions_cutadapt": [ + [ + "CUTADAPT", + "cutadapt", + "5.2" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-03-06T10:27:24.38799189" + "timestamp": "2025-12-11T14:12:08.287985982" }, - "versions_single_end": { + "sarscov2 - fastq - single-end": { "content": [ [ - "versions.yml:md5,bc9892c68bfa7084ec5dbffbb9e8322f" - ] + [ + { + "id": "test", + "single_end": true + }, + "test.trim.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + ] + ], + [ + "Command line parameters: --cores 2 -o test.trim.fastq.gz test_1.fastq.gz", + "Processing single-end reads on 2 cores ...", + "", + "=== Summary ===", + "", + "Total reads processed: 100", + "Reads written (passing filters): 100 (100.0%)", + "", + "Total basepairs processed: 13,897 bp", + "Total written (filtered): 13,897 bp (100.0%)" + ], + { + "versions_cutadapt": [ + [ + "CUTADAPT", + "cutadapt", + "5.2" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-03-06T10:27:15.219246449" + "timestamp": "2025-12-11T14:06:44.706447277" } } \ No newline at end of file diff --git a/modules/nf-core/cutadapt/tests/tags.yml b/modules/nf-core/cutadapt/tests/tags.yml deleted file mode 100644 index f64f9975..00000000 --- a/modules/nf-core/cutadapt/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -cutadapt: - - modules/nf-core/cutadapt/** diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf index 23e16634..f5629527 100644 --- a/modules/nf-core/fastqc/main.nf +++ b/modules/nf-core/fastqc/main.nf @@ -1,6 +1,6 @@ process FASTQC { tag "${meta.id}" - label 'process_medium' + label 'process_low' conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -11,9 +11,9 @@ process FASTQC { tuple val(meta), path(reads) output: - tuple val(meta), path("*.html"), emit: html - tuple val(meta), path("*.zip") , emit: zip - path "versions.yml" , emit: versions + tuple val(meta) , path("*.html") , emit: html + tuple val(meta) , path("*.zip") , emit: zip + tuple val("${task.process}"), val('fastqc'), eval('fastqc --version | sed "/FastQC v/!d; s/.*v//"'), emit: versions_fastqc, topic: versions when: task.ext.when == null || task.ext.when @@ -43,11 +43,6 @@ process FASTQC { --threads ${task.cpus} \\ --memory ${fastqc_memory} \\ ${renamed_files} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - fastqc: \$( fastqc --version | sed '/FastQC v/!d; s/.*v//' ) - END_VERSIONS """ stub: @@ -55,10 +50,5 @@ process FASTQC { """ touch ${prefix}.html touch ${prefix}.zip - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - fastqc: \$( fastqc --version | sed '/FastQC v/!d; s/.*v//' ) - END_VERSIONS """ } diff --git a/modules/nf-core/fastqc/meta.yml b/modules/nf-core/fastqc/meta.yml index c8d9d025..49164c88 100644 --- a/modules/nf-core/fastqc/meta.yml +++ b/modules/nf-core/fastqc/meta.yml @@ -53,13 +53,28 @@ output: description: FastQC report archive pattern: "*_{fastqc.zip}" ontologies: [] + versions_fastqc: + - - ${task.process}: + type: string + description: The process the versions were collected from + - fastqc: + type: string + description: The tool name + - fastqc --version | sed "/FastQC v/!d; s/.*v//": + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - fastqc: + type: string + description: The tool name + - fastqc --version | sed "/FastQC v/!d; s/.*v//": + type: eval + description: The expression to obtain the version of the tool authors: - "@drpatelh" - "@grst" @@ -70,3 +85,27 @@ maintainers: - "@grst" - "@ewels" - "@FelixKrueger" +containers: + conda: + linux_amd64: + lock_file: https://wave.seqera.io/v1alpha1/builds/bd-af7a5314d5015c29_1/condalock + linux_arm64: + lock_file: https://wave.seqera.io/v1alpha1/builds/bd-df99cb252670875a_2/condalock + docker: + linux_amd64: + build_id: bd-af7a5314d5015c29_1 + name: community.wave.seqera.io/library/fastqc:0.12.1--af7a5314d5015c29 + scanId: sc-a618548acbee5a8a_30 + linux_arm64: + build_id: bd-df99cb252670875a_2 + name: community.wave.seqera.io/library/fastqc:0.12.1--df99cb252670875a + scanId: sc-b5913ed5d42b22d2_18 + singularity: + linux_amd64: + build_id: bd-104d26ddd9519960_1 + name: oras://community.wave.seqera.io/library/fastqc:0.12.1--104d26ddd9519960 + https: https://community.wave.seqera.io/v2/library/fastqc/blobs/sha256:e0c976cb2eca5fee72618a581537a4f8ea42fcae24c9b201e2e0f764fd28648a + linux_arm64: + build_id: bd-d56b505a93aef38a_1 + name: oras://community.wave.seqera.io/library/fastqc:0.12.1--d56b505a93aef38a + https: https://community.wave.seqera.io/v2/library/fastqc/blobs/sha256:fd39534bf298698cbe3ee4d4a6f1e73330ec4bca44c38dd9a4d06cb5ea838017 diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test index e9d79a07..66c44da9 100644 --- a/modules/nf-core/fastqc/tests/main.nf.test +++ b/modules/nf-core/fastqc/tests/main.nf.test @@ -30,7 +30,7 @@ nextflow_process { { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).match() } + { assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() } ) } } @@ -58,7 +58,7 @@ nextflow_process { { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).match() } + { assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() } ) } } @@ -82,7 +82,7 @@ nextflow_process { { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).match() } + { assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() } ) } } @@ -106,7 +106,7 @@ nextflow_process { { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).match() } + { assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() } ) } } @@ -142,7 +142,7 @@ nextflow_process { { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, { assert path(process.out.html[0][1][2]).text.contains("File typeConventional base calls") }, { assert path(process.out.html[0][1][3]).text.contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).match() } + { assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() } ) } } @@ -166,7 +166,7 @@ nextflow_process { { assert process.out.html[0][1] ==~ ".*/mysample_fastqc.html" }, { assert process.out.zip[0][1] ==~ ".*/mysample_fastqc.zip" }, { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).match() } + { assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() } ) } } diff --git a/modules/nf-core/fastqc/tests/main.nf.test.snap b/modules/nf-core/fastqc/tests/main.nf.test.snap index d5db3092..c8ee120f 100644 --- a/modules/nf-core/fastqc/tests/main.nf.test.snap +++ b/modules/nf-core/fastqc/tests/main.nf.test.snap @@ -1,15 +1,21 @@ { "sarscov2 custom_prefix": { "content": [ - [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] + { + "versions_fastqc": [ + [ + "FASTQC", + "fastqc", + "0.12.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-22T11:02:16.374038" + "timestamp": "2025-10-28T16:39:14.518503" }, "sarscov2 single-end [fastq] - stub": { "content": [ @@ -33,7 +39,11 @@ ] ], "2": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + [ + "FASTQC", + "fastqc", + "0.12.1" + ] ], "html": [ [ @@ -44,8 +54,12 @@ "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + "versions_fastqc": [ + [ + "FASTQC", + "fastqc", + "0.12.1" + ] ], "zip": [ [ @@ -59,10 +73,10 @@ } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-22T11:02:24.993809" + "timestamp": "2025-10-28T16:39:19.309008" }, "sarscov2 custom_prefix - stub": { "content": [ @@ -86,7 +100,11 @@ ] ], "2": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + [ + "FASTQC", + "fastqc", + "0.12.1" + ] ], "html": [ [ @@ -97,8 +115,12 @@ "mysample.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + "versions_fastqc": [ + [ + "FASTQC", + "fastqc", + "0.12.1" + ] ], "zip": [ [ @@ -112,58 +134,82 @@ } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-22T11:03:10.93942" + "timestamp": "2025-10-28T16:39:44.94888" }, "sarscov2 interleaved [fastq]": { "content": [ - [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] + { + "versions_fastqc": [ + [ + "FASTQC", + "fastqc", + "0.12.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-22T11:01:42.355718" + "timestamp": "2025-10-28T16:38:45.168496" }, "sarscov2 paired-end [bam]": { "content": [ - [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] + { + "versions_fastqc": [ + [ + "FASTQC", + "fastqc", + "0.12.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-22T11:01:53.276274" + "timestamp": "2025-10-28T16:38:53.268919" }, "sarscov2 multiple [fastq]": { "content": [ - [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] + { + "versions_fastqc": [ + [ + "FASTQC", + "fastqc", + "0.12.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-22T11:02:05.527626" + "timestamp": "2025-10-28T16:39:05.050305" }, "sarscov2 paired-end [fastq]": { "content": [ - [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] + { + "versions_fastqc": [ + [ + "FASTQC", + "fastqc", + "0.12.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-22T11:01:31.188871" + "timestamp": "2025-10-28T16:38:37.2373" }, "sarscov2 paired-end [fastq] - stub": { "content": [ @@ -187,7 +233,11 @@ ] ], "2": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + [ + "FASTQC", + "fastqc", + "0.12.1" + ] ], "html": [ [ @@ -198,8 +248,12 @@ "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + "versions_fastqc": [ + [ + "FASTQC", + "fastqc", + "0.12.1" + ] ], "zip": [ [ @@ -213,10 +267,10 @@ } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-22T11:02:34.273566" + "timestamp": "2025-10-28T16:39:24.450398" }, "sarscov2 multiple [fastq] - stub": { "content": [ @@ -240,7 +294,11 @@ ] ], "2": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + [ + "FASTQC", + "fastqc", + "0.12.1" + ] ], "html": [ [ @@ -251,8 +309,12 @@ "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + "versions_fastqc": [ + [ + "FASTQC", + "fastqc", + "0.12.1" + ] ], "zip": [ [ @@ -266,22 +328,28 @@ } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-22T11:03:02.304411" + "timestamp": "2025-10-28T16:39:39.758762" }, "sarscov2 single-end [fastq]": { "content": [ - [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] + { + "versions_fastqc": [ + [ + "FASTQC", + "fastqc", + "0.12.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-22T11:01:19.095607" + "timestamp": "2025-10-28T16:38:29.555068" }, "sarscov2 interleaved [fastq] - stub": { "content": [ @@ -305,7 +373,11 @@ ] ], "2": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + [ + "FASTQC", + "fastqc", + "0.12.1" + ] ], "html": [ [ @@ -316,8 +388,12 @@ "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + "versions_fastqc": [ + [ + "FASTQC", + "fastqc", + "0.12.1" + ] ], "zip": [ [ @@ -331,10 +407,10 @@ } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-22T11:02:44.640184" + "timestamp": "2025-10-28T16:39:29.193136" }, "sarscov2 paired-end [bam] - stub": { "content": [ @@ -358,7 +434,11 @@ ] ], "2": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + [ + "FASTQC", + "fastqc", + "0.12.1" + ] ], "html": [ [ @@ -369,8 +449,12 @@ "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + "versions_fastqc": [ + [ + "FASTQC", + "fastqc", + "0.12.1" + ] ], "zip": [ [ @@ -384,9 +468,9 @@ } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-22T11:02:53.550742" + "timestamp": "2025-10-28T16:39:34.144919" } } \ No newline at end of file diff --git a/modules/nf-core/mageck/count/environment.yml b/modules/nf-core/mageck/count/environment.yml index c7221d6f..2440b706 100644 --- a/modules/nf-core/mageck/count/environment.yml +++ b/modules/nf-core/mageck/count/environment.yml @@ -1,7 +1,7 @@ -name: mageck_count +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::mageck=0.5.9.5 diff --git a/modules/nf-core/mageck/count/mageck-count.diff b/modules/nf-core/mageck/count/mageck-count.diff index fa342b5a..9fd78c01 100644 --- a/modules/nf-core/mageck/count/mageck-count.diff +++ b/modules/nf-core/mageck/count/mageck-count.diff @@ -1,16 +1,18 @@ -Changes in module 'nf-core/mageck/count' +Changes in component 'nf-core/mageck/count' +'modules/nf-core/mageck/count/environment.yml' is unchanged +'modules/nf-core/mageck/count/meta.yml' is unchanged +Changes in 'mageck/count/main.nf': --- modules/nf-core/mageck/count/main.nf +++ modules/nf-core/mageck/count/main.nf -@@ -1,6 +1,7 @@ +@@ -1,6 +1,6 @@ process MAGECK_COUNT { tag "$meta.id" - label 'process_medium' + label 'process_high' -+ conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? -@@ -8,12 +9,15 @@ +@@ -8,12 +8,15 @@ 'biocontainers/mageck:0.5.9.5--py39h1f90b4d_3' }" input: @@ -19,8 +21,7 @@ Changes in module 'nf-core/mageck/count' path(library) output: -- tuple val(meta), path("*count.txt") , emit: count -+ tuple val(meta), path("*count.txt") , emit: count + tuple val(meta), path("*count.txt") , emit: count tuple val(meta), path("*.count_normalized.txt"), emit: norm + tuple val(meta), path("*.countsummary.txt") , emit: summary + tuple val(meta), path("*.count_normalized.txt"), emit: normalized @@ -28,14 +29,13 @@ Changes in module 'nf-core/mageck/count' path "versions.yml" , emit: versions when: -@@ -22,8 +26,13 @@ +@@ -22,8 +25,12 @@ script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input_file = ("$inputfile".endsWith(".fastq.gz")) ? "--fastq ${inputfile}" : "-k ${inputfile}" - def sample_label = ("$inputfile".endsWith(".fastq.gz") || "$inputfile".endsWith(".fq.gz")) ? "--sample-label ${meta.id}" : '' + def sample_label = ("$fastq1".endsWith(".fastq.gz") || "$fastq1".endsWith(".fq.gz")) ? "--sample-label ${meta.id}" : '' -+ + if (meta.single_end && ("$fastq1".endsWith(".fastq.gz") || "$fastq1".endsWith(".fq.gz")) || "$fastq1".endsWith(".bam")) { + input = "--fastq $fastq1" + } else { @@ -44,7 +44,7 @@ Changes in module 'nf-core/mageck/count' """ mageck \\ -@@ -32,7 +41,7 @@ +@@ -32,7 +39,7 @@ -l $library \\ -n $prefix \\ $sample_label \\ @@ -53,19 +53,7 @@ Changes in module 'nf-core/mageck/count' cat <<-END_VERSIONS > versions.yml -@@ -43,14 +52,21 @@ - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" -- def input_file = ("$inputfile".endsWith(".fastq.gz")) ? "--fastq ${inputfile}" : "-k ${inputfile}" -- def sample_label = ("$inputfile".endsWith(".fastq.gz") || "$inputfile".endsWith(".fq.gz")) ? "--sample-label ${meta.id}" : '' -+ def sample_label = ("$fastq1".endsWith(".fastq.gz") || "$fastq1".endsWith(".fq.gz")) ? "--sample-label ${meta.id}" : '' -+ -+ if (meta.single_end && ("$fastq1".endsWith(".fastq.gz") || "$fastq1".endsWith(".fq.gz")) || "$fastq1".endsWith(".bam")) { -+ input = "--fastq $fastq1" -+ } else { -+ input = "--fastq $fastq1 --fastq-2 $fastq2" -+ } +@@ -45,6 +52,8 @@ """ touch ${prefix}.count.txt touch ${prefix}.count_normalized.txt @@ -74,8 +62,7 @@ Changes in module 'nf-core/mageck/count' cat <<-END_VERSIONS > versions.yml "${task.process}": mageck: \$(mageck -v) - END_VERSIONS - """ --} -+} + +'modules/nf-core/mageck/count/tests/main.nf.test.snap' is unchanged +'modules/nf-core/mageck/count/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/mageck/count/main.nf b/modules/nf-core/mageck/count/main.nf index 6cfc9416..8a555300 100644 --- a/modules/nf-core/mageck/count/main.nf +++ b/modules/nf-core/mageck/count/main.nf @@ -2,7 +2,6 @@ process MAGECK_COUNT { tag "$meta.id" label 'process_high' - conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mageck:0.5.9.5--py39h1f90b4d_3': @@ -13,7 +12,7 @@ process MAGECK_COUNT { path(library) output: - tuple val(meta), path("*count.txt") , emit: count + tuple val(meta), path("*count.txt") , emit: count tuple val(meta), path("*.count_normalized.txt"), emit: norm tuple val(meta), path("*.countsummary.txt") , emit: summary tuple val(meta), path("*.count_normalized.txt"), emit: normalized @@ -26,8 +25,7 @@ process MAGECK_COUNT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def sample_label = "--sample-label ${meta.id}" - + def sample_label = ("$fastq1".endsWith(".fastq.gz") || "$fastq1".endsWith(".fq.gz")) ? "--sample-label ${meta.id}" : '' if (meta.single_end && ("$fastq1".endsWith(".fastq.gz") || "$fastq1".endsWith(".fq.gz")) || "$fastq1".endsWith(".bam")) { input = "--fastq $fastq1" } else { @@ -50,15 +48,7 @@ process MAGECK_COUNT { END_VERSIONS """ stub: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def sample_label = ("$fastq1".endsWith(".fastq.gz") || "$fastq1".endsWith(".fq.gz")) ? "--sample-label ${meta.id}" : '' - - if (meta.single_end && ("$fastq1".endsWith(".fastq.gz") || "$fastq1".endsWith(".fq.gz")) || "$fastq1".endsWith(".bam")) { - input = "--fastq $fastq1" - } else { - input = "--fastq $fastq1 --fastq-2 $fastq2" - } """ touch ${prefix}.count.txt touch ${prefix}.count_normalized.txt @@ -69,4 +59,4 @@ process MAGECK_COUNT { mageck: \$(mageck -v) END_VERSIONS """ -} \ No newline at end of file +} diff --git a/modules/nf-core/mageck/count/meta.yml b/modules/nf-core/mageck/count/meta.yml index 6450de0a..fa4fa872 100644 --- a/modules/nf-core/mageck/count/meta.yml +++ b/modules/nf-core/mageck/count/meta.yml @@ -1,5 +1,6 @@ name: "mageck_count" -description: mageck count for functional genomics, reads are usually mapped to a specific sgRNA +description: mageck count for functional genomics, reads are usually mapped to a specific + sgRNA keywords: - sort - functional genomics @@ -7,43 +8,65 @@ keywords: - CRISPR-Cas9 tools: - mageck: - description: "MAGeCK (Model-based Analysis of Genome-wide CRISPR-Cas9 Knockout), an algorithm to process, QC, analyze and visualize CRISPR screening data." + description: "MAGeCK (Model-based Analysis of Genome-wide CRISPR-Cas9 Knockout), + an algorithm to process, QC, analyze and visualize CRISPR screening data." homepage: "https://sourceforge.net/p/mageck/wiki/Home/" documentation: "https://sourceforge.net/p/mageck/wiki/demo/#step-4-run-the-mageck-count-command" doi: "10.1186/s13059-014-0554-4" licence: ["BSD License"] + identifier: biotools:mageck input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - inputfile: + type: file + description: library fastq file containing the sgRNA and gene name or count + table containing the sgRNA and number of reads to per sample + pattern: "*.{fq,fastq,fastq.gz,fq.gz,csv,txt,tsv}" + ontologies: + - edam: http://edamontology.org/format_1930 # FASTQ + - edam: http://edamontology.org/format_3752 # CSV + - edam: http://edamontology.org/format_3475 # TSV - library: type: file description: library file containing the sgRNA and gene name pattern: "*.{csv,txt,tsv}" - - inputfile: - type: file - description: library fastq file containing the sgRNA and gene name or count table containing the sgRNA and number of reads to per sample - pattern: "*.{fq,fastq,fastq.gz,fq.gz,csv,txt,tsv}" + ontologies: + - edam: http://edamontology.org/format_3752 # CSV + - edam: http://edamontology.org/format_3475 # TSV output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - norm: - type: file - description: File containing normalized read counts - pattern: "*.count_normalized.txt" - - count: - type: file - description: File containing read counts - pattern: "*.countsummary.txt" + count: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*count.txt": + type: file + description: File containing read counts + pattern: "*.countsummary.txt" + ontologies: [] + norm: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.count_normalized.txt": + type: file + description: File containing normalized read counts + pattern: "*.count_normalized.txt" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@LaurenceKuhl" maintainers: diff --git a/modules/nf-core/mageck/count/tests/tags.yml b/modules/nf-core/mageck/count/tests/tags.yml deleted file mode 100644 index b1ee5528..00000000 --- a/modules/nf-core/mageck/count/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -mageck/count: - - "modules/nf-core/mageck/count/**" diff --git a/modules/nf-core/mageck/mle/environment.yml b/modules/nf-core/mageck/mle/environment.yml index ed2cf001..2440b706 100644 --- a/modules/nf-core/mageck/mle/environment.yml +++ b/modules/nf-core/mageck/mle/environment.yml @@ -1,7 +1,7 @@ -name: mageck_mle +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::mageck=0.5.9.5 diff --git a/modules/nf-core/mageck/mle/mageck-mle.diff b/modules/nf-core/mageck/mle/mageck-mle.diff index 06823614..fd222f10 100644 --- a/modules/nf-core/mageck/mle/mageck-mle.diff +++ b/modules/nf-core/mageck/mle/mageck-mle.diff @@ -1,4 +1,4 @@ -Changes in module 'nf-core/mageck/mle' +Changes in component 'nf-core/mageck/mle' 'modules/nf-core/mageck/mle/environment.yml' is unchanged 'modules/nf-core/mageck/mle/meta.yml' is unchanged Changes in 'mageck/mle/main.nf': @@ -15,14 +15,13 @@ Changes in 'mageck/mle/main.nf': output: tuple val(meta), path("*.gene_summary.txt") , emit: gene_summary -@@ -21,16 +21,21 @@ +@@ -21,16 +21,20 @@ script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def args2 = task.ext.args2 ?: '' -+ prefix = meta.id ?: "${meta.treatment}_vs_${meta.reference}" ++ def prefix = meta.id ?: "${meta.treatment}_vs_${meta.reference}" + def design_command = design_matrix ? "-d $design_matrix" : '' + def control_sgrna = mle_control_sgrna ? "--control-sgrna $mle_control_sgrna" : '' @@ -36,21 +35,11 @@ Changes in 'mageck/mle/main.nf': - -d $design_matrix \\ - -n $prefix + -n $prefix \\ -+ $design_command -+ ++ $design_command cat <<-END_VERSIONS > versions.yml "${task.process}": -@@ -49,6 +54,5 @@ - mageck: \$(mageck -v) - END_VERSIONS - """ -- -- --} -+ -+} + 'modules/nf-core/mageck/mle/tests/main.nf.test.snap' is unchanged -'modules/nf-core/mageck/mle/tests/tags.yml' is unchanged 'modules/nf-core/mageck/mle/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/mageck/mle/main.nf b/modules/nf-core/mageck/mle/main.nf index ccf7b664..198324cc 100644 --- a/modules/nf-core/mageck/mle/main.nf +++ b/modules/nf-core/mageck/mle/main.nf @@ -21,7 +21,8 @@ process MAGECK_MLE { script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def args2 = task.ext.args2 ?: '' + def prefix = meta.id ?: "${meta.treatment}_vs_${meta.reference}" def design_command = design_matrix ? "-d $design_matrix" : '' def control_sgrna = mle_control_sgrna ? "--control-sgrna $mle_control_sgrna" : '' @@ -33,8 +34,7 @@ process MAGECK_MLE { --threads $task.cpus \\ -k $count_table \\ -n $prefix \\ - $design_command - + $design_command cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -53,5 +53,6 @@ process MAGECK_MLE { mageck: \$(mageck -v) END_VERSIONS """ - -} \ No newline at end of file + + +} diff --git a/modules/nf-core/mageck/mle/meta.yml b/modules/nf-core/mageck/mle/meta.yml index 0b944aaf..59fb5b7f 100644 --- a/modules/nf-core/mageck/mle/meta.yml +++ b/modules/nf-core/mageck/mle/meta.yml @@ -6,52 +6,70 @@ keywords: - CRISPR tools: - "mageck": - description: "MAGeCK (Model-based Analysis of Genome-wide CRISPR-Cas9 Knockout), an algorithm to process, QC, analyze and visualize CRISPR screening data." + description: "MAGeCK (Model-based Analysis of Genome-wide CRISPR-Cas9 Knockout), + an algorithm to process, QC, analyze and visualize CRISPR screening data." homepage: "https://sourceforge.net/p/mageck/wiki/Home/#mle" documentation: "https://sourceforge.net/p/mageck/wiki/Home/" tool_dev_url: "https://bitbucket.org/liulab/mageck/src" doi: "10.1186/s13059-015-0843-6" licence: ["BSD"] + identifier: biotools:mageck input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - count_table: - type: file - description: | - Count table file. - Each line in the table should include - sgRNA name (1st column), target gene (2nd column) - and read counts in each sample. - pattern: "*.{txt,tsv}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - count_table: + type: file + description: | + Count table file. + Each line in the table should include + sgRNA name (1st column), target gene (2nd column) + and read counts in each sample. + pattern: "*.{txt,tsv}" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV - design_matrix: type: file description: Design matrix describing the samples and conditions pattern: "*.{txt,tsv}" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - gene_summary: - type: file - description: | - Gene summary file describing the fitness score - and associated p-values. - pattern: "*.{gene_summary}" - - sgrna_summary: - type: file - description: | - sgRNA summary file describing the sgRNA and - associated gene - pattern: "*.{gene_summary}" + gene_summary: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.gene_summary.txt": + type: file + description: | + Gene summary file describing the fitness score + and associated p-values. + pattern: "*.{gene_summary}" + ontologies: [] + sgrna_summary: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.sgrna_summary.txt": + type: file + description: | + sgRNA summary file describing the sgRNA and + associated gene + pattern: "*.{gene_summary}" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@LaurenceKuhl" maintainers: diff --git a/modules/nf-core/mageck/mle/tests/main.nf.test b/modules/nf-core/mageck/mle/tests/main.nf.test index 5b20fd44..f6d06280 100644 --- a/modules/nf-core/mageck/mle/tests/main.nf.test +++ b/modules/nf-core/mageck/mle/tests/main.nf.test @@ -16,11 +16,10 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['mus_musculus']['csv']['count_table'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/mus_musculus/mageck/count_table.csv', checkIfExists: true) ] input[1] = - file(params.test_data['mus_musculus']['txt']['design_matrix'], - checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/mus_musculus/mageck/design_matrix.txt', checkIfExists: true) """ } } @@ -46,11 +45,10 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['mus_musculus']['csv']['count_table'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/mus_musculus/mageck/count_table.csv', checkIfExists: true) ] input[1] = - file(params.test_data['mus_musculus']['txt']['design_matrix'], - checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/mus_musculus/mageck/design_matrix.txt', checkIfExists: true) """ } } diff --git a/modules/nf-core/mageck/mle/tests/tags.yml b/modules/nf-core/mageck/mle/tests/tags.yml deleted file mode 100644 index 97929cb1..00000000 --- a/modules/nf-core/mageck/mle/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -mageck/mle: - - "modules/nf-core/mageck/mle/**" diff --git a/modules/nf-core/mageck/test/mageck-test.diff b/modules/nf-core/mageck/test/mageck-test.diff index d5a9e50e..c5c26538 100644 --- a/modules/nf-core/mageck/test/mageck-test.diff +++ b/modules/nf-core/mageck/test/mageck-test.diff @@ -16,8 +16,8 @@ Changes in 'mageck/test/main.nf': when: +'modules/nf-core/mageck/test/tests/main.nf.test.snap' is unchanged 'modules/nf-core/mageck/test/tests/nextflow-day0_label.config' is unchanged 'modules/nf-core/mageck/test/tests/nextflow.config' is unchanged -'modules/nf-core/mageck/test/tests/main.nf.test.snap' is unchanged 'modules/nf-core/mageck/test/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/mageck/test/main.nf b/modules/nf-core/mageck/test/main.nf index 621f0e91..0cc861a4 100644 --- a/modules/nf-core/mageck/test/main.nf +++ b/modules/nf-core/mageck/test/main.nf @@ -39,7 +39,6 @@ process MAGECK_TEST { """ stub: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.gene_summary.txt diff --git a/modules/nf-core/mageck/test/meta.yml b/modules/nf-core/mageck/test/meta.yml index 79036777..7c5109f0 100644 --- a/modules/nf-core/mageck/test/meta.yml +++ b/modules/nf-core/mageck/test/meta.yml @@ -29,9 +29,11 @@ input: sgRNA name (1st column), target gene (2nd column) and read counts in each sample. pattern: "*.{txt,tsv}" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV output: - - gene_summary: - - meta: + gene_summary: + - - meta: type: map description: | Groovy Map containing sample information @@ -42,8 +44,9 @@ output: Gene summary file describing the fitness score and associated p-values. pattern: "*.{gene_summary.txt}" - - sgrna_summary: - - meta: + ontologies: [] + sgrna_summary: + - - meta: type: map description: | Groovy Map containing sample information @@ -54,8 +57,9 @@ output: sgRNA summary file describing the sgRNA and associated gene pattern: "*.{sgrna_summary.txt}" - - r_script: - - meta: + ontologies: [] + r_script: + - - meta: type: map description: | Groovy Map containing sample information @@ -66,11 +70,15 @@ output: R script allowing to output plots from main hit genes pattern: "*.R" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3999 # R script + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@LaurenceKuhl" maintainers: diff --git a/modules/nf-core/medaka/environment.yml b/modules/nf-core/medaka/environment.yml index 4f200e1e..f0b3ca76 100644 --- a/modules/nf-core/medaka/environment.yml +++ b/modules/nf-core/medaka/environment.yml @@ -1,7 +1,7 @@ -name: medaka +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::medaka=1.11.3 # Updating version due to unable to find tensorflow with the previous version diff --git a/modules/nf-core/medaka/medaka.diff b/modules/nf-core/medaka/medaka.diff index 7f161da7..135d0fcd 100644 --- a/modules/nf-core/medaka/medaka.diff +++ b/modules/nf-core/medaka/medaka.diff @@ -1,17 +1,30 @@ -Changes in module 'nf-core/medaka' +Changes in component 'nf-core/medaka' +Changes in 'medaka/environment.yml': --- modules/nf-core/medaka/environment.yml +++ modules/nf-core/medaka/environment.yml @@ -4,4 +4,4 @@ + - conda-forge - bioconda - - defaults dependencies: - - bioconda::medaka=1.4.4 + - bioconda::medaka=1.11.3 # Updating version due to unable to find tensorflow with the previous version +'modules/nf-core/medaka/meta.yml' is unchanged +Changes in 'medaka/main.nf': --- modules/nf-core/medaka/main.nf +++ modules/nf-core/medaka/main.nf -@@ -11,8 +11,8 @@ +@@ -4,15 +4,16 @@ + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/medaka:1.4.4--py38h130def0_0' : +- 'biocontainers/medaka:1.4.4--py38h130def0_0' }" ++ 'https://depot.galaxyproject.org/singularity/medaka:1.11.3--py38h2e44183_0' : ++ 'biocontainers/medaka:1.11.3--py38h2e44183_0' }" + + input: tuple val(meta), path(reads), path(assembly) ++ path model output: - tuple val(meta), path("*.fa.gz"), emit: assembly @@ -21,7 +34,7 @@ Changes in module 'nf-core/medaka' when: task.ext.when == null || task.ext.when -@@ -21,16 +21,27 @@ +@@ -21,16 +22,27 @@ def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ @@ -55,4 +68,6 @@ Changes in module 'nf-core/medaka' cat <<-END_VERSIONS > versions.yml "${task.process}": +'modules/nf-core/medaka/tests/main.nf.test.snap' is unchanged +'modules/nf-core/medaka/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/medaka/meta.yml b/modules/nf-core/medaka/meta.yml index 9ed3589d..a5e995cc 100644 --- a/modules/nf-core/medaka/meta.yml +++ b/modules/nf-core/medaka/meta.yml @@ -1,5 +1,6 @@ name: medaka -description: A tool to create consensus sequences and variant calls from nanopore sequencing data +description: A tool to create consensus sequences and variant calls from nanopore + sequencing data keywords: - assembly - polishing @@ -11,34 +12,44 @@ tools: documentation: https://nanoporetech.github.io/medaka/index.html tool_dev_url: https://github.com/nanoporetech/medaka licence: ["Mozilla Public License 2.0"] + identifier: biotools:medaka input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: List of input nanopore fasta/FastQ files - pattern: "*.{fasta,fa,fastq,fastq.gz,fq,fq.gz}" - - assembly: - type: file - description: Genome assembly - pattern: "*.{fasta,fa}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: List of input nanopore fasta/FastQ files + pattern: "*.{fasta,fa,fastq,fastq.gz,fq,fq.gz}" + ontologies: + - edam: http://edamontology.org/format_1930 # FASTQ + - assembly: + type: file + description: Genome assembly + pattern: "*.{fasta,fa}" + ontologies: [] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - assembly: - type: file - description: Polished genome assembly - pattern: "*.fa.gz" + assembly: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fa.gz": + type: file + description: Polished genome assembly + pattern: "*.fa.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@avantonder" maintainers: diff --git a/modules/nf-core/medaka/tests/main.nf.test b/modules/nf-core/medaka/tests/main.nf.test index 1c5c55fe..948e398c 100644 --- a/modules/nf-core/medaka/tests/main.nf.test +++ b/modules/nf-core/medaka/tests/main.nf.test @@ -12,10 +12,10 @@ nextflow_process { when { process { """ - input[0] = [ + input[0] = [ [ id:'test', single_end:true ], // meta map - file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -24,7 +24,11 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + path(process.out.assembly[0][1]).linesGzip.join()[0..99], + process.out.versions + ).match() + } ) } diff --git a/modules/nf-core/medaka/tests/main.nf.test.snap b/modules/nf-core/medaka/tests/main.nf.test.snap index d3fcba28..1396e9a1 100644 --- a/modules/nf-core/medaka/tests/main.nf.test.snap +++ b/modules/nf-core/medaka/tests/main.nf.test.snap @@ -1,33 +1,15 @@ { "Medaka": { "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fa.gz:md5,f42303f1d6c2c79175faeb00e10b9a6e" - ] - ], - "1": [ - "versions.yml:md5,739bb00a08faba4029f9f5ab9c15275a" - ], - "assembly": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fa.gz:md5,f42303f1d6c2c79175faeb00e10b9a6e" - ] - ], - "versions": [ - "versions.yml:md5,739bb00a08faba4029f9f5ab9c15275a" - ] - } + ">MT192765.1GTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAAAATCTGTGTGGCTGTC", + [ + "versions.yml:md5,739bb00a08faba4029f9f5ab9c15275a" + ] ], - "timestamp": "2023-10-18T12:38:17.806031909" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-14T12:51:51.820749" } } \ No newline at end of file diff --git a/modules/nf-core/medaka/tests/tags.yml b/modules/nf-core/medaka/tests/tags.yml deleted file mode 100644 index dd9fb106..00000000 --- a/modules/nf-core/medaka/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -medaka: - - modules/nf-core/medaka/** diff --git a/modules/nf-core/minimap2/align/environment.yml b/modules/nf-core/minimap2/align/environment.yml index 051ca8ef..17886061 100644 --- a/modules/nf-core/minimap2/align/environment.yml +++ b/modules/nf-core/minimap2/align/environment.yml @@ -1,9 +1,9 @@ -name: minimap2_align +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults + dependencies: - - bioconda::minimap2=2.28 - - bioconda::samtools=1.19.2 - - bioconda::htslib=1.19.1 + - bioconda::minimap2=2.29 + - bioconda::samtools=1.21 diff --git a/modules/nf-core/minimap2/align/main.nf b/modules/nf-core/minimap2/align/main.nf index 0b1ae562..b5748313 100644 --- a/modules/nf-core/minimap2/align/main.nf +++ b/modules/nf-core/minimap2/align/main.nf @@ -5,20 +5,21 @@ process MINIMAP2_ALIGN { // Note: the versions here need to match the versions used in the mulled container below and minimap2/index conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:3a70f8bc7e17b723591f6132418640cfdbc88246-0' : - 'biocontainers/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:3a70f8bc7e17b723591f6132418640cfdbc88246-0' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/66/66dc96eff11ab80dfd5c044e9b3425f52d818847b9c074794cf0c02bfa781661/data' : + 'community.wave.seqera.io/library/minimap2_samtools:33bb43c18d22e29c' }" input: tuple val(meta), path(reads), path(reference) val bam_format + val bam_index_extension val cigar_paf_format val cigar_bam output: - tuple val(meta), path("*.paf"), optional: true, emit: paf - tuple val(meta), path("*.bam"), optional: true, emit: bam - tuple val(meta), path("*.csi"), optional: true, emit: csi - path "versions.yml" , emit: versions + tuple val(meta), path("*.paf") , optional: true, emit: paf + tuple val(meta), path("*.bam") , optional: true, emit: bam + tuple val(meta), path("*.bam.${bam_index_extension}"), optional: true, emit: index + tuple val("${task.process}"), val("minimap2"), eval("minimap2 --version"), topic: versions, emit: versions_minimap2 when: task.ext.when == null || task.ext.when @@ -26,37 +27,39 @@ process MINIMAP2_ALIGN { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' + def args3 = task.ext.args3 ?: '' + def args4 = task.ext.args4 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def bam_output = bam_format ? "-a | samtools sort -@ ${task.cpus-1} -o ${prefix}.bam ${args2}" : "-o ${prefix}.paf" + def bam_index = bam_index_extension ? "${prefix}.bam##idx##${prefix}.bam.${bam_index_extension} --write-index" : "${prefix}.bam" + def bam_output = bam_format ? "-a | samtools sort -@ ${task.cpus-1} -o ${bam_index} ${args2}" : "-o ${prefix}.paf" def cigar_paf = cigar_paf_format && !bam_format ? "-c" : '' def set_cigar_bam = cigar_bam && bam_format ? "-L" : '' + def bam_input = "${reads.extension}".matches('sam|bam|cram') + def samtools_reset_fastq = bam_input ? "samtools reset --threads ${task.cpus-1} $args3 $reads | samtools fastq --threads ${task.cpus-1} $args4 |" : '' + def query = bam_input ? "-" : reads + def target = reference ?: (bam_input ? error("Error: minimap2/align BAM input mode requires reference") : reads) """ + $samtools_reset_fastq \\ minimap2 \\ - $args \\ - -t $task.cpus \\ - ${reference ?: reads} \\ - $reads \\ - $cigar_paf \\ - $set_cigar_bam \\ - $bam_output - - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - minimap2: \$(minimap2 --version 2>&1) - END_VERSIONS + ${args} \\ + -t ${task.cpus} \\ + ${target} \\ + ${query} \\ + ${cigar_paf} \\ + ${set_cigar_bam} \\ + ${bam_output} """ stub: def prefix = task.ext.prefix ?: "${meta.id}" def output_file = bam_format ? "${prefix}.bam" : "${prefix}.paf" + def bam_index = bam_index_extension ? "touch ${prefix}.bam.${bam_index_extension}" : "" + def bam_input = "${reads.extension}".matches('sam|bam|cram') + if(bam_input && !reference) { + error("Error: minimap2/align BAM input mode requires reference!") + } """ touch $output_file - touch ${prefix}.csi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - minimap2: \$(minimap2 --version 2>&1) - END_VERSIONS + ${bam_index} """ } diff --git a/modules/nf-core/minimap2/align/meta.yml b/modules/nf-core/minimap2/align/meta.yml index 81cfd6e2..40bb20ad 100644 --- a/modules/nf-core/minimap2/align/meta.yml +++ b/modules/nf-core/minimap2/align/meta.yml @@ -14,24 +14,35 @@ tools: homepage: https://github.com/lh3/minimap2 documentation: https://github.com/lh3/minimap2#uguide licence: ["MIT"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FASTA or FASTQ files of size 1 and 2 for single-end - and paired-end data, respectively. - - reference: - type: file - description: | - Reference database in FASTA format. + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FASTA or FASTQ files of size 1 and 2 for single-end + and paired-end data, respectively. + ontologies: [] + - - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test_ref'] + - reference: + type: file + description: | + Reference database in FASTA format. + ontologies: [] - bam_format: type: boolean description: Specify that output should be in BAM format + - bam_index_extension: + type: string + description: BAM alignment index extension (e.g. "bai") - cigar_paf_format: type: boolean description: Specify that output CIGAR should be in PAF format @@ -41,30 +52,69 @@ input: Write CIGAR with >65535 ops at the CG tag. This is recommended when doing XYZ (https://github.com/lh3/minimap2#working-with-65535-cigar-operations) output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - paf: - type: file - description: Alignment in PAF format - pattern: "*.paf" - - bam: - type: file - description: Alignment in BAM format - pattern: "*.bam" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + paf: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.paf": + type: file + description: Alignment in PAF format + pattern: "*.paf" + ontologies: [] + bam: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bam": + type: file + description: Alignment in BAM format + pattern: "*.bam" + ontologies: [] + index: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bam.${bam_index_extension}": + type: file + description: BAM alignment index + pattern: "*.bam.*" + ontologies: [] + versions_minimap2: + - - ${task.process}: + type: string + description: The process name + - minimap2: + type: string + description: The tool name + - minimap2 --version: + type: eval + description: The tool version +topics: + versions: + - - ${task.process}: + type: string + description: The process name + - minimap2: + type: string + description: The tool name + - minimap2 --version: + type: eval + description: The tool version authors: - "@heuermh" - "@sofstam" - "@sateeshperi" - "@jfy133" + - "@fellen31" maintainers: - "@heuermh" - "@sofstam" - "@sateeshperi" - "@jfy133" + - "@fellen31" diff --git a/modules/nf-core/minimap2/align/minimap2-align.diff b/modules/nf-core/minimap2/align/minimap2-align.diff index 13a12457..0a465f2d 100644 --- a/modules/nf-core/minimap2/align/minimap2-align.diff +++ b/modules/nf-core/minimap2/align/minimap2-align.diff @@ -1,30 +1,238 @@ -Changes in module 'nf-core/minimap2/align' +Changes in component 'nf-core/minimap2/align' +'modules/nf-core/minimap2/align/environment.yml' is unchanged +Changes in 'minimap2/align/meta.yml': +--- modules/nf-core/minimap2/align/meta.yml ++++ modules/nf-core/minimap2/align/meta.yml +@@ -1,120 +1,116 @@ + name: minimap2_align + description: A versatile pairwise aligner for genomic and spliced nucleotide sequences + keywords: +- - align +- - fasta +- - fastq +- - genome +- - paf +- - reference ++- align ++- fasta ++- fastq ++- genome ++- paf ++- reference + tools: +- - minimap2: ++- minimap2: ++ description: | ++ A versatile pairwise aligner for genomic and spliced nucleotide sequences. ++ homepage: https://github.com/lh3/minimap2 ++ documentation: https://github.com/lh3/minimap2#uguide ++ licence: ++ - "MIT" ++ identifier: "" ++input: ++- - meta: ++ type: map + description: | +- A versatile pairwise aligner for genomic and spliced nucleotide sequences. +- homepage: https://github.com/lh3/minimap2 +- documentation: https://github.com/lh3/minimap2#uguide +- licence: ["MIT"] +- identifier: "" +-input: ++ Groovy Map containing sample information ++ e.g. [ id:'test', single_end:false ] ++ - reads: ++ type: file ++ description: | ++ List of input FASTA or FASTQ files of size 1 and 2 for single-end ++ and paired-end data, respectively. ++ ontologies: [] ++ - reference: ++ type: file ++ description: | ++ Reference database in FASTA format. ++ ontologies: [] ++- bam_format: ++ type: boolean ++ description: Specify that output should be in BAM format ++- bam_index_extension: ++ type: string ++ description: BAM alignment index extension (e.g. "bai") ++- cigar_paf_format: ++ type: boolean ++ description: Specify that output CIGAR should be in PAF format ++- cigar_bam: ++ type: boolean ++ description: | ++ Write CIGAR with >65535 ops at the CG tag. This is recommended when ++ doing XYZ (https://github.com/lh3/minimap2#working-with-65535-cigar-operations) ++output: ++ paf: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] +- - reads: ++ - "*.paf": + type: file +- description: | +- List of input FASTA or FASTQ files of size 1 and 2 for single-end +- and paired-end data, respectively. ++ description: Alignment in PAF format ++ pattern: "*.paf" + ontologies: [] +- - - meta2: ++ bam: ++ - - meta: + type: map + description: | +- Groovy Map containing reference information +- e.g. [ id:'test_ref'] +- - reference: ++ Groovy Map containing sample information ++ e.g. [ id:'test', single_end:false ] ++ - "*.bam": + type: file ++ description: Alignment in BAM format ++ pattern: "*.bam" ++ ontologies: [] ++ index: ++ - - meta: ++ type: map + description: | +- Reference database in FASTA format. ++ Groovy Map containing sample information ++ e.g. [ id:'test', single_end:false ] ++ - "*.bam.${bam_index_extension}": ++ type: file ++ description: BAM alignment index ++ pattern: "*.bam.*" + ontologies: [] +- - bam_format: +- type: boolean +- description: Specify that output should be in BAM format +- - bam_index_extension: +- type: string +- description: BAM alignment index extension (e.g. "bai") +- - cigar_paf_format: +- type: boolean +- description: Specify that output CIGAR should be in PAF format +- - cigar_bam: +- type: boolean +- description: | +- Write CIGAR with >65535 ops at the CG tag. This is recommended when +- doing XYZ (https://github.com/lh3/minimap2#working-with-65535-cigar-operations) +-output: +- paf: +- - - meta: +- type: map +- description: | +- Groovy Map containing sample information +- e.g. [ id:'test', single_end:false ] +- - "*.paf": +- type: file +- description: Alignment in PAF format +- pattern: "*.paf" +- ontologies: [] +- bam: +- - - meta: +- type: map +- description: | +- Groovy Map containing sample information +- e.g. [ id:'test', single_end:false ] +- - "*.bam": +- type: file +- description: Alignment in BAM format +- pattern: "*.bam" +- ontologies: [] +- index: +- - - meta: +- type: map +- description: | +- Groovy Map containing sample information +- e.g. [ id:'test', single_end:false ] +- - "*.bam.${bam_index_extension}": +- type: file +- description: BAM alignment index +- pattern: "*.bam.*" +- ontologies: [] + versions_minimap2: +- - - ${task.process}: +- type: string +- description: The process name +- - minimap2: +- type: string +- description: The tool name +- - minimap2 --version: +- type: eval +- description: The tool version ++ - - ${task.process}: ++ type: string ++ description: The process name ++ - minimap2: ++ type: string ++ description: The tool name ++ - minimap2 --version: ++ type: eval ++ description: The tool version + topics: + versions: +- - - ${task.process}: +- type: string +- description: The process name +- - minimap2: +- type: string +- description: The tool name +- - minimap2 --version: +- type: eval +- description: The tool version ++ - - ${task.process}: ++ type: string ++ description: The process name ++ - minimap2: ++ type: string ++ description: The tool name ++ - minimap2 --version: ++ type: eval ++ description: The tool version + authors: +- - "@heuermh" +- - "@sofstam" +- - "@sateeshperi" +- - "@jfy133" +- - "@fellen31" ++- "@heuermh" ++- "@sofstam" ++- "@sateeshperi" ++- "@jfy133" ++- "@fellen31" + maintainers: +- - "@heuermh" +- - "@sofstam" +- - "@sateeshperi" +- - "@jfy133" +- - "@fellen31" ++- "@heuermh" ++- "@sofstam" ++- "@sateeshperi" ++- "@jfy133" ++- "@fellen31" + +Changes in 'minimap2/align/main.nf': --- modules/nf-core/minimap2/align/main.nf +++ modules/nf-core/minimap2/align/main.nf @@ -9,8 +9,7 @@ - 'biocontainers/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:3a70f8bc7e17b723591f6132418640cfdbc88246-0' }" + 'community.wave.seqera.io/library/minimap2_samtools:33bb43c18d22e29c' }" input: - tuple val(meta), path(reads) - tuple val(meta2), path(reference) + tuple val(meta), path(reads), path(reference) val bam_format + val bam_index_extension val cigar_paf_format - val cigar_bam - ---- modules/nf-core/minimap2/align/meta.yml -+++ modules/nf-core/minimap2/align/meta.yml -@@ -25,11 +25,6 @@ - description: | - List of input FASTA or FASTQ files of size 1 and 2 for single-end - and paired-end data, respectively. -- - meta2: -- type: map -- description: | -- Groovy Map containing reference information -- e.g. [ id:'test_ref'] - - reference: - type: file - description: | +'modules/nf-core/minimap2/align/tests/main.nf.test.snap' is unchanged +'modules/nf-core/minimap2/align/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/minimap2/align/tests/main.nf.test b/modules/nf-core/minimap2/align/tests/main.nf.test index 83cceeab..34597d6f 100644 --- a/modules/nf-core/minimap2/align/tests/main.nf.test +++ b/modules/nf-core/minimap2/align/tests/main.nf.test @@ -9,22 +9,23 @@ nextflow_process { tag "minimap2" tag "minimap2/align" - test("sarscov2 - fastq, fasta, true, false, false") { + test("sarscov2 - fastq, fasta, true, [], false, false") { when { process { """ input[0] = [ [ id:'test', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] input[1] = [ [ id:'test_ref' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[2] = true - input[3] = false + input[3] = [] input[4] = false + input[5] = false """ } } @@ -33,8 +34,44 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.bam[0][1]).name, - process.out.versions + bam(process.out.bam[0][1]).getHeader(), + bam(process.out.bam[0][1]).getReadsMD5(), + process.out.findAll { key, val -> key.startsWith("versions_") } + ).match() } + ) + } + + } + + test("sarscov2 - fastq, fasta, true, 'bai', false, false") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + input[1] = [ + [ id:'test_ref' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + input[2] = true + input[3] = 'bai' + input[4] = false + input[5] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.bam[0][1]).getHeader(), + bam(process.out.bam[0][1]).getReadsMD5(), + file(process.out.index[0][1]).name, + process.out.findAll { key, val -> key.startsWith("versions_") } ).match() } ) } @@ -49,17 +86,18 @@ nextflow_process { input[0] = [ [ id:'test', single_end:false ], // meta map [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ] input[1] = [ [ id:'test_ref' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[2] = true - input[3] = false + input[3] = [] input[4] = false + input[5] = false """ } } @@ -68,8 +106,9 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.bam[0][1]).name, - process.out.versions + bam(process.out.bam[0][1]).getHeader(), + bam(process.out.bam[0][1]).getReadsMD5(), + process.out.findAll { key, val -> key.startsWith("versions_") } ).match() } ) } @@ -83,15 +122,16 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), ] input[1] = [ [ id:'test_ref' ], // meta map [] ] input[2] = true - input[3] = false + input[3] = [] input[4] = false + input[5] = false """ } } @@ -100,32 +140,66 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.bam[0][1]).name, - process.out.versions + bam(process.out.bam[0][1]).getHeader(), + bam(process.out.bam[0][1]).getReadsMD5(), + process.out.findAll { key, val -> key.startsWith("versions_") } ).match() } ) } } - test("sarscov2 - fastq, fasta, true, false, false - stub") { + test("sarscov2 - bam, fasta, true, [], false, false") { - options "-stub" + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test3.single_end.markduplicates.sorted.bam', checkIfExists: true) + ] + input[1] = [ + [ id:'test_ref' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + input[2] = true + input[3] = [] + input[4] = false + input[5] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.bam[0][1]).getHeader(), + bam(process.out.bam[0][1]).getReadsMD5(), + process.out.findAll { key, val -> key.startsWith("versions_") } + ).match() } + ) + } + + } + + test("sarscov2 - bam, fasta, true, 'bai', false, false") { when { process { """ input[0] = [ [ id:'test', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test3.single_end.markduplicates.sorted.bam', checkIfExists: true) ] input[1] = [ [ id:'test_ref' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[2] = true - input[3] = false + input[3] = 'bai' input[4] = false + input[5] = false """ } } @@ -134,16 +208,110 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - file(process.out.bam[0][1]).name, - file(process.out.csi[0][1]).name, - process.out.versions + bam(process.out.bam[0][1]).getHeader(), + bam(process.out.bam[0][1]).getReadsMD5(), + file(process.out.index[0][1]).name, + process.out.findAll { key, val -> key.startsWith("versions_") } ).match() } ) } } - test("sarscov2 - fastq, fasta, false, false, false - stub") { + test("sarscov2 - bam, [], true, false, false") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test3.single_end.markduplicates.sorted.bam', checkIfExists: true) + ] + input[1] = [ + [ id:'test_ref' ], // meta map + [] + ] + input[2] = true + input[3] = [] + input[4] = false + input[5] = false + """ + } + } + + then { + assertAll( + { assert process.failed } + ) + } + + } + + test("sarscov2 - fastq, fasta, true, [], false, false - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + input[1] = [ + [ id:'test_ref' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + input[2] = true + input[3] = [] + input[4] = false + input[5] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - fastq, fasta, true, 'bai', false, false - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + input[1] = [ + [ id:'test_ref' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + input[2] = true + input[3] = 'bai' + input[4] = false + input[5] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - fastq, fasta, false, [], false, false - stub") { options "-stub" @@ -152,15 +320,16 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] input[1] = [ [ id:'test_ref' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[2] = false - input[3] = false + input[3] = [] input[4] = false + input[5] = false """ } } @@ -168,14 +337,105 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - file(process.out.paf[0][1]).name, - file(process.out.csi[0][1]).name, - process.out.versions - ).match() } + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - bam, fasta, true, [], false, false - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test3.single_end.markduplicates.sorted.bam', checkIfExists: true) + ] + input[1] = [ + [ id:'test_ref' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + input[2] = true + input[3] = [] + input[4] = false + input[5] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - bam, fasta, true, 'bai', false, false - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test3.single_end.markduplicates.sorted.bam', checkIfExists: true) + ] + input[1] = [ + [ id:'test_ref' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + input[2] = true + input[3] = 'bai' + input[4] = false + input[5] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - bam, [], true, false, false - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test3.single_end.markduplicates.sorted.bam', checkIfExists: true) + ] + input[1] = [ + [ id:'test_ref' ], // meta map + [] + ] + input[2] = true + input[3] = [] + input[4] = false + input[5] = false + """ + } + } + + then { + assertAll( + { assert process.failed } ) } } -} \ No newline at end of file +} diff --git a/modules/nf-core/minimap2/align/tests/main.nf.test.snap b/modules/nf-core/minimap2/align/tests/main.nf.test.snap index 19a8f204..93e0eb3b 100644 --- a/modules/nf-core/minimap2/align/tests/main.nf.test.snap +++ b/modules/nf-core/minimap2/align/tests/main.nf.test.snap @@ -1,69 +1,552 @@ { - "sarscov2 - fastq, fasta, true, false, false": { + "sarscov2 - bam, fasta, true, 'bai', false, false": { "content": [ - "test.bam", [ - "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938" - ] + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:MT192765.1\tLN:29829", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.29-r1283\tCL:minimap2 -t 2 -a genome.fasta -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.21\tCL:samtools sort -@ 1 -o test.bam##idx##test.bam.bai --write-index" + ], + "5d426b9a5f5b2c54f1d7f1e4c238ae94", + "test.bam.bai", + { + "versions_minimap2": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-04-05T10:14:18.939731126" + "timestamp": "2026-01-22T15:02:10.851485367" }, - "sarscov2 - fastq, fasta, true, false, false - stub": { + "sarscov2 - bam, fasta, true, 'bai', false, false - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "index": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "paf": [ + + ], + "versions_minimap2": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-01-22T15:02:56.708796666" + }, + "sarscov2 - fastq, fasta, true, 'bai', false, false - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "index": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "paf": [ + + ], + "versions_minimap2": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-01-22T15:02:32.614463827" + }, + "sarscov2 - fastq, fasta, false, [], false, false - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.paf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ], + "bam": [ + + ], + "index": [ + + ], + "paf": [ + [ + { + "id": "test", + "single_end": true + }, + "test.paf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_minimap2": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-01-22T15:02:40.02163098" + }, + "sarscov2 - fastq, fasta, true, [], false, false - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "index": [ + + ], + "paf": [ + + ], + "versions_minimap2": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-01-22T15:02:25.102539679" + }, + "sarscov2 - [fastq1, fastq2], fasta, true, false, false": { "content": [ - "test.bam", - "test.csi", [ - "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938" - ] + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:MT192765.1\tLN:29829", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.29-r1283\tCL:minimap2 -t 2 -a genome.fasta test_1.fastq.gz test_2.fastq.gz", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.21\tCL:samtools sort -@ 1 -o test.bam" + ], + "1bc392244f228bf52cf0b5a8f6a654c9", + { + "versions_minimap2": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-04-05T10:14:34.275879844" + "timestamp": "2026-01-22T15:01:46.456636022" }, - "sarscov2 - fastq, fasta, false, false, false - stub": { + "sarscov2 - fastq, fasta, true, [], false, false": { "content": [ - "test.paf", - "test.csi", [ - "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938" - ] + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:MT192765.1\tLN:29829", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.29-r1283\tCL:minimap2 -t 2 -a genome.fasta test_1.fastq.gz", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.21\tCL:samtools sort -@ 1 -o test.bam" + ], + "f194745c0ccfcb2a9c0aee094a08750", + { + "versions_minimap2": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-04-05T10:14:39.227958138" + "timestamp": "2026-01-22T15:01:30.525133177" }, - "sarscov2 - [fastq1, fastq2], fasta, true, false, false": { + "sarscov2 - fastq, fasta, true, 'bai', false, false": { + "content": [ + [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:MT192765.1\tLN:29829", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.29-r1283\tCL:minimap2 -t 2 -a genome.fasta test_1.fastq.gz", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.21\tCL:samtools sort -@ 1 -o test.bam##idx##test.bam.bai --write-index" + ], + "f194745c0ccfcb2a9c0aee094a08750", + "test.bam.bai", + { + "versions_minimap2": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-01-22T15:01:38.84829029" + }, + "sarscov2 - bam, fasta, true, [], false, false": { "content": [ - "test.bam", [ - "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938" - ] + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:MT192765.1\tLN:29829", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.29-r1283\tCL:minimap2 -t 2 -a genome.fasta -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.21\tCL:samtools sort -@ 1 -o test.bam" + ], + "5d426b9a5f5b2c54f1d7f1e4c238ae94", + { + "versions_minimap2": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-01-22T15:02:02.351060285" + }, + "sarscov2 - bam, fasta, true, [], false, false - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "index": [ + + ], + "paf": [ + + ], + "versions_minimap2": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-04-05T10:14:24.265054877" + "timestamp": "2026-01-22T15:02:47.579634041" }, "sarscov2 - fastq, [], true, false, false": { "content": [ - "test.bam", [ - "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938" - ] + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:ERR5069949.2151832\tLN:150", + "@SQ\tSN:ERR5069949.576388\tLN:77", + "@SQ\tSN:ERR5069949.501486\tLN:146", + "@SQ\tSN:ERR5069949.1331889\tLN:132", + "@SQ\tSN:ERR5069949.2161340\tLN:80", + "@SQ\tSN:ERR5069949.973930\tLN:79", + "@SQ\tSN:ERR5069949.2417063\tLN:150", + "@SQ\tSN:ERR5069949.376959\tLN:151", + "@SQ\tSN:ERR5069949.1088785\tLN:149", + "@SQ\tSN:ERR5069949.1066259\tLN:147", + "@SQ\tSN:ERR5069949.2832676\tLN:139", + "@SQ\tSN:ERR5069949.2953930\tLN:151", + "@SQ\tSN:ERR5069949.324865\tLN:151", + "@SQ\tSN:ERR5069949.2185111\tLN:150", + "@SQ\tSN:ERR5069949.937422\tLN:151", + "@SQ\tSN:ERR5069949.2431709\tLN:150", + "@SQ\tSN:ERR5069949.1246538\tLN:148", + "@SQ\tSN:ERR5069949.1189252\tLN:98", + "@SQ\tSN:ERR5069949.2216307\tLN:147", + "@SQ\tSN:ERR5069949.3273002\tLN:148", + "@SQ\tSN:ERR5069949.3277445\tLN:151", + "@SQ\tSN:ERR5069949.3022231\tLN:147", + "@SQ\tSN:ERR5069949.184542\tLN:151", + "@SQ\tSN:ERR5069949.540529\tLN:149", + "@SQ\tSN:ERR5069949.686090\tLN:150", + "@SQ\tSN:ERR5069949.2787556\tLN:106", + "@SQ\tSN:ERR5069949.2650879\tLN:150", + "@SQ\tSN:ERR5069949.2064910\tLN:149", + "@SQ\tSN:ERR5069949.2328704\tLN:150", + "@SQ\tSN:ERR5069949.1067032\tLN:150", + "@SQ\tSN:ERR5069949.3338256\tLN:151", + "@SQ\tSN:ERR5069949.1412839\tLN:147", + "@SQ\tSN:ERR5069949.1538968\tLN:150", + "@SQ\tSN:ERR5069949.147998\tLN:94", + "@SQ\tSN:ERR5069949.366975\tLN:106", + "@SQ\tSN:ERR5069949.1372331\tLN:151", + "@SQ\tSN:ERR5069949.1709367\tLN:129", + "@SQ\tSN:ERR5069949.2388984\tLN:150", + "@SQ\tSN:ERR5069949.1132353\tLN:150", + "@SQ\tSN:ERR5069949.1151736\tLN:151", + "@SQ\tSN:ERR5069949.479807\tLN:150", + "@SQ\tSN:ERR5069949.2176303\tLN:151", + "@SQ\tSN:ERR5069949.2772897\tLN:151", + "@SQ\tSN:ERR5069949.1020777\tLN:122", + "@SQ\tSN:ERR5069949.465452\tLN:151", + "@SQ\tSN:ERR5069949.1704586\tLN:149", + "@SQ\tSN:ERR5069949.1258508\tLN:151", + "@SQ\tSN:ERR5069949.986441\tLN:119", + "@SQ\tSN:ERR5069949.2674295\tLN:148", + "@SQ\tSN:ERR5069949.885966\tLN:79", + "@SQ\tSN:ERR5069949.2342766\tLN:151", + "@SQ\tSN:ERR5069949.3122970\tLN:127", + "@SQ\tSN:ERR5069949.3279513\tLN:72", + "@SQ\tSN:ERR5069949.309410\tLN:151", + "@SQ\tSN:ERR5069949.532979\tLN:149", + "@SQ\tSN:ERR5069949.2888794\tLN:151", + "@SQ\tSN:ERR5069949.2205229\tLN:150", + "@SQ\tSN:ERR5069949.786562\tLN:151", + "@SQ\tSN:ERR5069949.919671\tLN:151", + "@SQ\tSN:ERR5069949.1328186\tLN:151", + "@SQ\tSN:ERR5069949.870926\tLN:149", + "@SQ\tSN:ERR5069949.2257580\tLN:151", + "@SQ\tSN:ERR5069949.3249622\tLN:77", + "@SQ\tSN:ERR5069949.611123\tLN:125", + "@SQ\tSN:ERR5069949.651338\tLN:142", + "@SQ\tSN:ERR5069949.169513\tLN:92", + "@SQ\tSN:ERR5069949.155944\tLN:150", + "@SQ\tSN:ERR5069949.2033605\tLN:150", + "@SQ\tSN:ERR5069949.2730382\tLN:142", + "@SQ\tSN:ERR5069949.2125592\tLN:150", + "@SQ\tSN:ERR5069949.1062611\tLN:151", + "@SQ\tSN:ERR5069949.1778133\tLN:151", + "@SQ\tSN:ERR5069949.3057020\tLN:95", + "@SQ\tSN:ERR5069949.2972968\tLN:141", + "@SQ\tSN:ERR5069949.2734474\tLN:149", + "@SQ\tSN:ERR5069949.856527\tLN:151", + "@SQ\tSN:ERR5069949.2098070\tLN:151", + "@SQ\tSN:ERR5069949.1552198\tLN:150", + "@SQ\tSN:ERR5069949.2385514\tLN:150", + "@SQ\tSN:ERR5069949.2270078\tLN:151", + "@SQ\tSN:ERR5069949.114870\tLN:150", + "@SQ\tSN:ERR5069949.2668880\tLN:147", + "@SQ\tSN:ERR5069949.257821\tLN:139", + "@SQ\tSN:ERR5069949.2243023\tLN:150", + "@SQ\tSN:ERR5069949.2605155\tLN:146", + "@SQ\tSN:ERR5069949.1340552\tLN:151", + "@SQ\tSN:ERR5069949.1561137\tLN:150", + "@SQ\tSN:ERR5069949.2361683\tLN:149", + "@SQ\tSN:ERR5069949.2521353\tLN:150", + "@SQ\tSN:ERR5069949.1261808\tLN:149", + "@SQ\tSN:ERR5069949.2734873\tLN:98", + "@SQ\tSN:ERR5069949.3017828\tLN:107", + "@SQ\tSN:ERR5069949.573706\tLN:150", + "@SQ\tSN:ERR5069949.1980512\tLN:151", + "@SQ\tSN:ERR5069949.1014693\tLN:150", + "@SQ\tSN:ERR5069949.3184655\tLN:150", + "@SQ\tSN:ERR5069949.29668\tLN:89", + "@SQ\tSN:ERR5069949.3258358\tLN:151", + "@SQ\tSN:ERR5069949.1476386\tLN:151", + "@SQ\tSN:ERR5069949.2415814\tLN:150", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.29-r1283\tCL:minimap2 -t 2 -a test_1.fastq.gz test_1.fastq.gz", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.21\tCL:samtools sort -@ 1 -o test.bam" + ], + "16c1c651f8ec67383bcdee3c55aed94f", + { + "versions_minimap2": [ + [ + "MINIMAP2_ALIGN", + "minimap2", + "2.29-r1283" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-04-05T10:14:29.27901773" + "timestamp": "2026-01-22T15:01:54.090788633" } } \ No newline at end of file diff --git a/modules/nf-core/minimap2/align/tests/tags.yml b/modules/nf-core/minimap2/align/tests/tags.yml deleted file mode 100644 index 39dba374..00000000 --- a/modules/nf-core/minimap2/align/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -minimap2/align: - - "modules/nf-core/minimap2/align/**" diff --git a/modules/nf-core/minimap2/index/environment.yml b/modules/nf-core/minimap2/index/environment.yml deleted file mode 100644 index 8a912a12..00000000 --- a/modules/nf-core/minimap2/index/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: minimap2_index -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::minimap2=2.28 diff --git a/modules/nf-core/minimap2/index/main.nf b/modules/nf-core/minimap2/index/main.nf deleted file mode 100644 index 38320214..00000000 --- a/modules/nf-core/minimap2/index/main.nf +++ /dev/null @@ -1,44 +0,0 @@ -process MINIMAP2_INDEX { - label 'process_low' - - // Note: the versions here need to match the versions used in minimap2/align - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/minimap2:2.28--he4a0461_0' : - 'biocontainers/minimap2:2.28--he4a0461_0' }" - - input: - tuple val(meta), path(fasta) - - output: - tuple val(meta), path("*.mmi"), emit: index - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - """ - minimap2 \\ - -t $task.cpus \\ - -d ${fasta.baseName}.mmi \\ - $args \\ - $fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - minimap2: \$(minimap2 --version 2>&1) - END_VERSIONS - """ - - stub: - """ - touch ${fasta.baseName}.mmi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - minimap2: \$(minimap2 --version 2>&1) - END_VERSIONS - """ -} diff --git a/modules/nf-core/minimap2/index/meta.yml b/modules/nf-core/minimap2/index/meta.yml deleted file mode 100644 index 1d29e3f2..00000000 --- a/modules/nf-core/minimap2/index/meta.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: minimap2_index -description: Provides fasta index required by minimap2 alignment. -keywords: - - index - - fasta - - reference -tools: - - minimap2: - description: | - A versatile pairwise aligner for genomic and spliced nucleotide sequences. - homepage: https://github.com/lh3/minimap2 - documentation: https://github.com/lh3/minimap2#uguide - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: | - Reference database in FASTA format. -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - index: - type: file - description: Minimap2 fasta index. - pattern: "*.mmi" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@yuukiiwa" - - "@drpatelh" -maintainers: - - "@yuukiiwa" - - "@drpatelh" diff --git a/modules/nf-core/minimap2/index/tests/main.nf.test b/modules/nf-core/minimap2/index/tests/main.nf.test deleted file mode 100644 index 97840ff7..00000000 --- a/modules/nf-core/minimap2/index/tests/main.nf.test +++ /dev/null @@ -1,32 +0,0 @@ -nextflow_process { - - name "Test Process MINIMAP2_INDEX" - script "../main.nf" - process "MINIMAP2_INDEX" - - tag "modules" - tag "modules_nfcore" - tag "minimap2" - tag "minimap2/index" - - test("minimap2 index") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - - then { - assert process.success - assert snapshot(process.out).match() - } - - } - -} \ No newline at end of file diff --git a/modules/nf-core/minimap2/index/tests/main.nf.test.snap b/modules/nf-core/minimap2/index/tests/main.nf.test.snap deleted file mode 100644 index 0b098828..00000000 --- a/modules/nf-core/minimap2/index/tests/main.nf.test.snap +++ /dev/null @@ -1,68 +0,0 @@ -{ - "Should run without failures": { - "content": [ - { - "0": [ - [ - { - "id": "test_ref" - }, - "genome.mmi:md5,72e450f12dc691e763c697463bdb1571" - ] - ], - "1": [ - "versions.yml:md5,0fced0ee8015e7f50b82566e3db8f7b0" - ], - "index": [ - [ - { - "id": "test_ref" - }, - "genome.mmi:md5,72e450f12dc691e763c697463bdb1571" - ] - ], - "versions": [ - "versions.yml:md5,0fced0ee8015e7f50b82566e3db8f7b0" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-18T11:46:30.000058092" - }, - "minimap2 index": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "genome.mmi:md5,72e450f12dc691e763c697463bdb1571" - ] - ], - "1": [ - "versions.yml:md5,2f8340380c6741e9261a284262a90bde" - ], - "index": [ - [ - { - "id": "test" - }, - "genome.mmi:md5,72e450f12dc691e763c697463bdb1571" - ] - ], - "versions": [ - "versions.yml:md5,2f8340380c6741e9261a284262a90bde" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-05T10:58:29.828187662" - } -} \ No newline at end of file diff --git a/modules/nf-core/minimap2/index/tests/tags.yml b/modules/nf-core/minimap2/index/tests/tags.yml deleted file mode 100644 index e5ef8e19..00000000 --- a/modules/nf-core/minimap2/index/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -minimap2/index: - - modules/nf-core/minimap2/index/** diff --git a/modules/nf-core/multiqc/environment.yml b/modules/nf-core/multiqc/environment.yml index d02016a0..009874d4 100644 --- a/modules/nf-core/multiqc/environment.yml +++ b/modules/nf-core/multiqc/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::multiqc=1.32 + - bioconda::multiqc=1.33 diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index c1158fb0..5376aea1 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -1,24 +1,21 @@ process MULTIQC { + tag "${meta.id}" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/8c/8c6c120d559d7ee04c7442b61ad7cf5a9e8970be5feefb37d68eeaa60c1034eb/data' : - 'community.wave.seqera.io/library/multiqc:1.32--d58f60e4deb769bf' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/34/34e733a9ae16a27e80fe00f863ea1479c96416017f24a907996126283e7ecd4d/data' + : 'community.wave.seqera.io/library/multiqc:1.33--ee7739d47738383b'}" input: - path multiqc_files, stageAs: "?/*" - path(multiqc_config) - path(extra_multiqc_config) - path(multiqc_logo) - path(replace_names) - path(sample_names) + tuple val(meta), path(multiqc_files, stageAs: "?/*"), path(multiqc_config, stageAs: "?/*"), path(multiqc_logo), path(replace_names), path(sample_names) output: - path "*multiqc_report.html", emit: report - path "*_data" , emit: data - path "*_plots" , optional:true, emit: plots - path "versions.yml" , emit: versions + tuple val(meta), path("*.html"), emit: report + tuple val(meta), path("*_data"), emit: data + tuple val(meta), path("*_plots"), emit: plots, optional: true + // MultiQC should not push its versions to the `versions` topic. Its input depends on the versions topic to be resolved thus outputting to the topic will let the pipeline hang forever + tuple val("${task.process}"), val('multiqc'), eval('multiqc --version | sed "s/.* //g"'), emit: versions when: task.ext.when == null || task.ext.when @@ -26,38 +23,28 @@ process MULTIQC { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ? "--filename ${task.ext.prefix}.html" : '' - def config = multiqc_config ? "--config $multiqc_config" : '' - def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : '' + def config = multiqc_config ? multiqc_config instanceof List ? "--config ${multiqc_config.join(' --config ')}" : "--config ${multiqc_config}" : "" def logo = multiqc_logo ? "--cl-config 'custom_logo: \"${multiqc_logo}\"'" : '' def replace = replace_names ? "--replace-names ${replace_names}" : '' def samples = sample_names ? "--sample-names ${sample_names}" : '' """ multiqc \\ --force \\ - $args \\ - $config \\ - $prefix \\ - $extra_config \\ - $logo \\ - $replace \\ - $samples \\ + ${args} \\ + ${config} \\ + ${prefix} \\ + ${logo} \\ + ${replace} \\ + ${samples} \\ . - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) - END_VERSIONS """ stub: """ mkdir multiqc_data + touch multiqc_data/.stub mkdir multiqc_plots + touch multiqc_plots/.stub touch multiqc_report.html - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) - END_VERSIONS """ } diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml index ce30eb73..ef434a9a 100644 --- a/modules/nf-core/multiqc/meta.yml +++ b/modules/nf-core/multiqc/meta.yml @@ -1,6 +1,6 @@ name: multiqc -description: Aggregate results from bioinformatics analyses across many samples into - a single report +description: Aggregate results from bioinformatics analyses across many samples + into a single report keywords: - QC - bioinformatics tools @@ -12,74 +12,91 @@ tools: It's a general use tool, perfect for summarising the output from numerous bioinformatics tools. homepage: https://multiqc.info/ documentation: https://multiqc.info/docs/ - licence: ["GPL-3.0-or-later"] + licence: + - "GPL-3.0-or-later" identifier: biotools:multiqc input: - - multiqc_files: - type: file - description: | - List of reports / files recognised by MultiQC, for example the html and zip output of FastQC - ontologies: [] - - multiqc_config: - type: file - description: Optional config yml for MultiQC - pattern: "*.{yml,yaml}" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML - - extra_multiqc_config: - type: file - description: Second optional config yml for MultiQC. Will override common sections - in multiqc_config. - pattern: "*.{yml,yaml}" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML - - multiqc_logo: - type: file - description: Optional logo file for MultiQC - pattern: "*.{png}" - ontologies: [] - - replace_names: - type: file - description: | - Optional two-column sample renaming file. First column a set of - patterns, second column a set of corresponding replacements. Passed via - MultiQC's `--replace-names` option. - pattern: "*.{tsv}" - ontologies: - - edam: http://edamontology.org/format_3475 # TSV - - sample_names: - type: file - description: | - Optional TSV file with headers, passed to the MultiQC --sample_names - argument. - pattern: "*.{tsv}" - ontologies: - - edam: http://edamontology.org/format_3475 # TSV -output: - report: - - "*multiqc_report.html": + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'sample1', single_end:false ] + - multiqc_files: type: file - description: MultiQC report file - pattern: "multiqc_report.html" + description: | + List of reports / files recognised by MultiQC, for example the html and zip output of FastQC ontologies: [] - data: - - "*_data": - type: directory - description: MultiQC data dir - pattern: "multiqc_data" - plots: - - "*_plots": + - multiqc_config: + type: file + description: Optional config yml for MultiQC + pattern: "*.{yml,yaml}" + ontologies: + - edam: http://edamontology.org/format_3750 + - multiqc_logo: type: file - description: Plots created by MultiQC - pattern: "*_data" + description: Optional logo file for MultiQC + pattern: "*.{png}" ontologies: [] - versions: - - versions.yml: + - replace_names: + type: file + description: | + Optional two-column sample renaming file. First column a set of + patterns, second column a set of corresponding replacements. Passed via + MultiQC's `--replace-names` option. + pattern: "*.{tsv}" + ontologies: + - edam: http://edamontology.org/format_3475 + - sample_names: type: file - description: File containing software versions - pattern: "versions.yml" + description: | + Optional TSV file with headers, passed to the MultiQC --sample_names + argument. + pattern: "*.{tsv}" ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - edam: http://edamontology.org/format_3475 +output: + report: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'sample1', single_end:false ] + - "*.html": + type: file + description: MultiQC report file + pattern: ".html" + ontologies: [] + data: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'sample1', single_end:false ] + - "*_data": + type: directory + description: MultiQC data dir + pattern: "multiqc_data" + plots: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'sample1', single_end:false ] + - "*_plots": + type: file + description: Plots created by MultiQC + pattern: "*_plots" + ontologies: [] + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - multiqc: + type: string + description: The tool name + - multiqc --version | sed "s/.* //g": + type: eval + description: The expression to obtain the version of the tool authors: - "@abhi18av" - "@bunop" @@ -90,3 +107,27 @@ maintainers: - "@bunop" - "@drpatelh" - "@jfy133" +containers: + conda: + linux/amd64: + lock_file: https://wave.seqera.io/v1alpha1/builds/bd-ee7739d47738383b_1/condalock + linux/arm64: + lock_file: https://wave.seqera.io/v1alpha1/builds/bd-58d7dee710ab3aa8_1/condalock + docker: + linux/amd64: + build_id: bd-ee7739d47738383b_1 + name: community.wave.seqera.io/library/multiqc:1.33--ee7739d47738383b + scanId: sc-6ddec592dcadd583_4 + linux/arm64: + build_id: bd-58d7dee710ab3aa8_1 + name: community.wave.seqera.io/library/multiqc:1.33--58d7dee710ab3aa8 + scanId: sc-a04c42273e34c55c_2 + singularity: + linux/amd64: + build_id: bd-e3576ddf588fa00d_1 + https: https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/34/34e733a9ae16a27e80fe00f863ea1479c96416017f24a907996126283e7ecd4d/data + name: oras://community.wave.seqera.io/library/multiqc:1.33--e3576ddf588fa00d + linux/arm64: + build_id: bd-2537ca5f8445e3c2_1 + https: https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/78/78b89e91d89e9cc99ad5ade5be311f347838cb2acbfb4f13bc343b170be09ce4/data + name: oras://community.wave.seqera.io/library/multiqc:1.33--2537ca5f8445e3c2 diff --git a/modules/nf-core/multiqc/tests/custom_prefix.config b/modules/nf-core/multiqc/tests/custom_prefix.config new file mode 100644 index 00000000..b30b1358 --- /dev/null +++ b/modules/nf-core/multiqc/tests/custom_prefix.config @@ -0,0 +1,5 @@ +process { + withName: 'MULTIQC' { + ext.prefix = "custom_prefix" + } +} diff --git a/modules/nf-core/multiqc/tests/main.nf.test b/modules/nf-core/multiqc/tests/main.nf.test index 33316a7d..0e422eaa 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test +++ b/modules/nf-core/multiqc/tests/main.nf.test @@ -15,25 +15,58 @@ nextflow_process { when { process { """ - input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true)) - input[1] = [] - input[2] = [] - input[3] = [] - input[4] = [] - input[5] = [] + input[0] = channel.of([ + [ id: 'FASTQC' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true), + [], + [], + [], + [] + ]) """ } } then { + assert process.success assertAll( - { assert process.success }, - { assert process.out.report[0] ==~ ".*/multiqc_report.html" }, - { assert process.out.data[0] ==~ ".*/multiqc_data" }, - { assert snapshot(process.out.versions).match("multiqc_versions_single") } + { assert snapshot( + file(process.out.report[0][1]).name, + file(process.out.data[0][1]).name, + process.out.findAll { key, val -> key.startsWith("versions") + }).match() } ) } + } + + test("sarscov2 single-end [fastqc] - custom prefix") { + config "./custom_prefix.config" + + when { + process { + """ + input[0] = channel.of([ + [ id: 'FASTQC' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true), + [], + [], + [], + [] + ]) + """ + } + } + then { + assert process.success + assertAll( + { assert snapshot( + file(process.out.report[0][1]).name, + file(process.out.data[0][1]).name, + process.out.findAll { key, val -> key.startsWith("versions") + }).match() } + ) + } } test("sarscov2 single-end [fastqc] [config]") { @@ -41,22 +74,60 @@ nextflow_process { when { process { """ - input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true)) - input[1] = Channel.of(file("https://github.com/nf-core/tools/raw/dev/nf_core/pipeline-template/assets/multiqc_config.yml", checkIfExists: true)) - input[2] = [] - input[3] = [] - input[4] = [] - input[5] = [] + input[0] = channel.of([ + [ id: 'FASTQC' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true), + file("https://github.com/nf-core/tools/raw/dev/nf_core/pipeline-template/assets/multiqc_config.yml", checkIfExists: true), + [], + [], + [] + ]) + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + file(process.out.report[0][1]).name, + file(process.out.data[0][1]).name, + file(process.out.plots[0][1]).name, + process.out.findAll { key, val -> key.startsWith("versions") + }).match() } + ) + } + } + + test("sarscov2 single-end [fastqc] [multiple configs]") { + + when { + process { + """ + input[0] = channel.of([ + [ id: 'FASTQC' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true), + [ + file("https://github.com/nf-core/tools/raw/dev/nf_core/pipeline-template/assets/multiqc_config.yml", checkIfExists: true), + file("https://github.com/nf-core/tools/raw/dev/nf_core/pipeline-template/assets/multiqc_config.yml", checkIfExists: true) + ], + [], + [], + [] + ]) """ } } then { + assert process.success assertAll( - { assert process.success }, - { assert process.out.report[0] ==~ ".*/multiqc_report.html" }, - { assert process.out.data[0] ==~ ".*/multiqc_data" }, - { assert snapshot(process.out.versions).match("multiqc_versions_config") } + { assert snapshot( + file(process.out.report[0][1]).name, + file(process.out.data[0][1]).name, + file(process.out.plots[0][1]).name, + process.out.findAll { key, val -> key.startsWith("versions") + }).match() } ) } } @@ -68,25 +139,23 @@ nextflow_process { when { process { """ - input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true)) - input[1] = [] - input[2] = [] - input[3] = [] - input[4] = [] - input[5] = [] + input[0] = channel.of([ + [ id: 'FASTQC' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true), + [], + [], + [], + [] + ]) """ } } then { + assert process.success assertAll( - { assert process.success }, - { assert snapshot(process.out.report.collect { file(it).getName() } + - process.out.data.collect { file(it).getName() } + - process.out.plots.collect { file(it).getName() } + - process.out.versions ).match("multiqc_stub") } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } - } } diff --git a/modules/nf-core/multiqc/tests/main.nf.test.snap b/modules/nf-core/multiqc/tests/main.nf.test.snap index a88bafd6..c022701f 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test.snap +++ b/modules/nf-core/multiqc/tests/main.nf.test.snap @@ -1,41 +1,130 @@ { - "multiqc_versions_single": { + "sarscov2 single-end [fastqc] [multiple configs]": { "content": [ - [ - "versions.yml:md5,737bb2c7cad54ffc2ec020791dc48b8f" - ] + "multiqc_report.html", + "multiqc_data", + "multiqc_plots", + { + "versions": [ + [ + "MULTIQC", + "multiqc", + "1.33" + ] + ] + } ], "meta": { "nf-test": "0.9.3", - "nextflow": "24.10.4" + "nextflow": "25.10.4" }, - "timestamp": "2025-10-27T13:33:24.356715" + "timestamp": "2026-02-26T20:21:35.851707" }, - "multiqc_stub": { + "sarscov2 single-end [fastqc]": { "content": [ - [ - "multiqc_report.html", - "multiqc_data", - "multiqc_plots", - "versions.yml:md5,737bb2c7cad54ffc2ec020791dc48b8f" - ] + "multiqc_report.html", + "multiqc_data", + { + "versions": [ + [ + "MULTIQC", + "multiqc", + "1.33" + ] + ] + } ], "meta": { - "nf-test": "0.9.3", - "nextflow": "24.10.4" + "nf-test": "0.9.4", + "nextflow": "25.10.4" }, - "timestamp": "2025-10-27T13:34:11.103619" + "timestamp": "2026-02-26T15:10:36.019680076" }, - "multiqc_versions_config": { + "sarscov2 single-end [fastqc] - stub": { "content": [ - [ - "versions.yml:md5,737bb2c7cad54ffc2ec020791dc48b8f" - ] + { + "data": [ + [ + { + "id": "FASTQC" + }, + [ + ".stub:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "plots": [ + [ + { + "id": "FASTQC" + }, + [ + ".stub:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "report": [ + [ + { + "id": "FASTQC" + }, + "multiqc_report.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + [ + "MULTIQC", + "multiqc", + "1.33" + ] + ] + } ], "meta": { - "nf-test": "0.9.3", - "nextflow": "24.10.4" + "nf-test": "0.9.4", + "nextflow": "25.10.4" + }, + "timestamp": "2026-02-26T15:14:39.789193051" + }, + "sarscov2 single-end [fastqc] [config]": { + "content": [ + "multiqc_report.html", + "multiqc_data", + "multiqc_plots", + { + "versions": [ + [ + "MULTIQC", + "multiqc", + "1.33" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + }, + "timestamp": "2026-02-26T15:21:29.116129274" + }, + "sarscov2 single-end [fastqc] - custom prefix": { + "content": [ + "custom_prefix.html", + "custom_prefix_data", + { + "versions": [ + [ + "MULTIQC", + "multiqc", + "1.33" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" }, - "timestamp": "2025-10-27T13:34:04.615233" + "timestamp": "2026-02-26T15:10:43.419877592" } } \ No newline at end of file diff --git a/modules/nf-core/pear/environment.yml b/modules/nf-core/pear/environment.yml index 127af628..749de05f 100644 --- a/modules/nf-core/pear/environment.yml +++ b/modules/nf-core/pear/environment.yml @@ -1,7 +1,7 @@ -name: pear +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::pear=0.9.6 diff --git a/modules/nf-core/pear/main.nf b/modules/nf-core/pear/main.nf index 01a38859..891cd06f 100644 --- a/modules/nf-core/pear/main.nf +++ b/modules/nf-core/pear/main.nf @@ -11,10 +11,10 @@ process PEAR { tuple val(meta), path(reads) output: - tuple val(meta), path("*.assembled.fastq.gz") , emit: assembled - tuple val(meta), path("*.unassembled.forward.fastq.gz"), path("*.unassembled.reverse.fastq.gz"), emit: unassembled - tuple val(meta), path("*.discarded.fastq.gz") , emit: discarded - path "versions.yml" , emit: versions + tuple val(meta), path("*.assembled.fastq.gz") , emit: assembled + tuple val(meta), path("*.unassembled.forward.fastq.gz"), path("*.unassembled.reverse.fastq.gz") , emit: unassembled + tuple val(meta), path("*.discarded.fastq.gz") , emit: discarded + tuple val("${task.process}"), val('pear'), eval("pear -h | grep 'PEAR v' | sed 's/PEAR v//' | sed 's/ .*//'") , topic: versions, emit: versions_pear when: task.ext.when == null || task.ext.when @@ -35,10 +35,14 @@ process PEAR { gzip -f ${prefix}.unassembled.forward.fastq gzip -f ${prefix}.unassembled.reverse.fastq gzip -f ${prefix}.discarded.fastq + """ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - pear: \$(pear -h | grep 'PEAR v' | sed 's/PEAR v//' | sed 's/ .*//' )) - END_VERSIONS + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + echo | gzip > ${prefix}.assembled.fastq.gz + echo | gzip > ${prefix}.unassembled.forward.fastq.gz + echo | gzip > ${prefix}.unassembled.reverse.fastq.gz + echo | gzip > ${prefix}.discarded.fastq.gz """ } diff --git a/modules/nf-core/pear/meta.yml b/modules/nf-core/pear/meta.yml index 1b25bc08..c4e569e6 100644 --- a/modules/nf-core/pear/meta.yml +++ b/modules/nf-core/pear/meta.yml @@ -1,5 +1,6 @@ name: "pear" -description: PEAR is an ultrafast, memory-efficient and highly accurate pair-end read merger. +description: PEAR is an ultrafast, memory-efficient and highly accurate pair-end + read merger. keywords: - pair-end - read @@ -9,39 +10,82 @@ tools: description: "paired-end read merger" homepage: "https://cme.h-its.org/exelixis/web/software/pear/" documentation: "https://cme.h-its.org/exelixis/web/software/pear/doc.html" - licence: "['Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported']" + licence: + - "Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported" + identifier: biotools:pear input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - reads: - type: file - description: | - List of input FastQ files with paired-end reads forward and reverse. + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - reads: + type: file + description: | + List of input FastQ files with paired-end reads forward and reverse. + ontologies: [] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - assembled: - type: file - description: FastQ file containing Assembled reads. - pattern: "*.{fastq.gz}" - - unassembled: - type: file - description: FastQ files containing Unassembled forward and reverse reads. - pattern: "*.{fastq.gz}" - - discarded: - type: file - description: FastQ file containing discarded reads. - pattern: "*.{fastq.gz}" + assembled: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.assembled.fastq.gz": + type: file + description: FastQ file containing Assembled reads. + pattern: "*.{fastq.gz}" + ontologies: [] + unassembled: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.unassembled.forward.fastq.gz": + type: file + description: FastQ files containing Unassembled forward and reverse + reads. + pattern: "*.{fastq.gz}" + ontologies: [] + - "*.unassembled.reverse.fastq.gz": + type: file + description: FastQ files containing Unassembled forward and reverse + reads. + pattern: "*.{fastq.gz}" + ontologies: [] + discarded: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.discarded.fastq.gz": + type: file + description: FastQ file containing discarded reads. + pattern: "*.{fastq.gz}" + ontologies: [] + versions_pear: + - - ${task.process}: + type: string + description: The name of the process + - pear: + type: string + description: The name of the tool + - pear -h | grep 'PEAR v' | sed 's/PEAR v//' | sed 's/ .*//': + type: eval + description: The expression to obtain the version of the tool +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - pear: + type: string + description: The name of the tool + - pear -h | grep 'PEAR v' | sed 's/PEAR v//' | sed 's/ .*//': + type: eval + description: The expression to obtain the version of the tool authors: - "@mirpedrol" maintainers: diff --git a/modules/nf-core/pear/tests/main.nf.test b/modules/nf-core/pear/tests/main.nf.test new file mode 100644 index 00000000..a8ba8f16 --- /dev/null +++ b/modules/nf-core/pear/tests/main.nf.test @@ -0,0 +1,80 @@ +nextflow_process { + + name "Test Process PEAR" + script "../main.nf" + process "PEAR" + + tag "modules" + tag "modules_nfcore" + tag "pear" + + test("sarscov2 - [fastq_gz_1, fastq_gz_2]") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ] + """ + } + } + + then { + assert process.success + assert snapshot(process.out.collectEntries { key, val -> + if (key[0].isNumber()) { + // Skip numbered outputs + return + } + if (key == "discarded") { + // Discarded fastq is empty, causing a lint failure => only check filename for this output + return [key, val.collect { meta, fastq -> [ meta, file(fastq).name ]}] + } else if (key == "versions") { + return [key, val.collect { file -> path(file).yaml }] + } else { + return [key, val] + } + } ).match() + } + } + + test("sarscov2 - [fastq_gz_1, fastq_gz_2] - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ] + """ + } + } + + then { + assert process.success + assert snapshot(process.out.collectEntries { key, val -> + if (key[0].isNumber()) { + // Skip numbered outputs + return + } + if (key == "versions") { + return [key, val.collect { file -> path(file).yaml }] + } else { + return [key, val] + } + } ).match() + } + } + +} diff --git a/modules/nf-core/pear/tests/main.nf.test.snap b/modules/nf-core/pear/tests/main.nf.test.snap new file mode 100644 index 00000000..ec4165c9 --- /dev/null +++ b/modules/nf-core/pear/tests/main.nf.test.snap @@ -0,0 +1,88 @@ +{ + "sarscov2 - [fastq_gz_1, fastq_gz_2]": { + "content": [ + { + "assembled": [ + [ + { + "id": "test" + }, + "test.assembled.fastq.gz:md5,c66f0d68268d800a0ca9cd285fe62453" + ] + ], + "discarded": [ + [ + { + "id": "test" + }, + "test.discarded.fastq.gz" + ] + ], + "unassembled": [ + [ + { + "id": "test" + }, + "test.unassembled.forward.fastq.gz:md5,066b58ee61df35bd2b063a511ffd5d85", + "test.unassembled.reverse.fastq.gz:md5,ed35907306bdbd96d59144ddb16c951a" + ] + ], + "versions_pear": [ + [ + "PEAR", + "pear", + "0.9.6" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.4" + }, + "timestamp": "2026-02-12T14:18:39.160004687" + }, + "sarscov2 - [fastq_gz_1, fastq_gz_2] - stub": { + "content": [ + { + "assembled": [ + [ + { + "id": "test" + }, + "test.assembled.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "discarded": [ + [ + { + "id": "test" + }, + "test.discarded.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "unassembled": [ + [ + { + "id": "test" + }, + "test.unassembled.forward.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unassembled.reverse.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions_pear": [ + [ + "PEAR", + "pear", + "0.9.6" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.4" + }, + "timestamp": "2026-02-12T14:18:48.734771742" + } +} \ No newline at end of file diff --git a/modules/nf-core/racon/environment.yml b/modules/nf-core/racon/environment.yml index abc5d784..bd714ce3 100644 --- a/modules/nf-core/racon/environment.yml +++ b/modules/nf-core/racon/environment.yml @@ -1,7 +1,7 @@ -name: racon +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::racon=1.4.20 diff --git a/modules/nf-core/racon/meta.yml b/modules/nf-core/racon/meta.yml index 9698c0a8..e1b42a1e 100644 --- a/modules/nf-core/racon/meta.yml +++ b/modules/nf-core/racon/meta.yml @@ -7,44 +7,56 @@ keywords: - polish tools: - racon: - description: Ultrafast consensus module for raw de novo genome assembly of long uncorrected reads. + description: Ultrafast consensus module for raw de novo genome assembly of long + uncorrected reads. homepage: https://github.com/lbcb-sci/racon documentation: https://github.com/lbcb-sci/racon tool_dev_url: https://github.com/lbcb-sci/racon doi: 10.1101/gr.214270.116 licence: ["MIT"] + identifier: biotools:Racon input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: List of input FastQ files. Racon expects single end reads - pattern: "*.{fastq,fastq.gz,fq,fq.gz}" - - assembly: - type: file - description: Genome assembly to be improved - pattern: "*.{fasta,fa}" - - paf: - type: file - description: Alignment in PAF format - pattern: "*.paf" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: List of input FastQ files. Racon expects single end reads + pattern: "*.{fastq,fastq.gz,fq,fq.gz}" + ontologies: + - edam: http://edamontology.org/format_1930 # FASTQ + - assembly: + type: file + description: Genome assembly to be improved + pattern: "*.{fasta,fa}" + ontologies: [] + - paf: + type: file + description: Alignment in PAF format + pattern: "*.paf" + ontologies: [] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - improved_assembly: - type: file - description: Improved genome assembly - pattern: "*_assembly_consensus.fasta.gz" + improved_assembly: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*_assembly_consensus.fasta.gz": + type: file + description: Improved genome assembly + pattern: "*_assembly_consensus.fasta.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@avantonder" maintainers: diff --git a/modules/nf-core/racon/racon.diff b/modules/nf-core/racon/racon.diff index 27994bdb..1e0899e1 100644 --- a/modules/nf-core/racon/racon.diff +++ b/modules/nf-core/racon/racon.diff @@ -1,4 +1,7 @@ -Changes in module 'nf-core/racon' +Changes in component 'nf-core/racon' +'modules/nf-core/racon/environment.yml' is unchanged +'modules/nf-core/racon/meta.yml' is unchanged +Changes in 'racon/main.nf': --- modules/nf-core/racon/main.nf +++ modules/nf-core/racon/main.nf @@ -11,8 +11,8 @@ @@ -29,4 +32,6 @@ Changes in module 'nf-core/racon' gzip -n ${prefix}_assembly_consensus.fasta +'modules/nf-core/racon/tests/main.nf.test.snap' is unchanged +'modules/nf-core/racon/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/racon/tests/main.nf.test b/modules/nf-core/racon/tests/main.nf.test index 1f97fb95..8ba02b63 100644 --- a/modules/nf-core/racon/tests/main.nf.test +++ b/modules/nf-core/racon/tests/main.nf.test @@ -3,7 +3,7 @@ nextflow_process { name "Test Process RACON" script "../main.nf" process "RACON" - + tag "modules" tag "modules_nfcore" tag "racon" @@ -13,11 +13,11 @@ nextflow_process { when { process { """ - input[0] = [ + input[0] = [ [ id:'test', single_end:true ], // meta map - file(params.test_data['bacteroides_fragilis']['nanopore']['test_fastq_gz'], checkIfExists: true), - file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true), - file(params.test_data['bacteroides_fragilis']['genome']['genome_paf'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/nanopore/fastq/test.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/genome/genome.paf', checkIfExists: true) ] """ } @@ -31,4 +31,4 @@ nextflow_process { } } -} \ No newline at end of file +} diff --git a/modules/nf-core/racon/tests/tags.yml b/modules/nf-core/racon/tests/tags.yml deleted file mode 100644 index 5b883e80..00000000 --- a/modules/nf-core/racon/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -racon: - - modules/nf-core/racon/** diff --git a/modules/nf-core/samtools/index/environment.yml b/modules/nf-core/samtools/index/environment.yml index a5e50649..89e12a64 100644 --- a/modules/nf-core/samtools/index/environment.yml +++ b/modules/nf-core/samtools/index/environment.yml @@ -1,8 +1,10 @@ -name: samtools_index +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::samtools=1.19.2 - - bioconda::htslib=1.19.1 + # renovate: datasource=conda depName=bioconda/htslib + - bioconda::htslib=1.22.1 + # renovate: datasource=conda depName=bioconda/samtools + - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index dc14f98d..e2a0e56d 100644 --- a/modules/nf-core/samtools/index/main.nf +++ b/modules/nf-core/samtools/index/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_INDEX { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.19.2--h50ea8bc_0' : - 'biocontainers/samtools:1.19.2--h50ea8bc_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.22.1--h96c455f_0' : + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: tuple val(meta), path(input) @@ -14,7 +14,7 @@ process SAMTOOLS_INDEX { tuple val(meta), path("*.bai") , optional:true, emit: bai tuple val(meta), path("*.csi") , optional:true, emit: csi tuple val(meta), path("*.crai"), optional:true, emit: crai - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), emit: versions_samtools, topic: versions when: task.ext.when == null || task.ext.when @@ -24,25 +24,16 @@ process SAMTOOLS_INDEX { """ samtools \\ index \\ - -@ ${task.cpus-1} \\ + -@ ${task.cpus} \\ $args \\ $input - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ stub: + def args = task.ext.args ?: '' + def extension = file(input).getExtension() == 'cram' ? + "crai" : args.contains("-c") ? "csi" : "bai" """ - touch ${input}.bai - touch ${input}.crai - touch ${input}.csi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS + touch ${input}.${extension} """ } diff --git a/modules/nf-core/samtools/index/meta.yml b/modules/nf-core/samtools/index/meta.yml index 01a4ee03..c6d4ce25 100644 --- a/modules/nf-core/samtools/index/meta.yml +++ b/modules/nf-core/samtools/index/meta.yml @@ -14,39 +14,74 @@ tools: homepage: http://www.htslib.org/ documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] + licence: + - "MIT" + identifier: biotools:samtools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: input file + ontologies: [] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bai: - type: file - description: BAM/CRAM/SAM index file - pattern: "*.{bai,crai,sai}" - - crai: - type: file - description: BAM/CRAM/SAM index file - pattern: "*.{bai,crai,sai}" - - csi: - type: file - description: CSI index file - pattern: "*.{csi}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + bai: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bai": + type: file + description: BAM/CRAM/SAM index file + pattern: "*.{bai,crai,sai}" + ontologies: [] + csi: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csi": + type: file + description: CSI index file + pattern: "*.{csi}" + ontologies: [] + crai: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.crai": + type: file + description: BAM/CRAM/SAM index file + pattern: "*.{bai,crai,sai}" + ontologies: [] + versions_samtools: + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool authors: - "@drpatelh" - "@ewels" diff --git a/modules/nf-core/samtools/index/tests/main.nf.test b/modules/nf-core/samtools/index/tests/main.nf.test index bb7756d1..c96cec86 100644 --- a/modules/nf-core/samtools/index/tests/main.nf.test +++ b/modules/nf-core/samtools/index/tests/main.nf.test @@ -9,11 +9,7 @@ nextflow_process { tag "samtools/index" test("bai") { - when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -27,18 +23,16 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.bai).match("bai") }, - { assert snapshot(process.out.versions).match("bai_versions") } + { assert snapshot( + process.out.bai, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } } test("crai") { - when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -52,20 +46,92 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.crai).match("crai") }, - { assert snapshot(process.out.versions).match("crai_versions") } + { assert snapshot( + process.out.crai, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } } test("csi") { - config "./csi.nextflow.config" when { - params { - outdir = "$outputDir" + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + file(process.out.csi[0][1]).name, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } + ) + } + } + + test("bai - stub") { + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out.bai, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } + ) + } + } + + test("crai - stub") { + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram', checkIfExists: true) + ]) + """ } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out.crai, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } + ) + } + } + + test("csi - stub") { + options "-stub" + config "./csi.nextflow.config" + + when { process { """ input[0] = Channel.of([ @@ -79,8 +145,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert path(process.out.csi.get(0).get(1)).exists() }, - { assert snapshot(process.out.versions).match("csi_versions") } + { assert snapshot( + process.out.csi, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } } diff --git a/modules/nf-core/samtools/index/tests/main.nf.test.snap b/modules/nf-core/samtools/index/tests/main.nf.test.snap index 3dc8e7de..afc8a1ff 100644 --- a/modules/nf-core/samtools/index/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/index/tests/main.nf.test.snap @@ -1,29 +1,59 @@ { - "crai_versions": { + "csi - stub": { "content": [ [ - "versions.yml:md5,cc4370091670b64bba7c7206403ffb3e" - ] + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + { + "versions_samtools": [ + [ + "SAMTOOLS_INDEX", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-02-13T16:12:00.324667957" + "timestamp": "2026-01-28T17:52:10.030187" }, - "csi_versions": { + "crai - stub": { "content": [ [ - "versions.yml:md5,cc4370091670b64bba7c7206403ffb3e" - ] + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + { + "versions_samtools": [ + [ + "SAMTOOLS_INDEX", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-02-13T16:12:07.885103162" + "timestamp": "2026-01-28T17:51:59.125484" }, - "crai": { + "bai - stub": { "content": [ [ [ @@ -31,17 +61,45 @@ "id": "test", "single_end": false }, - "test.paired_end.recalibrated.sorted.cram.crai:md5,14bc3bd5c89cacc8f4541f9062429029" + "test.paired_end.sorted.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + { + "versions_samtools": [ + [ + "SAMTOOLS_INDEX", + "samtools", + "1.22.1" + ] ] - ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-02-12T18:41:38.446424" + "timestamp": "2026-01-28T17:51:47.277042" }, - "bai": { + "csi": { + "content": [ + "test.paired_end.sorted.bam.csi", + { + "versions_samtools": [ + [ + "SAMTOOLS_INDEX", + "samtools", + "1.22.1" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-01-28T17:51:35.758735" + }, + "crai": { "content": [ [ [ @@ -49,26 +107,50 @@ "id": "test", "single_end": false }, - "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" + "test.paired_end.recalibrated.sorted.cram.crai:md5,14bc3bd5c89cacc8f4541f9062429029" + ] + ], + { + "versions_samtools": [ + [ + "SAMTOOLS_INDEX", + "samtools", + "1.22.1" + ] ] - ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-02-12T18:40:46.579747" + "timestamp": "2026-01-28T17:51:26.561965" }, - "bai_versions": { + "bai": { "content": [ [ - "versions.yml:md5,cc4370091670b64bba7c7206403ffb3e" - ] + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" + ] + ], + { + "versions_samtools": [ + [ + "SAMTOOLS_INDEX", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.01.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-02-13T16:11:51.641425452" + "timestamp": "2026-01-28T17:51:15.299035" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/index/tests/tags.yml b/modules/nf-core/samtools/index/tests/tags.yml deleted file mode 100644 index e0f58a7a..00000000 --- a/modules/nf-core/samtools/index/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -samtools/index: - - modules/nf-core/samtools/index/** diff --git a/modules/nf-core/seqtk/seq/environment.yml b/modules/nf-core/seqtk/seq/environment.yml index 78dc2c84..b1d11cbd 100644 --- a/modules/nf-core/seqtk/seq/environment.yml +++ b/modules/nf-core/seqtk/seq/environment.yml @@ -1,7 +1,7 @@ -name: seqtk_seq +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::seqtk=1.4 diff --git a/modules/nf-core/seqtk/seq/main.nf b/modules/nf-core/seqtk/seq/main.nf index 3199f7ec..9322a35b 100644 --- a/modules/nf-core/seqtk/seq/main.nf +++ b/modules/nf-core/seqtk/seq/main.nf @@ -12,7 +12,7 @@ process SEQTK_SEQ { output: tuple val(meta), path("*.gz") , emit: fastx - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('seqtk'), eval("seqtk 2>&1 | sed -n 's/^Version: //p'"), emit: versions_seqtk, topic: versions when: task.ext.when == null || task.ext.when @@ -31,11 +31,6 @@ process SEQTK_SEQ { $args \\ $fastx | \\ gzip -c > ${prefix}.seqtk-seq.${extension}.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - seqtk: \$(echo \$(seqtk 2>&1) | sed 's/^.*Version: //; s/ .*\$//') - END_VERSIONS """ stub: @@ -47,10 +42,5 @@ process SEQTK_SEQ { } """ echo "" | gzip > ${prefix}.seqtk-seq.${extension}.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - seqtk: \$(echo \$(seqtk 2>&1) | sed 's/^.*Version: //; s/ .*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/seqtk/seq/meta.yml b/modules/nf-core/seqtk/seq/meta.yml index 780ccc0c..e3c6a3a7 100644 --- a/modules/nf-core/seqtk/seq/meta.yml +++ b/modules/nf-core/seqtk/seq/meta.yml @@ -6,35 +6,59 @@ keywords: - transformation tools: - seqtk: - description: Seqtk is a fast and lightweight tool for processing sequences in the FASTA or FASTQ format. The seqtk seq command enables common transformation operations on FASTA or FASTQ files. + description: Seqtk is a fast and lightweight tool for processing sequences + in the FASTA or FASTQ format. The seqtk seq command enables common + transformation operations on FASTA or FASTQ files. homepage: https://github.com/lh3/seqtk documentation: https://docs.csc.fi/apps/seqtk/ tool_dev_url: https://github.com/lh3/seqtk licence: ["MIT"] + identifier: biotools:seqtk input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - sequences: - type: file - description: A FASTQ or FASTA file - pattern: "*.{fastq.gz, fastq, fq, fq.gz, fasta, fastq.gz, fa, fa.gz, fas, fas.gz, fna, fna.gz}" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - fastx: + type: file + description: A FASTQ or FASTA file + pattern: "*.{fastq.gz, fastq, fq, fq.gz, fasta, fastq.gz, fa, fa.gz, fas, fas.gz, + fna, fna.gz}" + ontologies: [] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - sequences: - type: file - description: FASTQ/FASTA file containing renamed sequences - pattern: "*.{fastq.gz, fasta.gz}" + fastx: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.gz": + type: file + description: FASTQ/FASTA file containing renamed sequences + pattern: "*.{fastq.gz, fasta.gz}" + ontologies: [] + versions_seqtk: + - - ${task.process}: + type: string + description: The name of the process + - seqtk: + type: string + description: The name of the tool + - "seqtk 2>&1 | sed -n 's/^Version: //p'": + type: eval + description: The expression to obtain the version of the tool +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - seqtk: + type: string + description: The name of the tool + - "seqtk 2>&1 | sed -n 's/^Version: //p'": + type: eval + description: The expression to obtain the version of the tool authors: - "@hseabolt" - "@mjcipriano" diff --git a/modules/nf-core/seqtk/seq/tests/main.nf.test b/modules/nf-core/seqtk/seq/tests/main.nf.test index 82e0a0ce..191bc13e 100644 --- a/modules/nf-core/seqtk/seq/tests/main.nf.test +++ b/modules/nf-core/seqtk/seq/tests/main.nf.test @@ -16,9 +16,9 @@ nextflow_process { process { """ input[0] = [ - [ id:'test' ], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ] + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] """ } } @@ -26,11 +26,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, - { assert snapshot( - file(process.out.fastx[0][1]).name - ).match("seq_fa") - } + { assert snapshot(process.out).match() } ) } @@ -42,9 +38,9 @@ nextflow_process { process { """ input[0] = [ - [ id:'test' ], - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) - ] + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] """ } } @@ -52,11 +48,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, - { assert snapshot( - file(process.out.fastx[0][1]).name - ).match("seq_fq") - } + { assert snapshot(process.out).match() } ) } @@ -69,9 +61,9 @@ nextflow_process { process { """ input[0] = [ - [ id:'test' ], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ] + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] """ } } diff --git a/modules/nf-core/seqtk/seq/tests/main.nf.test.snap b/modules/nf-core/seqtk/seq/tests/main.nf.test.snap index 2940cde1..d79b10f2 100644 --- a/modules/nf-core/seqtk/seq/tests/main.nf.test.snap +++ b/modules/nf-core/seqtk/seq/tests/main.nf.test.snap @@ -11,7 +11,11 @@ ] ], "1": [ - "versions.yml:md5,d3214d3bd8c0bb57f06550146eab94fa" + [ + "SEQTK_SEQ", + "seqtk", + "1.4-r122" + ] ], "fastx": [ [ @@ -21,12 +25,20 @@ "test.seqtk-seq.fasta.gz:md5,e73599798195a519ba2565c3f0275b93" ] ], - "versions": [ - "versions.yml:md5,d3214d3bd8c0bb57f06550146eab94fa" + "versions_seqtk": [ + [ + "SEQTK_SEQ", + "seqtk", + "1.4-r122" + ] ] } ], - "timestamp": "2024-02-22T15:57:07.883846" + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.2" + }, + "timestamp": "2026-01-14T13:12:33.508412343" }, "sarscov2_seq_fq": { "content": [ @@ -40,7 +52,11 @@ ] ], "1": [ - "versions.yml:md5,d3214d3bd8c0bb57f06550146eab94fa" + [ + "SEQTK_SEQ", + "seqtk", + "1.4-r122" + ] ], "fastx": [ [ @@ -50,12 +66,20 @@ "test.seqtk-seq.fasta.gz:md5,f0c5c9110ce19e9ebbc9a6b6baf9e105" ] ], - "versions": [ - "versions.yml:md5,d3214d3bd8c0bb57f06550146eab94fa" + "versions_seqtk": [ + [ + "SEQTK_SEQ", + "seqtk", + "1.4-r122" + ] ] } ], - "timestamp": "2024-02-22T15:57:16.282429" + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.2" + }, + "timestamp": "2026-01-14T13:12:39.220378293" }, "sarscov2_seq_fa_stub": { "content": [ @@ -69,7 +93,11 @@ ] ], "1": [ - "versions.yml:md5,d3214d3bd8c0bb57f06550146eab94fa" + [ + "SEQTK_SEQ", + "seqtk", + "1.4-r122" + ] ], "fastx": [ [ @@ -79,23 +107,19 @@ "test.seqtk-seq.fasta.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], - "versions": [ - "versions.yml:md5,d3214d3bd8c0bb57f06550146eab94fa" + "versions_seqtk": [ + [ + "SEQTK_SEQ", + "seqtk", + "1.4-r122" + ] ] } ], - "timestamp": "2024-02-22T15:57:24.751443" - }, - "seq_fa": { - "content": [ - "test.seqtk-seq.fasta.gz" - ], - "timestamp": "2024-02-22T15:57:07.936813" - }, - "seq_fq": { - "content": [ - "test.seqtk-seq.fasta.gz" - ], - "timestamp": "2024-02-22T15:57:16.311642" + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.2" + }, + "timestamp": "2026-01-14T13:12:45.060779548" } } \ No newline at end of file diff --git a/modules/nf-core/seqtk/seq/tests/standard.config b/modules/nf-core/seqtk/seq/tests/standard.config index beeffb97..e54db05f 100644 --- a/modules/nf-core/seqtk/seq/tests/standard.config +++ b/modules/nf-core/seqtk/seq/tests/standard.config @@ -2,4 +2,4 @@ process { withName: 'SEQTK_SEQ' { ext.args = '-A' } -} \ No newline at end of file +} diff --git a/modules/nf-core/seqtk/seq/tests/tags.yml b/modules/nf-core/seqtk/seq/tests/tags.yml deleted file mode 100644 index d237d869..00000000 --- a/modules/nf-core/seqtk/seq/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -seqtk/seq: - - "modules/nf-core/seqtk/seq/**" diff --git a/modules/nf-core/vsearch/cluster/environment.yml b/modules/nf-core/vsearch/cluster/environment.yml index 965a7fab..bd00d355 100644 --- a/modules/nf-core/vsearch/cluster/environment.yml +++ b/modules/nf-core/vsearch/cluster/environment.yml @@ -1,8 +1,9 @@ -name: vsearch_cluster +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults + dependencies: - - bioconda::vsearch=2.21.1 - bioconda::samtools=1.16.1 + - bioconda::vsearch=2.21.1 diff --git a/modules/nf-core/vsearch/cluster/main.nf b/modules/nf-core/vsearch/cluster/main.nf index ce74abeb..210b6073 100644 --- a/modules/nf-core/vsearch/cluster/main.nf +++ b/modules/nf-core/vsearch/cluster/main.nf @@ -11,19 +11,19 @@ process VSEARCH_CLUSTER { tuple val(meta), path(fasta) output: - tuple val(meta), path('*.aln.gz') , optional: true, emit: aln - tuple val(meta), path('*.biom.gz') , optional: true, emit: biom - tuple val(meta), path('*.mothur.tsv.gz') , optional: true, emit: mothur - tuple val(meta), path('*.otu.tsv.gz') , optional: true, emit: otu - tuple val(meta), path('*.bam') , optional: true, emit: bam - tuple val(meta), path('*.out.tsv.gz') , optional: true, emit: out - tuple val(meta), path('*.blast.tsv.gz') , optional: true, emit: blast - tuple val(meta), path('*.uc.tsv.gz') , optional: true, emit: uc - tuple val(meta), path('*.centroids.fasta.gz'), optional: true, emit: centroids - tuple val(meta), path('*_clusters*') , optional: true, emit: clusters - tuple val(meta), path('*.profile.txt.gz') , optional: true, emit: profile - tuple val(meta), path('*.msa.fasta.gz') , optional: true, emit: msa - path "versions.yml" , emit: versions + tuple val(meta), path('*.aln.gz') , optional: true, emit: aln + tuple val(meta), path('*.biom.gz') , optional: true, emit: biom + tuple val(meta), path('*.mothur.tsv.gz') , optional: true, emit: mothur + tuple val(meta), path('*.otu.tsv.gz') , optional: true, emit: otu + tuple val(meta), path('*.bam') , optional: true, emit: bam + tuple val(meta), path('*.out.tsv.gz') , optional: true, emit: out + tuple val(meta), path('*.blast.tsv.gz') , optional: true, emit: blast + tuple val(meta), path('*.uc.tsv.gz') , optional: true, emit: uc + tuple val(meta), path('*.centroids.fasta.gz') , optional: true, emit: centroids + tuple val(meta), path('*.clusters.fasta*') , optional: true, emit: clusters + tuple val(meta), path('*.profile.txt.gz') , optional: true, emit: profile + tuple val(meta), path('*.msa.fasta.gz') , optional: true, emit: msa + tuple val("${task.process}"), val('vsearch'), eval('vsearch --version 2>&1 | sed -n "1s/.*v\\([0-9.]*\\).*/\\\\1/p"'), emit: versions_vsearch, topic: versions when: task.ext.when == null || task.ext.when @@ -41,7 +41,7 @@ process VSEARCH_CLUSTER { args3.contains("--biomout") ? "biom" : args3.contains("--blast6out") ? "blast.tsv" : args3.contains("--centroids") ? "centroids.fasta" : - args3.contains("--clusters") ? "clusters" : + args3.contains("--clusters") ? "clusters.fasta" : args3.contains("--mothur_shared_out") ? "mothur.tsv" : args3.contains("--msaout") ? "msa.fasta" : args3.contains("--otutabout") ? "otu.tsv" : @@ -54,7 +54,7 @@ process VSEARCH_CLUSTER { """ vsearch \\ $args2 $fasta \\ - $args3 ${prefix}_${out_ext} \\ + $args3 ${prefix}.${out_ext} \\ --threads $task.cpus \\ $args @@ -67,10 +67,35 @@ process VSEARCH_CLUSTER { else samtools view -T $fasta -S -b ${prefix}.${out_ext} > ${prefix}.bam fi + """ + + stub: + def args2 = task.ext.args2 ?: '' + def args3 = task.ext.args3 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" - cat <<-END_VERSIONS > versions.yml - "${task.process}": - vsearch: \$(vsearch --version 2>&1 | head -n 1 | sed 's/vsearch //g' | sed 's/,.*//g' | sed 's/^v//' | sed 's/_.*//') - END_VERSIONS + if (!args2.contains("--cluster_fast") && !args2.contains("--cluster_size") && !args2.contains("--cluster_smallmem") && !args2.contains("--cluster_unoise") ) { + error "Unknown clustering option provided (${args2})" + } + def out_ext = args3.contains("--alnout") ? "aln.gz" : + args3.contains("--biomout") ? "biom.gz" : + args3.contains("--blast6out") ? "blast.tsv.gz" : + args3.contains("--centroids") ? "centroids.fasta.gz" : + args3.contains("--clusters") ? "clusters.fasta" : + args3.contains("--mothur_shared_out") ? "mothur.tsv.gz" : + args3.contains("--msaout") ? "msa.fasta.gz" : + args3.contains("--otutabout") ? "otu.tsv.gz" : + args3.contains("--profile") ? "profile.txt.gz" : + args3.contains("--samout") ? "bam.gz" : + args3.contains("--uc") ? "uc.tsv.gz" : + args3.contains("--userout") ? "out.tsv.gz" : + "" + if (out_ext == "") { error "Unknown output file format provided (${args3})" } + def output = "${prefix}.${out_ext}" + def create_output = args3.contains("--clusters") ? "touch ${output}0" : + args3.contains("--samout") ? "echo | gzip > ${output} && gunzip ${output}" : + "echo | gzip > ${output}" + """ + ${create_output} """ } diff --git a/modules/nf-core/vsearch/cluster/meta.yml b/modules/nf-core/vsearch/cluster/meta.yml index 60d64347..56210666 100644 --- a/modules/nf-core/vsearch/cluster/meta.yml +++ b/modules/nf-core/vsearch/cluster/meta.yml @@ -1,67 +1,204 @@ name: "vsearch_cluster" -description: Cluster sequences using a single-pass, greedy centroid-based clustering algorithm. +description: Cluster sequences using a single-pass, greedy centroid-based + clustering algorithm. keywords: - vsearch - clustering - microbiome tools: - vsearch: - description: VSEARCH is a versatile open-source tool for microbiome analysis, including chimera detection, clustering, dereplication and rereplication, extraction, FASTA/FASTQ/SFF file processing, masking, orienting, pair-wise alignment, restriction site cutting, searching, shuffling, sorting, subsampling, and taxonomic classification of amplicon sequences for metagenomics, genomics, and population genetics. (USEARCH alternative) + description: VSEARCH is a versatile open-source tool for microbiome + analysis, including chimera detection, clustering, dereplication and + rereplication, extraction, FASTA/FASTQ/SFF file processing, masking, + orienting, pair-wise alignment, restriction site cutting, searching, + shuffling, sorting, subsampling, and taxonomic classification of amplicon + sequences for metagenomics, genomics, and population genetics. (USEARCH + alternative) homepage: https://github.com/torognes/vsearch documentation: https://github.com/torognes/vsearch/releases/download/v2.21.1/vsearch_manual.pdf tool_dev_url: https://github.com/torognes/vsearch doi: 10.7717/peerj.2584 licence: ["GPL v3-or-later OR BSD-2-clause"] + identifier: biotools:vsearch input: - - meta: - type: map - description: Groovy Map containing sample information e.g. [ id:'test' ] - - fasta: - type: file - description: Sequences to cluster in FASTA format - pattern: "*.{fasta,fa,fasta.gz,fa.gz}" + - - meta: + type: map + description: Groovy Map containing sample information e.g. [ id:'test' ] + - fasta: + type: file + description: Sequences to cluster in FASTA format + pattern: "*.{fasta,fa,fasta.gz,fa.gz}" + ontologies: [] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - aln: - type: file - description: Results in pairwise alignment format - pattern: "*.aln.gz" - - biom: - type: file - description: Results in an OTU table in the biom version 1.0 file format - pattern: "*.biom.gz" - - mothur: - type: file - description: Results in an OTU table in the mothur ’shared’ tab-separated plain text file format - pattern: "*.mothur.tsv.gz" - - otu: - type: file - description: Results in an OTU table in the classic tab-separated plain text format - pattern: "*.otu.tsv.gz" - - bam: - type: file - description: Results written in bam format - pattern: "*.bam" - - out: - type: file - description: Results in tab-separated output, columns defined by user - pattern: "*.out.tsv.gz" - - blast: - type: file - description: Tab delimited results in blast-like tabular format - pattern: "*.blast.tsv.gz" - - uc: - type: file - description: Tab delimited results in a uclust-like format with 10 columns - pattern: "*.uc.gz" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + aln: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.aln.gz": + type: file + description: Results in pairwise alignment format + pattern: "*.aln.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + biom: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.biom.gz": + type: file + description: Results in an OTU table in the biom version 1.0 file format + pattern: "*.biom.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + mothur: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.mothur.tsv.gz": + type: file + description: Results in an OTU table in the mothur ’shared’ + tab-separated plain text file format + pattern: "*.mothur.tsv.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + otu: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.otu.tsv.gz": + type: file + description: Results in an OTU table in the classic tab-separated plain + text format + pattern: "*.otu.tsv.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + bam: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.bam": + type: file + description: Results written in bam format + pattern: "*.bam" + ontologies: [] + out: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.out.tsv.gz": + type: file + description: Results in tab-separated output, columns defined by user + pattern: "*.out.tsv.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + blast: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.blast.tsv.gz": + type: file + description: Tab delimited results in blast-like tabular format + pattern: "*.blast.tsv.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + uc: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.uc.tsv.gz": + type: file + description: Tab delimited results in a uclust-like format with 10 + columns + pattern: "*.uc.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + centroids: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.centroids.fasta.gz": + type: file + description: Centroid sequences in FASTA format + pattern: "*.centroids.fasta.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + clusters: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.clusters.fasta*.gz": + type: file + description: Clustered sequences in FASTA format + pattern: "*.clusters.fasta*.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + profile: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.profile.txt.gz": + type: file + description: Profile of the clustering results + pattern: "*.profile.txt.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + msa: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - "*.msa.fasta.gz": + type: file + description: Multiple sequence alignment of the centroids + pattern: "*.msa.fasta.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + versions_vsearch: + - - ${task.process}: + type: string + description: The process the versions were collected from + - vsearch: + type: string + description: The tool name + - vsearch --version 2>&1 | sed -n "1s/.*v\([0-9.]*\).*/\\1/p": + type: eval + description: The expression to obtain the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - vsearch: + type: string + description: The tool name + - vsearch --version 2>&1 | sed -n "1s/.*v\([0-9.]*\).*/\\1/p": + type: eval + description: The expression to obtain the version of the tool + authors: - "@mirpedrol" maintainers: diff --git a/modules/nf-core/vsearch/cluster/tests/main.nf.test b/modules/nf-core/vsearch/cluster/tests/main.nf.test index 1a376793..6775c379 100644 --- a/modules/nf-core/vsearch/cluster/tests/main.nf.test +++ b/modules/nf-core/vsearch/cluster/tests/main.nf.test @@ -9,16 +9,21 @@ nextflow_process { tag "vsearch" tag "vsearch/cluster" - test("sarscov2 - fastq - cluster fast") { + config "./nextflow.config" - config './nextflow_fast.config' + test("sarscov2 - fastq - cluster fast") { when { + params { + cluster_args = '--id 0.8' + cluster_args2 = "--cluster_fast" + cluster_args3 = "--centroids" + } process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] """ } @@ -27,7 +32,8 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(process.out).match() }, + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("versions") } ) } @@ -35,14 +41,17 @@ nextflow_process { test("sarscov2 - fastq - cluster size") { - config './nextflow_size.config' - when { + params { + cluster_args = '--id 0.8' + cluster_args2 = "--cluster_size" + cluster_args3 = "--samout" // Test also sam to bam conversion + } process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] """ } @@ -59,14 +68,17 @@ nextflow_process { test("sarscov2 - fastq - cluster smallmem") { - config './nextflow_smallmem.config' - when { + params { + cluster_args = '--id 0.8 --usersort' + cluster_args2 = "--cluster_smallmem" + cluster_args3 = "--centroids" + } process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] """ } @@ -83,14 +95,17 @@ nextflow_process { test("sarscov2 - fastq - cluster unoise") { - config './nextflow_unoise.config' - when { + params { + cluster_args = '--id 0.8 --minsize 1' + cluster_args2 = "--cluster_unoise" + cluster_args3 = "--centroids" + } process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] """ } @@ -107,14 +122,75 @@ nextflow_process { test("sarscov2 - fastq - cluster userout") { - config './nextflow_userout.config' + when { + params { + cluster_args = '--id 0.8 --userfields query+target+id' + cluster_args2 = "--cluster_fast" + cluster_args3 = "--userout" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - fastq - cluster fast - stub") { + + options "-stub" when { + params { + cluster_args = '--id 0.8' + cluster_args2 = "--cluster_fast" + cluster_args3 = "--centroids" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - fastq - cluster size - stub") { + + options "-stub" + + when { + params { + cluster_args = '--id 0.8' + cluster_args2 = "--cluster_size" + cluster_args3 = "--samout" // Test also sam to bam conversion + } process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] """ } diff --git a/modules/nf-core/vsearch/cluster/tests/main.nf.test.snap b/modules/nf-core/vsearch/cluster/tests/main.nf.test.snap index cb91f4ed..8754b8a7 100644 --- a/modules/nf-core/vsearch/cluster/tests/main.nf.test.snap +++ b/modules/nf-core/vsearch/cluster/tests/main.nf.test.snap @@ -15,7 +15,11 @@ ], "12": [ - "versions.yml:md5,c9f7c3c0952e510ae64bf71dc85c3c0f" + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] ], "2": [ @@ -89,12 +93,20 @@ "uc": [ ], - "versions": [ - "versions.yml:md5,c9f7c3c0952e510ae64bf71dc85c3c0f" + "versions_vsearch": [ + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] ] } ], - "timestamp": "2023-12-06T14:35:18.210433" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.3" + }, + "timestamp": "2026-02-13T10:35:39.665177612" }, "sarscov2 - fastq - cluster userout": { "content": [ @@ -112,7 +124,11 @@ ], "12": [ - "versions.yml:md5,c9f7c3c0952e510ae64bf71dc85c3c0f" + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] ], "2": [ @@ -186,12 +202,147 @@ "uc": [ ], - "versions": [ - "versions.yml:md5,c9f7c3c0952e510ae64bf71dc85c3c0f" + "versions_vsearch": [ + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.3" + }, + "timestamp": "2026-02-13T10:35:54.538041255" + }, + "sarscov2 - fastq - cluster size - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "10": [ + + ], + "11": [ + + ], + "12": [ + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "5": [ + + ], + "6": [ + + ], + "7": [ + + ], + "8": [ + + ], + "9": [ + + ], + "aln": [ + + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "biom": [ + + ], + "blast": [ + + ], + "centroids": [ + + ], + "clusters": [ + + ], + "mothur": [ + + ], + "msa": [ + + ], + "otu": [ + + ], + "out": [ + + ], + "profile": [ + + ], + "uc": [ + + ], + "versions_vsearch": [ + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.3" + }, + "timestamp": "2026-02-13T10:36:09.229901854" + }, + "versions": { + "content": [ + { + "versions_vsearch": [ + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] ] } ], - "timestamp": "2023-12-06T14:35:27.471744" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.3" + }, + "timestamp": "2026-02-13T10:35:24.197694337" }, "sarscov2 - fastq - cluster size": { "content": [ @@ -209,7 +360,11 @@ ], "12": [ - "versions.yml:md5,c9f7c3c0952e510ae64bf71dc85c3c0f" + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] ], "2": [ @@ -283,12 +438,20 @@ "uc": [ ], - "versions": [ - "versions.yml:md5,c9f7c3c0952e510ae64bf71dc85c3c0f" + "versions_vsearch": [ + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] ] } ], - "timestamp": "2023-12-06T14:35:13.922868" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.3" + }, + "timestamp": "2026-02-13T10:35:31.811335455" }, "sarscov2 - fastq - cluster unoise": { "content": [ @@ -306,7 +469,11 @@ ], "12": [ - "versions.yml:md5,c9f7c3c0952e510ae64bf71dc85c3c0f" + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] ], "2": [ @@ -380,12 +547,129 @@ "uc": [ ], - "versions": [ - "versions.yml:md5,c9f7c3c0952e510ae64bf71dc85c3c0f" + "versions_vsearch": [ + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.3" + }, + "timestamp": "2026-02-13T10:35:47.041096957" + }, + "sarscov2 - fastq - cluster fast - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "10": [ + + ], + "11": [ + + ], + "12": [ + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + + ], + "7": [ + + ], + "8": [ + [ + { + "id": "test", + "single_end": false + }, + "test.centroids.fasta.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "9": [ + + ], + "aln": [ + + ], + "bam": [ + + ], + "biom": [ + + ], + "blast": [ + + ], + "centroids": [ + [ + { + "id": "test", + "single_end": false + }, + "test.centroids.fasta.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "clusters": [ + + ], + "mothur": [ + + ], + "msa": [ + + ], + "otu": [ + + ], + "out": [ + + ], + "profile": [ + + ], + "uc": [ + + ], + "versions_vsearch": [ + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] ] } ], - "timestamp": "2023-12-06T14:35:22.849537" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.3" + }, + "timestamp": "2026-02-13T10:36:01.905883862" }, "sarscov2 - fastq - cluster fast": { "content": [ @@ -403,7 +687,11 @@ ], "12": [ - "versions.yml:md5,c9f7c3c0952e510ae64bf71dc85c3c0f" + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] ], "2": [ @@ -477,11 +765,19 @@ "uc": [ ], - "versions": [ - "versions.yml:md5,c9f7c3c0952e510ae64bf71dc85c3c0f" + "versions_vsearch": [ + [ + "VSEARCH_CLUSTER", + "vsearch", + "2.21.1" + ] ] } ], - "timestamp": "2023-12-06T14:35:07.719346" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.3" + }, + "timestamp": "2026-02-13T10:35:24.173804599" } } \ No newline at end of file diff --git a/modules/nf-core/vsearch/cluster/tests/nextflow.config b/modules/nf-core/vsearch/cluster/tests/nextflow.config new file mode 100644 index 00000000..7f135674 --- /dev/null +++ b/modules/nf-core/vsearch/cluster/tests/nextflow.config @@ -0,0 +1,7 @@ +process { + withName: VSEARCH_CLUSTER { + ext.args = params.cluster_args + ext.args2 = params.cluster_args2 + ext.args3 = params.cluster_args3 + } +} diff --git a/modules/nf-core/vsearch/cluster/tests/nextflow_fast.config b/modules/nf-core/vsearch/cluster/tests/nextflow_fast.config deleted file mode 100644 index df76a060..00000000 --- a/modules/nf-core/vsearch/cluster/tests/nextflow_fast.config +++ /dev/null @@ -1,7 +0,0 @@ -process { - - ext.args = '--id 0.8' - ext.args2 = "--cluster_fast" - ext.args3 = "--centroids" - -} diff --git a/modules/nf-core/vsearch/cluster/tests/nextflow_size.config b/modules/nf-core/vsearch/cluster/tests/nextflow_size.config deleted file mode 100644 index b650043e..00000000 --- a/modules/nf-core/vsearch/cluster/tests/nextflow_size.config +++ /dev/null @@ -1,7 +0,0 @@ -process { - - ext.args = '--id 0.8' - ext.args2 = "--cluster_size" - ext.args3 = "--samout" // Test also sam to bam conversion - -} diff --git a/modules/nf-core/vsearch/cluster/tests/nextflow_smallmem.config b/modules/nf-core/vsearch/cluster/tests/nextflow_smallmem.config deleted file mode 100644 index 5e4efb8b..00000000 --- a/modules/nf-core/vsearch/cluster/tests/nextflow_smallmem.config +++ /dev/null @@ -1,7 +0,0 @@ -process { - - ext.args = '--id 0.8 --usersort' - ext.args2 = "--cluster_smallmem" - ext.args3 = "--centroids" - -} diff --git a/modules/nf-core/vsearch/cluster/tests/nextflow_unoise.config b/modules/nf-core/vsearch/cluster/tests/nextflow_unoise.config deleted file mode 100644 index 96ccf725..00000000 --- a/modules/nf-core/vsearch/cluster/tests/nextflow_unoise.config +++ /dev/null @@ -1,7 +0,0 @@ -process { - - ext.args = '--id 0.8 --minsize 1' - ext.args2 = "--cluster_unoise" - ext.args3 = "--centroids" - -} diff --git a/modules/nf-core/vsearch/cluster/tests/nextflow_userout.config b/modules/nf-core/vsearch/cluster/tests/nextflow_userout.config deleted file mode 100644 index 63b04555..00000000 --- a/modules/nf-core/vsearch/cluster/tests/nextflow_userout.config +++ /dev/null @@ -1,7 +0,0 @@ -process { - - ext.args = '--id 0.8 --userfields query+target+id' - ext.args2 = "--cluster_fast" - ext.args3 = "--userout" - -} diff --git a/modules/nf-core/vsearch/cluster/tests/tags.yml b/modules/nf-core/vsearch/cluster/tests/tags.yml deleted file mode 100644 index 7238024f..00000000 --- a/modules/nf-core/vsearch/cluster/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -vsearch/cluster: - - "modules/nf-core/vsearch/cluster/**" diff --git a/modules/nf-core/vsearch/cluster/vsearch-cluster.diff b/modules/nf-core/vsearch/cluster/vsearch-cluster.diff index df715174..33d86fb5 100644 --- a/modules/nf-core/vsearch/cluster/vsearch-cluster.diff +++ b/modules/nf-core/vsearch/cluster/vsearch-cluster.diff @@ -1,63 +1,52 @@ -Changes in module 'nf-core/vsearch/cluster' +Changes in component 'nf-core/vsearch/cluster' +'modules/nf-core/vsearch/cluster/environment.yml' is unchanged +'modules/nf-core/vsearch/cluster/meta.yml' is unchanged +Changes in 'vsearch/cluster/main.nf': --- modules/nf-core/vsearch/cluster/main.nf +++ modules/nf-core/vsearch/cluster/main.nf -@@ -11,19 +11,19 @@ - tuple val(meta), path(fasta) - - output: -- tuple val(meta), path('*.aln.gz') , optional: true, emit: aln -- tuple val(meta), path('*.biom.gz') , optional: true, emit: biom -- tuple val(meta), path('*.mothur.tsv.gz') , optional: true, emit: mothur -- tuple val(meta), path('*.otu.tsv.gz') , optional: true, emit: otu -- tuple val(meta), path('*.bam') , optional: true, emit: bam -- tuple val(meta), path('*.out.tsv.gz') , optional: true, emit: out -- tuple val(meta), path('*.blast.tsv.gz') , optional: true, emit: blast -- tuple val(meta), path('*.uc.tsv.gz') , optional: true, emit: uc -- tuple val(meta), path('*.centroids.fasta.gz') , optional: true, emit: centroids +@@ -20,7 +20,7 @@ + tuple val(meta), path('*.blast.tsv.gz') , optional: true, emit: blast + tuple val(meta), path('*.uc.tsv.gz') , optional: true, emit: uc + tuple val(meta), path('*.centroids.fasta.gz') , optional: true, emit: centroids - tuple val(meta), path('*.clusters.fasta*.gz') , optional: true, emit: clusters -- tuple val(meta), path('*.profile.txt.gz') , optional: true, emit: profile -- tuple val(meta), path('*.msa.fasta.gz') , optional: true, emit: msa -- path "versions.yml" , emit: versions -+ tuple val(meta), path('*.aln.gz') , optional: true, emit: aln -+ tuple val(meta), path('*.biom.gz') , optional: true, emit: biom -+ tuple val(meta), path('*.mothur.tsv.gz') , optional: true, emit: mothur -+ tuple val(meta), path('*.otu.tsv.gz') , optional: true, emit: otu -+ tuple val(meta), path('*.bam') , optional: true, emit: bam -+ tuple val(meta), path('*.out.tsv.gz') , optional: true, emit: out -+ tuple val(meta), path('*.blast.tsv.gz') , optional: true, emit: blast -+ tuple val(meta), path('*.uc.tsv.gz') , optional: true, emit: uc -+ tuple val(meta), path('*.centroids.fasta.gz'), optional: true, emit: centroids -+ tuple val(meta), path('*_clusters*') , optional: true, emit: clusters -+ tuple val(meta), path('*.profile.txt.gz') , optional: true, emit: profile -+ tuple val(meta), path('*.msa.fasta.gz') , optional: true, emit: msa -+ path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when -@@ -41,7 +41,7 @@ - args3.contains("--biomout") ? "biom" : - args3.contains("--blast6out") ? "blast.tsv" : - args3.contains("--centroids") ? "centroids.fasta" : -- args3.contains("--clusters") ? "clusters.fasta" : -+ args3.contains("--clusters") ? "clusters" : - args3.contains("--mothur_shared_out") ? "mothur.tsv" : - args3.contains("--msaout") ? "msa.fasta" : - args3.contains("--otutabout") ? "otu.tsv" : -@@ -54,13 +54,13 @@ - """ - vsearch \\ - $args2 $fasta \\ -- $args3 ${prefix}.${out_ext} \\ -+ $args3 ${prefix}_${out_ext} \\ - --threads $task.cpus \\ - $args ++ tuple val(meta), path('*.clusters.fasta*') , optional: true, emit: clusters + tuple val(meta), path('*.profile.txt.gz') , optional: true, emit: profile + tuple val(meta), path('*.msa.fasta.gz') , optional: true, emit: msa + tuple val("${task.process}"), val('vsearch'), eval('vsearch --version 2>&1 | sed -n "1s/.*v\\([0-9.]*\\).*/\\\\1/p"'), emit: versions_vsearch, topic: versions +@@ -60,7 +60,7 @@ if [[ $args3 == "--clusters" ]] then -- gzip -n ${prefix}.${out_ext}* +- find . -type f -name \"${prefix}.${out_ext}*[0-9]\" | xargs gzip -n + : elif [[ $args3 != "--samout" ]] then gzip -n ${prefix}.${out_ext} +@@ -81,7 +81,7 @@ + args3.contains("--biomout") ? "biom.gz" : + args3.contains("--blast6out") ? "blast.tsv.gz" : + args3.contains("--centroids") ? "centroids.fasta.gz" : +- args3.contains("--clusters") ? "clusters.fasta.gz" : ++ args3.contains("--clusters") ? "clusters.fasta" : + args3.contains("--mothur_shared_out") ? "mothur.tsv.gz" : + args3.contains("--msaout") ? "msa.fasta.gz" : + args3.contains("--otutabout") ? "otu.tsv.gz" : +@@ -92,9 +92,10 @@ + "" + if (out_ext == "") { error "Unknown output file format provided (${args3})" } + def output = "${prefix}.${out_ext}" +- def non_gz_out = args3.contains("--samout") ? "gunzip ${output}" : "" ++ def create_output = args3.contains("--clusters") ? "touch ${output}0" : ++ args3.contains("--samout") ? "echo | gzip > ${output} && gunzip ${output}" : ++ "echo | gzip > ${output}" + """ +- echo | gzip > ${output} +- ${non_gz_out} ++ ${create_output} + """ + } +'modules/nf-core/vsearch/cluster/tests/main.nf.test.snap' is unchanged +'modules/nf-core/vsearch/cluster/tests/nextflow.config' is unchanged +'modules/nf-core/vsearch/cluster/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/vsearch/sort/environment.yml b/modules/nf-core/vsearch/sort/environment.yml index dd39854e..817588c4 100644 --- a/modules/nf-core/vsearch/sort/environment.yml +++ b/modules/nf-core/vsearch/sort/environment.yml @@ -1,7 +1,7 @@ -name: vsearch_sort +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::vsearch=2.21.1 diff --git a/modules/nf-core/vsearch/sort/main.nf b/modules/nf-core/vsearch/sort/main.nf index 6960ac7f..805c949c 100644 --- a/modules/nf-core/vsearch/sort/main.nf +++ b/modules/nf-core/vsearch/sort/main.nf @@ -13,7 +13,7 @@ process VSEARCH_SORT { output: tuple val(meta), path("*.fasta"), emit: fasta - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('vsearch'), eval('vsearch --version 2>&1 | sed -n "1s/.*v\\([0-9.]*\\).*/\\\\1/p"'), emit: versions_vsearch, topic: versions when: task.ext.when == null || task.ext.when @@ -28,20 +28,11 @@ process VSEARCH_SORT { --threads $task.cpus \\ --output ${prefix}.fasta \\ $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - vsearch: \$(vsearch --version 2>&1 | head -n 1 | sed 's/vsearch //g;s/,.*//g;s/^v//;s/_.*//') - END_VERSIONS """ stub: + def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - vsearch: \$(vsearch --version 2>&1 | head -n 1 | sed 's/vsearch //g;s/,.*//g;s/^v//;s/_.*//') - END_VERSIONS """ } diff --git a/modules/nf-core/vsearch/sort/meta.yml b/modules/nf-core/vsearch/sort/meta.yml index ddf28a30..43e6193f 100644 --- a/modules/nf-core/vsearch/sort/meta.yml +++ b/modules/nf-core/vsearch/sort/meta.yml @@ -1,5 +1,6 @@ name: "vsearch_sort" -description: Sort fasta entries by decreasing abundance (--sortbysize) or sequence length (--sortbylength). +description: Sort fasta entries by decreasing abundance (--sortbysize) or + sequence length (--sortbylength). keywords: - vsearch/sort - vsearch @@ -10,38 +11,68 @@ keywords: - population genetics tools: - vsearch: - description: VSEARCH is a versatile open-source tool for microbiome analysis, including chimera detection, clustering, dereplication and rereplication, extraction, FASTA/FASTQ/SFF file processing, masking, orienting, pair-wise alignment, restriction site cutting, searching, shuffling, sorting, subsampling, and taxonomic classification of amplicon sequences for metagenomics, genomics, and population genetics. (USEARCH alternative) + description: VSEARCH is a versatile open-source tool for microbiome + analysis, including chimera detection, clustering, dereplication and + rereplication, extraction, FASTA/FASTQ/SFF file processing, masking, + orienting, pair-wise alignment, restriction site cutting, searching, + shuffling, sorting, subsampling, and taxonomic classification of amplicon + sequences for metagenomics, genomics, and population genetics. (USEARCH + alternative) homepage: https://github.com/torognes/vsearch documentation: https://github.com/torognes/vsearch/releases/download/v2.21.1/vsearch_manual.pdf tool_dev_url: https://github.com/torognes/vsearch doi: 10.7717/peerj.2584 licence: ["GPL v3-or-later OR BSD-2-clause"] + identifier: biotools:vsearch input: - - meta: - type: map - description: Groovy Map containing sample information e.g. [ id:'test' ] - - fasta: - type: file - description: Sequences to be sorted in FASTA format - pattern: "*.{fasta,fa,fasta.gz,fa.gz}" + - - meta: + type: map + description: Groovy Map containing sample information e.g. [ id:'test' ] + - fasta: + type: file + description: Sequences to be sorted in FASTA format + pattern: "*.{fasta,fa,fasta.gz,fa.gz}" + ontologies: [] - sort_arg: type: string - description: Argument to provide to sort algorithm. Sort by abundance with --sortbysize or by sequence length with --sortbylength. + description: Argument to provide to sort algorithm. Sort by abundance with + --sortbysize or by sequence length with --sortbylength. enum: ["--sortbysize", "--sortbylength"] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Sorted FASTA file - pattern: "*.{fasta}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + fasta: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fasta": + type: file + description: Sorted FASTA file + pattern: "*.{fasta}" + ontologies: [] + versions_vsearch: + - - ${task.process}: + type: string + description: The process the versions were collected from + - vsearch: + type: string + description: The tool name + - vsearch --version 2>&1 | sed -n "1s/.*v\([0-9.]*\).*/\\1/p": + type: eval + description: The expression to obtain the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - vsearch: + type: string + description: The tool name + - vsearch --version 2>&1 | sed -n "1s/.*v\([0-9.]*\).*/\\1/p": + type: eval + description: The expression to obtain the version of the tool + authors: - "@mirpedrol" maintainers: diff --git a/modules/nf-core/vsearch/sort/tests/main.nf.test b/modules/nf-core/vsearch/sort/tests/main.nf.test index db043851..3ea3ade7 100644 --- a/modules/nf-core/vsearch/sort/tests/main.nf.test +++ b/modules/nf-core/vsearch/sort/tests/main.nf.test @@ -18,7 +18,7 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] input[1] = "--sortbysize" """ @@ -41,7 +41,7 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] input[1] = "--sortbylength" """ diff --git a/modules/nf-core/vsearch/sort/tests/main.nf.test.snap b/modules/nf-core/vsearch/sort/tests/main.nf.test.snap index 0a278d10..17f41d80 100644 --- a/modules/nf-core/vsearch/sort/tests/main.nf.test.snap +++ b/modules/nf-core/vsearch/sort/tests/main.nf.test.snap @@ -12,7 +12,11 @@ ] ], "1": [ - "versions.yml:md5,19dba7cb81af6ce4b80f3bf99829ee9d" + [ + "VSEARCH_SORT", + "vsearch", + "2.21.1" + ] ], "fasta": [ [ @@ -23,16 +27,20 @@ "test_sorted.fasta:md5,86457b12184a7215734ff1e4d868ac51" ] ], - "versions": [ - "versions.yml:md5,19dba7cb81af6ce4b80f3bf99829ee9d" + "versions_vsearch": [ + [ + "VSEARCH_SORT", + "vsearch", + "2.21.1" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.1" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-05-24T13:05:54.524638" + "timestamp": "2026-02-13T10:27:03.118011149" }, "vsearch-sort - sort - length": { "content": [ @@ -47,7 +55,11 @@ ] ], "1": [ - "versions.yml:md5,19dba7cb81af6ce4b80f3bf99829ee9d" + [ + "VSEARCH_SORT", + "vsearch", + "2.21.1" + ] ], "fasta": [ [ @@ -58,15 +70,19 @@ "test_sorted.fasta:md5,e733a34d0c655966408e773de876e5fb" ] ], - "versions": [ - "versions.yml:md5,19dba7cb81af6ce4b80f3bf99829ee9d" + "versions_vsearch": [ + [ + "VSEARCH_SORT", + "vsearch", + "2.21.1" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.1" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-05-24T13:06:01.210745" + "timestamp": "2026-02-13T10:27:10.828901105" } } \ No newline at end of file diff --git a/modules/nf-core/vsearch/sort/tests/tags.yml b/modules/nf-core/vsearch/sort/tests/tags.yml deleted file mode 100644 index d7220281..00000000 --- a/modules/nf-core/vsearch/sort/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -vsearch/sort: - - modules/nf-core/vsearch/sort/** diff --git a/nextflow.config b/nextflow.config index 58d92b8a..8e67c286 100644 --- a/nextflow.config +++ b/nextflow.config @@ -106,7 +106,8 @@ params { // nf-gpt plugin settings gpt { // The user should provide a functioning api key - apiKey = secrets.OPENAI_API_KEY + // please set the env variable OPENAI_API_KEY in your environment prior to running the pipeline + // apiKey = secrets.OPENAI_API_KEY ?: null // Models are available in nf-gpt 0.4.0: gpt-4o, gpt-4o-mini, gpt-4-turbo, gpt-4, and gpt-3.5-turbo model = "gpt-4o" // Set maximum number of tokens. This depends on the used model: https://platform.openai.com/docs/models @@ -241,8 +242,6 @@ profiles { test_screening_bowtie { includeConfig 'conf/test_screening_bowtie.config' } } -// Set AWS client to anonymous when using the default igenomes_base -aws.client.anonymous = !params.igenomes_ignore && params.igenomes_base?.startsWith('s3://ngi-igenomes/igenomes/') ?: false // Load nf-core custom profiles from different institutions // If params.custom_config_base is set AND either the NXF_OFFLINE environment variable is not set or params.custom_config_base is a local path, the nfcore_custom.config file from the specified base path is included. @@ -442,14 +441,14 @@ manifest { description = """Pipeline for the analysis of CRISPR data""" mainScript = 'main.nf' defaultBranch = 'master' - nextflowVersion = '!>=25.04.0' + nextflowVersion = '!>=25.10.3' version = '2.4.0dev' doi = 'https://doi.org/10.5281/zenodo.7598496' } // Nextflow plugins plugins { - id 'nf-schema@2.5.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet + id 'nf-schema@2.6.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet id 'nf-gpt@0.4.0' } diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json index 3c67766c..b638c3a9 100644 --- a/ro-crate-metadata.json +++ b/ro-crate-metadata.json @@ -23,7 +23,7 @@ "@type": "Dataset", "creativeWorkStatus": "Stable", "datePublished": "2025-11-19T15:35:23+00:00", - "description": "

\n \n \n \"nf-core/crisprseq\"\n \n

\n\n[![Open in GitHub Codespaces](https://img.shields.io/badge/Open_In_GitHub_Codespaces-black?labelColor=grey&logo=github)](https://github.com/codespaces/new/nf-core/crisprseq)\n[![GitHub Actions CI Status](https://github.com/nf-core/crisprseq/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-core/crisprseq/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-core/crisprseq/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/crisprseq/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/crisprseq/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/version-%E2%89%A525.04.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.5.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.5.1)\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/crisprseq)\n\n[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23crisprseq-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/crisprseq)[![Follow on Bluesky](https://img.shields.io/badge/bluesky-%40nf__core-1185fe?labelColor=000000&logo=bluesky)](https://bsky.app/profile/nf-co.re)[![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/crisprseq** 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/crisprseq \\\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/crisprseq/usage) and the [parameter documentation](https://nf-co.re/crisprseq/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/crisprseq/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/crisprseq/output).\n\n## Credits\n\nnf-core/crisprseq was originally written by J\u00falia Mir Pedrol, Laurence Kuhlburger.\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 `#crisprseq` channel](https://nfcore.slack.com/channels/crisprseq) (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", + "description": "

\n \n \n \"nf-core/crisprseq\"\n \n

\n\n[![Open in GitHub Codespaces](https://img.shields.io/badge/Open_In_GitHub_Codespaces-black?labelColor=grey&logo=github)](https://github.com/codespaces/new/nf-core/crisprseq)\n[![GitHub Actions CI Status](https://github.com/nf-core/crisprseq/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-core/crisprseq/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-core/crisprseq/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/crisprseq/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/crisprseq/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/version-%E2%89%A525.10.3-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.5.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.5.1)\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/crisprseq)\n\n[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23crisprseq-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/crisprseq)[![Follow on Bluesky](https://img.shields.io/badge/bluesky-%40nf__core-1185fe?labelColor=000000&logo=bluesky)](https://bsky.app/profile/nf-co.re)[![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![HiRSE Code Promo Badge](https://img.shields.io/badge/Promo-8db427?style=plastic&label=HiRSE&labelColor=005aa0&link=https%3A%2F%2Fgo.fzj.de%2FCodePromo)\n\n## Introduction\n\n**nf-core/crisprseq** is a bioinformatics best-practice analysis pipeline for the analysis of CRISPR edited data. It allows the evaluation of the quality of gene editing experiments using targeted next generation sequencing (NGS) data (`targeted`) as well as the discovery of important genes from knock-out or activation CRISPR-Cas9 screens using CRISPR pooled DNA (`screening`).\n\nnf-core/crisprseq can be used to analyse:\n\n- CRISPR gene knockouts (KO)\n- CRISPR knock-ins (KI)\n- Base editing (BE) and prime editing (PE) experiments\n- CRISPR screening experiments (KO, CRISPRa (activation) or CRISPRi (interference))\n\nThe pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses Docker/Singularity containers making installation trivial and results highly reproducible. The [Nextflow DSL2](https://www.nextflow.io/docs/latest/dsl2.html) implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies. Where possible, these processes have been submitted to and installed from [nf-core/modules](https://github.com/nf-core/modules) in order to make them available to all nf-core pipelines, and to everyone within the Nextflow community!\n\nOn release, automated continuous integration tests run the pipeline on a full-sized dataset on the AWS cloud infrastructure. This ensures that the pipeline runs on AWS, has sensible resource allocation defaults set to run on real-world datasets, and permits the persistent storage of results to benchmark between pipeline releases and other analysis sources. The results obtained from the full-sized test can be viewed on the [nf-core website](https://nf-co.re/crisprseq/results).\n\n## Pipeline summary\n\n\n \n \"Text\n\n\nFor crispr targeting :\n\n1. Merge paired-end reads ([`Pear`](https://cme.h-its.org/exelixis/web/software/pear/doc.html))\n2. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/))\n3. Adapter trimming ([`Cutadapt`](http://dx.doi.org/10.14806/ej.17.1.200))\n4. Quality filtering ([`Seqtk`](https://github.com/lh3/seqtk))\n5. UMI clustering (optional):\n a. Extract UMI sequences (Python script)\n b. Cluster UMI sequences ([`Vsearch`](https://github.com/torognes/vsearch))\n c. Obtain the most abundant UMI sequence for each cluster ([`Vsearch`](https://github.com/torognes/vsearch))\n d. Obtain a consensus for each cluster ([`minimap2`](https://github.com/lh3/minimap2))\n e. Polish consensus sequence ([`racon`](https://github.com/lbcb-sci/racon))\n f. Repeat a second rand of consensus + polishing (`minimap2` + `racon`)\n g. Obtain the final consensus of each cluster ([Medaka](https://nanoporetech.github.io/medaka/index.html))\n6. Read mapping:\n - ([`minimap2`](https://github.com/lh3/minimap2), _default_)\n - ([`bwa`](http://bio-bwa.sourceforge.net/))\n - ([`bowtie2`](http://bowtie-bio.sourceforge.net/bowtie2/index.shtml))\n7. CIGAR parsing for edit calling ([`R`](https://www.r-project.org/))\n\nFor crispr screening:\n\n1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/))\n2. Read mapping ([`MAGeCK count`](https://sourceforge.net/p/mageck/wiki/usage/#count))\n - ([`MAGeCK count`](https://github.com/lh3/minimap2), _default_)\n - ([`bowtie2`](http://bowtie-bio.sourceforge.net/bowtie2/index.shtml))\n3. Optional: CNV correction and normalization with ([`CRISPRcleanR`](https://github.com/francescojm/CRISPRcleanR))\n4. Rank sgRNAs and genes ;\n - ([MAGeCK test](https://sourceforge.net/p/mageck/wiki/usage/#test))\n - ([MAGeCK mle](https://sourceforge.net/p/mageck/wiki/Home/#mle))\n - ([BAGEL2](https://github.com/hart-lab/bagel))\n - ([DrugZ](https://github.com/hart-lab/drugz))\n5. Optional: hit selection on KO screen allowing a subset of more likely true positives\n6. Visualize analysis\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\nFirst, prepare a samplesheet with your input data that looks as follows:\n\n```csv title=\"samplesheet.csv\"\nsample,fastq_1,fastq_2,reference,protospacer,template\nSAMPLE1,SAMPLE1_R1.fastq.gz,SAMPLE1_R2.fastq.gz,ACTG,ACTG,ACTG\n```\n\nor\n\n```csv title=\"samplesheet.csv\"\nsample,fastq_1,fastq_2,condition\nSAMPLE1,SAMPLE1_R1.fastq.gz,SAMPLE1_R2.fastq.gz,control\n```\n\nFor more details on how to build a sample sheet, please refer to the [usage documentation](https://nf-co.re/crisprseq/usage)\n\nNow, you can run the pipeline using:\n\n```bash\nnextflow run nf-core/crisprseq --input samplesheet.csv --analysis --outdir -profile \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\n> [!WARNING]\n> Since Nextflow 23.07.0, Nextflow no longer mounts the host's HOME directory when using Apptainer or Singularity. MAGeCKFlute needs HOME directory write access. As a workaround, you can revert to the old behavior by setting the environment variable NXF_APPTAINER_HOME_MOUNT or NXF_SINGULARITY_HOME_MOUNT to true in the machine from which you launch the pipeline.\n> `export NXF_SINGULARITY_HOME_MOUNT=true; nextflow run nf-core/crisprseq --input samplesheet.csv --analysis screening --outdir -profile `\n\nFor more details and further functionality, please refer to the [usage documentation](https://nf-co.re/crisprseq/usage) and the [parameter documentation](https://nf-co.re/crisprseq/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/crisprseq/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/crisprseq/output).\n\n## Credits\n\nnf-core/crisprseq targeted is based on [CRISPR-A](https://doi.org/10.1101/2022.09.02.506351) [[Sanvicente-Garc\u00eda, et.al. (2023)](https://doi.org/10.1371/journal.pcbi.1011137)], originally written by Marta Sanvicente Garc\u00eda at [Translational Synthetic Biology](https://synbio.upf.edu/) from [Universitat Pompeu Fabra](https://www.upf.edu/home).\nIt was re-written in Nextflow DSL2 and is primarily maintained by J\u00falia Mir Pedrol ([@mirpedrol](https://github.com/mirpedrol)) at [Quantitative Biology Center (QBiC)](https://www.qbic.uni-tuebingen.de/) from [Universit\u00e4t T\u00fcbingen](https://uni-tuebingen.de/en/).\n\nnf-core/crisprseq screening was written by Laurence Kuhlburger ([@LaurenceKuhl](https://github.com/LaurenceKuhl)) at [Quantitative Biology Center (QBiC)](https://www.qbic.uni-tuebingen.de/) from [Universit\u00e4t T\u00fcbingen](https://uni-tuebingen.de/en/) and is currently primarly maintained by Matteo Bonfanti ([@matbonfanti](https://github.com/matbonfanti)) at the [National Facility for Data Handling & Analysis (nf-data)](https://humantechnopole.it/en/facilities/national-facility-for-data-handling-analysis/) from [Human Technopole, Milano](https://humantechnopole.it/en/).\n\nMain developers:\n\n- [@LaurenceKuhl](https://github.com/LaurenceKuhl)\n- [@mirpedrol](https://github.com/mirpedrol)\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n- [@alan-tracey](https://github.com/alan-tracey)\n- [@bolenala](https://github.com/bolenala)\n- [@ggabernet](https://github.com/ggabernet)\n- [@jianhong](https://github.com/jianhong)\n- [@joannakraw](https://github.com/joannakraw)\n- [@LeonHornich](https://github.com/LeonHornich)\n- [@mashehu](https://github.com/mashehu)\n- [@matbonfanti](https://github.com/matbonfanti)\n- [@medmaca](https://github.com/medmaca)\n- [@metinyazar](https://github.com/metinyazar)\n- [@msanvicente](https://github.com/msanvicente)\n- [@mschaffer-incyte](https://github.com/mschaffer-incyte)\n- [@SusiJo](https://github.com/SusiJo)\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 `#crisprseq` channel](https://nfcore.slack.com/channels/crisprseq) (you can join with [this invite](https://nf-co.re/join/slack)).\n\n## Citations\n\nIf you use nf-core/crisprseq for your analysis, please cite it using the following doi: [10.5281/zenodo.7598496](https://doi.org/10.5281/zenodo.7598496)\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\nCrispr-Analytics:\n\n> Sanvicente-Garc\u00eda M, Garc\u00eda-Valiente A, Jouide S, Jaraba-Wallace J, Bautista E, Escobosa M, et al. (2023)\n> CRISPR-Analytics (CRISPR-A): A platform for precise analytics and simulations for gene editing. PLoS Comput Biol 19(5): e1011137. https://doi.org/10.1371/journal.pcbi.1011137\n", "hasPart": [ { "@id": "main.nf" diff --git a/subworkflows/local/utils_nfcore_crisprseq_pipeline/main.nf b/subworkflows/local/utils_nfcore_crisprseq_pipeline/main.nf index 38357886..faf6da7b 100644 --- a/subworkflows/local/utils_nfcore_crisprseq_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_crisprseq_pipeline/main.nf @@ -29,7 +29,6 @@ workflow PIPELINE_INITIALISATION { take: version // boolean: Display version and exit validate_params // boolean: Boolean whether to validate parameters against the schema at runtime - monochrome_logs // boolean: Do not use coloured log outputs nextflow_cli_args // array: List of positional nextflow CLI args outdir // string: The output directory where the results will be saved input // string: Path to input samplesheet @@ -98,31 +97,30 @@ workflow PIPELINE_INITIALISATION { validateInputParameters() reads_targeted = channel.empty() - reads_screening = channel.empty() fastqc_screening = channel.empty() reference = channel.empty() protospacer = channel.empty() template = channel.empty() - versions = channel.empty() // // Create channel from input file provided through params.input // - if(params.input) { + if(input) { channel - .fromList(samplesheetToList(params.input, "${projectDir}/assets/schema_input.json")) + .fromList(samplesheetToList(input, "${projectDir}/assets/schema_input.json")) .multiMap { - meta, fastq_1, fastq_2, reference, protospacer, template -> + meta, fastq_1, fastq_2, reference_element, protospacer_element, template_element -> + def files = [] if (fastq_2) { files = [ fastq_1, fastq_2 ] } else { files = [ fastq_1 ] } - reads_targeted: [ meta.id, meta - meta.subMap('condition') + [ single_end : fastq_2 ? false : true, self_reference : reference ? false : true, template : template ? true : false ], files ] + reads_targeted: [ meta.id, meta - meta.subMap('condition') + [ single_end : fastq_2 ? false : true, self_reference : reference_element ? false : true, template : template_element ? true : false ], files ] reads_screening:[ meta + [ single_end:fastq_2?false:true ], files ] - reference: [meta - meta.subMap('condition') + [ single_end : fastq_2 ? false : true, self_reference : reference ? false : true, template : template ? true : false ], reference] - protospacer: [meta - meta.subMap('condition') + [ single_end : fastq_2 ? false : true, self_reference : reference ? false : true, template : template ? true : false ], protospacer] - template: [meta - meta.subMap('condition') + [ single_end : fastq_2 ? false : true, self_reference : reference ? false : true, template : template ? true : false ], template] + reference: [meta - meta.subMap('condition') + [ single_end : fastq_2 ? false : true, self_reference : reference_element ? false : true, template : template_element ? true : false ], reference_element] + protospacer: [meta - meta.subMap('condition') + [ single_end : fastq_2 ? false : true, self_reference : reference_element ? false : true, template : template_element ? true : false ], protospacer_element] + template: [meta - meta.subMap('condition') + [ single_end : fastq_2 ? false : true, self_reference : reference_element ? false : true, template : template_element ? true : false ], template_element] } .set { ch_input } @@ -241,7 +239,7 @@ workflow INITIALISATION_CHANNEL_CREATION_TARGETED { // input_reference .tap{ meta_reference } - .filter{ meta, sequence -> sequence instanceof String } + .filter{ _meta, sequence -> sequence instanceof String } .collectFile() { meta, reference -> [ "${meta.id}_reference.fasta", ">${meta.id}\n${reference}\n" ] // Write each reference sequence to a file } @@ -249,11 +247,11 @@ workflow INITIALISATION_CHANNEL_CREATION_TARGETED { [new_file.baseName.split("_reference")[0], new_file] // create a channel with the meta.id and the new file } .join(meta_reference - .map{ meta, reference -> + .map{ meta, _reference -> [meta.id, meta] // Join the channel by meta.id with the meta map } ) - .map{ metaid, new_file, meta -> + .map{ _metaid, new_file, meta -> [meta, new_file] // Obtain the final channel with meta map and the new file } .set{ ch_seq_reference } @@ -264,7 +262,7 @@ workflow INITIALISATION_CHANNEL_CREATION_TARGETED { // input_template .tap{ meta_template } - .filter{ meta, sequence -> sequence instanceof String } + .filter{ _meta, sequence -> sequence instanceof String } .collectFile() { meta, template -> [ "${meta.id}_template.fasta", ">${meta.id}\n${template}\n" ] // Write each template sequence to a file } @@ -272,11 +270,11 @@ workflow INITIALISATION_CHANNEL_CREATION_TARGETED { [new_file.baseName.split("_template")[0], new_file] // create a channel with the meta.id and the new file } .join(meta_template - .map{ meta, template -> + .map{ meta, _template -> [meta.id, meta] // Join the channel by meta.id with the meta map } ) - .map{ metaid, new_file, meta -> + .map{ _metaid, new_file, meta -> [meta, new_file] // Obtain the final channel with meta map and the new file } .set{ ch_seq_template } @@ -307,7 +305,7 @@ workflow INITIALISATION_CHANNEL_CREATION_TARGETED { input_reads .combine(ch_reference) .combine(ch_protospacer) - .map{ meta, fastqs, reference, protospacer -> [ meta, reference, protospacer ]} // Don't add fastqs to the channel + .map{ meta, _fastqs, reference, protospacer -> [ meta, reference, protospacer ]} // Don't add fastqs to the channel .set{ reference_protospacer } } @@ -392,13 +390,13 @@ def validateInputSamplesheet(input) { } // Check that multiple runs of the same sample contain a reference or not - def reference_ok = metas.collect{ it.self_reference }.unique().size == 1 + def reference_ok = metas.collect{ it -> it.self_reference }.unique().size == 1 if (!reference_ok) { error("Please check input samplesheet -> Multiple runs of a sample must all contain a reference or not: ${metas[0].id}") } // Check that multiple runs of the same sample contain a template or not - def template_ok = metas.collect{ it.template }.unique().size == 1 + def template_ok = metas.collect{ it -> it.template }.unique().size == 1 if (!template_ok) { error("Please check input samplesheet -> Multiple runs of a sample must all contain a template or not: ${metas[0].id}") } @@ -498,7 +496,7 @@ def methodsDescriptionText(mqc_methods_yaml) { def validateParametersScreening() { if(params.rra && params.mle_design_matrix) { - warning "mle_design_matrix will only be used for the MAGeCK MLE computations" + log.warn "mle_design_matrix will only be used for the MAGeCK MLE computations" } if(params.bowtie && params.count_table) { @@ -510,11 +508,11 @@ def validateParametersScreening() { } if(params.day0_label && params.mle_design_matrix) { - warning "MAGeCK MLE module will be run twice, once with the design matrix and once with day0-label" + log.warn "MAGeCK MLE module will be run twice, once with the design matrix and once with day0-label" } if(params.rra && params.mle_design_matrix) { - warning "mle_design_matrix will only be used for the MAGeCK MLE computations" + log.warn "mle_design_matrix will only be used for the MAGeCK MLE computations" } if(params.rra && !params.contrasts) { diff --git a/tests/main_screening.nf.test.snap b/tests/main_screening.nf.test.snap index 1b5cc603..deb858c5 100644 --- a/tests/main_screening.nf.test.snap +++ b/tests/main_screening.nf.test.snap @@ -197,6 +197,7 @@ "multiqc/multiqc_data/multiqc_sources.txt", "multiqc/multiqc_plots", "multiqc/multiqc_plots/pdf", + "multiqc/multiqc_plots/pdf/fastqc-status-check-heatmap.pdf", "multiqc/multiqc_plots/pdf/fastqc_per_base_n_content_plot.pdf", "multiqc/multiqc_plots/pdf/fastqc_per_base_sequence_quality_plot.pdf", "multiqc/multiqc_plots/pdf/fastqc_per_sequence_gc_content_plot_Counts.pdf", @@ -207,6 +208,7 @@ "multiqc/multiqc_plots/pdf/fastqc_sequence_duplication_levels_plot.pdf", "multiqc/multiqc_plots/pdf/mageck_count.pdf", "multiqc/multiqc_plots/png", + "multiqc/multiqc_plots/png/fastqc-status-check-heatmap.png", "multiqc/multiqc_plots/png/fastqc_per_base_n_content_plot.png", "multiqc/multiqc_plots/png/fastqc_per_base_sequence_quality_plot.png", "multiqc/multiqc_plots/png/fastqc_per_sequence_gc_content_plot_Counts.png", @@ -217,6 +219,7 @@ "multiqc/multiqc_plots/png/fastqc_sequence_duplication_levels_plot.png", "multiqc/multiqc_plots/png/mageck_count.png", "multiqc/multiqc_plots/svg", + "multiqc/multiqc_plots/svg/fastqc-status-check-heatmap.svg", "multiqc/multiqc_plots/svg/fastqc_per_base_n_content_plot.svg", "multiqc/multiqc_plots/svg/fastqc_per_base_sequence_quality_plot.svg", "multiqc/multiqc_plots/svg/fastqc_per_sequence_gc_content_plot_Counts.svg", diff --git a/tests/main_screening_bowtie.nf.test.snap b/tests/main_screening_bowtie.nf.test.snap index 53dfe6e2..411d28c6 100644 --- a/tests/main_screening_bowtie.nf.test.snap +++ b/tests/main_screening_bowtie.nf.test.snap @@ -3,9 +3,9 @@ "content": [ { "BOWTIE2_ALIGN": { - "bowtie2": "2.5.2", - "samtools": 1.18, - "pigz": 2.6 + "bowtie2": "2.5.4", + "pigz": 2.8, + "samtools": 1.21 }, "BOWTIE2_BUILD": { "bowtie2": "2.5.2" @@ -58,6 +58,7 @@ "multiqc/multiqc_data/multiqc_sources.txt", "multiqc/multiqc_plots", "multiqc/multiqc_plots/pdf", + "multiqc/multiqc_plots/pdf/fastqc-status-check-heatmap.pdf", "multiqc/multiqc_plots/pdf/fastqc_per_base_n_content_plot.pdf", "multiqc/multiqc_plots/pdf/fastqc_per_base_sequence_quality_plot.pdf", "multiqc/multiqc_plots/pdf/fastqc_per_sequence_gc_content_plot_Counts.pdf", @@ -68,6 +69,7 @@ "multiqc/multiqc_plots/pdf/fastqc_sequence_duplication_levels_plot.pdf", "multiqc/multiqc_plots/pdf/mageck_count.pdf", "multiqc/multiqc_plots/png", + "multiqc/multiqc_plots/png/fastqc-status-check-heatmap.png", "multiqc/multiqc_plots/png/fastqc_per_base_n_content_plot.png", "multiqc/multiqc_plots/png/fastqc_per_base_sequence_quality_plot.png", "multiqc/multiqc_plots/png/fastqc_per_sequence_gc_content_plot_Counts.png", @@ -78,6 +80,7 @@ "multiqc/multiqc_plots/png/fastqc_sequence_duplication_levels_plot.png", "multiqc/multiqc_plots/png/mageck_count.png", "multiqc/multiqc_plots/svg", + "multiqc/multiqc_plots/svg/fastqc-status-check-heatmap.svg", "multiqc/multiqc_plots/svg/fastqc_per_base_n_content_plot.svg", "multiqc/multiqc_plots/svg/fastqc_per_base_sequence_quality_plot.svg", "multiqc/multiqc_plots/svg/fastqc_per_sequence_gc_content_plot_Counts.svg", @@ -98,13 +101,13 @@ "preprocessing/fastqc/SRR8983580_fastqc.zip" ], [ - "SRR8983579.bam:md5,358227eb161e275f396038ff32447a0f", + "SRR8983579.bam:md5,332e7c56e3838b937803c9648b4aed37", "SRR8983579.bowtie2.log:md5,9c1b9cdad446dbdfb0a4947e80cd911e", - "SRR8983580.bam:md5,67538c7ca40b6cebc94a1ee613b49ce0", + "SRR8983580.bam:md5,9e467872b37ea08d4de47ad44455d569", "SRR8983580.bowtie2.log:md5,9c1b9cdad446dbdfb0a4947e80cd911e", - "count_table.count.txt:md5,2347ea1c388ada4afb7cd59ccdf0cd3f", - "count_table.count_normalized.txt:md5,2347ea1c388ada4afb7cd59ccdf0cd3f", - "count_table.countsummary.txt:md5,b637d9fc48c388fde1096c32d16e1ad5", + "count_table.count.txt:md5,f2c140bb5947ea0e6f2afc421322de6e", + "count_table.count_normalized.txt:md5,f2c140bb5947ea0e6f2afc421322de6e", + "count_table.countsummary.txt:md5,3d96214d6ffa3e2de82d0d1a271ccaea", "fastqc-status-check-heatmap.txt:md5,50129a4cd9c87d79a3841ac119f5a187", "fastqc_per_base_n_content_plot.txt:md5,272dfea4dafcd2a7b122c27af4ed1aa3", "fastqc_per_base_sequence_quality_plot.txt:md5,2332a2b6386d9a877c742af251bd51f1", @@ -116,7 +119,7 @@ "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", "multiqc_fastqc.txt:md5,6e20912a1204abf386bccffed398d771", "multiqc_general_stats.txt:md5,70b343b1d228d9306030913daad9a6fe", - "multiqc_mageck_count.txt:md5,8a7ed8eb3b594863d10bf85ff1937308" + "multiqc_mageck_count.txt:md5,588b4739c75e0e1fffa7ec4163766dcf" ] ], "meta": { diff --git a/tests/main_screening_paired.nf.test.snap b/tests/main_screening_paired.nf.test.snap index 8ffd6f9d..6166dafc 100644 --- a/tests/main_screening_paired.nf.test.snap +++ b/tests/main_screening_paired.nf.test.snap @@ -45,6 +45,7 @@ "multiqc/multiqc_data/multiqc_sources.txt", "multiqc/multiqc_plots", "multiqc/multiqc_plots/pdf", + "multiqc/multiqc_plots/pdf/fastqc-status-check-heatmap.pdf", "multiqc/multiqc_plots/pdf/fastqc_adapter_content_plot.pdf", "multiqc/multiqc_plots/pdf/fastqc_overrepresented_sequences_plot.pdf", "multiqc/multiqc_plots/pdf/fastqc_per_base_n_content_plot.pdf", @@ -58,6 +59,7 @@ "multiqc/multiqc_plots/pdf/fastqc_top_overrepresented_sequences_table.pdf", "multiqc/multiqc_plots/pdf/mageck_count.pdf", "multiqc/multiqc_plots/png", + "multiqc/multiqc_plots/png/fastqc-status-check-heatmap.png", "multiqc/multiqc_plots/png/fastqc_adapter_content_plot.png", "multiqc/multiqc_plots/png/fastqc_overrepresented_sequences_plot.png", "multiqc/multiqc_plots/png/fastqc_per_base_n_content_plot.png", @@ -71,6 +73,7 @@ "multiqc/multiqc_plots/png/fastqc_top_overrepresented_sequences_table.png", "multiqc/multiqc_plots/png/mageck_count.png", "multiqc/multiqc_plots/svg", + "multiqc/multiqc_plots/svg/fastqc-status-check-heatmap.svg", "multiqc/multiqc_plots/svg/fastqc_adapter_content_plot.svg", "multiqc/multiqc_plots/svg/fastqc_overrepresented_sequences_plot.svg", "multiqc/multiqc_plots/svg/fastqc_per_base_n_content_plot.svg", diff --git a/tests/main_targeted.nf.test.snap b/tests/main_targeted.nf.test.snap index 4d62ea9c..f172c3a2 100644 --- a/tests/main_targeted.nf.test.snap +++ b/tests/main_targeted.nf.test.snap @@ -37,7 +37,7 @@ "cowplot": "1.1.1" }, "CUTADAPT": { - "cutadapt": 4.6 + "cutadapt": 5.2 }, "FASTQC": { "fastqc": "0.12.1" @@ -46,22 +46,22 @@ "fastqcr": "0.1.2" }, "MINIMAP2_ALIGN_ORIGINAL": { - "minimap2": "2.28-r1209" + "minimap2": "2.29-r1283" }, "MINIMAP2_ALIGN_TEMPLATE": { - "minimap2": "2.28-r1209" + "minimap2": "2.29-r1283" }, "ORIENT_REFERENCE": { "Rscript": null }, "PEAR": { - "pear": "0.9.6)" + "pear": "0.9.6" }, "PREPROCESSING_SUMMARY": { "biopython": "1.78" }, "SAMTOOLS_INDEX": { - "samtools": "1.19.2" + "samtools": "1.22.1" }, "SEQTK_SEQ_MASK": { "seqtk": "1.4-r122" @@ -145,6 +145,7 @@ "multiqc/multiqc_data/multiqc_sources.txt", "multiqc/multiqc_plots", "multiqc/multiqc_plots/pdf", + "multiqc/multiqc_plots/pdf/fastqc-status-check-heatmap.pdf", "multiqc/multiqc_plots/pdf/cutadapt_filtered_reads_plot-cnt.pdf", "multiqc/multiqc_plots/pdf/cutadapt_filtered_reads_plot-pct.pdf", "multiqc/multiqc_plots/pdf/cutadapt_trimmed_sequences_plot_5_Counts.pdf", @@ -167,6 +168,7 @@ "multiqc/multiqc_plots/pdf/indelqc_bargraph-pct.pdf", "multiqc/multiqc_plots/pdf/read_processing.pdf", "multiqc/multiqc_plots/png", + "multiqc/multiqc_plots/png/fastqc-status-check-heatmap.png", "multiqc/multiqc_plots/png/cutadapt_filtered_reads_plot-cnt.png", "multiqc/multiqc_plots/png/cutadapt_filtered_reads_plot-pct.png", "multiqc/multiqc_plots/png/cutadapt_trimmed_sequences_plot_5_Counts.png", @@ -189,6 +191,7 @@ "multiqc/multiqc_plots/png/indelqc_bargraph-pct.png", "multiqc/multiqc_plots/png/read_processing.png", "multiqc/multiqc_plots/svg", + "multiqc/multiqc_plots/svg/fastqc-status-check-heatmap.svg", "multiqc/multiqc_plots/svg/cutadapt_filtered_reads_plot-cnt.svg", "multiqc/multiqc_plots/svg/cutadapt_filtered_reads_plot-pct.svg", "multiqc/multiqc_plots/svg/cutadapt_trimmed_sequences_plot_5_Counts.svg", @@ -278,33 +281,33 @@ "summary/alignment/hCas9-TRAC-a_alignment_summary.csv" ], [ - "chr6_QC-indels.csv:md5,45317006d46487cbb184bca8777b6d26", + "chr6_QC-indels.csv:md5,17cccee4edde6e05dd10390a20daae57", "chr6_cutSite.json:md5,490e5d880373e7866f349dcb03c82093", "chr6_edits.csv:md5,99f3c1ca3c780d8c90dd9265392840ac", - "chr6_indels.csv:md5,300baf3c0b6820afc233d824bd67a372", + "chr6_indels.csv:md5,4b368b0592225b3425ac118959a80647", "chr6_reads-summary.csv:md5,4cedd30e39102d379857258cacca93f9", "chr6_subs-perc.csv:md5,aa92a548ca7cef186ef38475c777d684", - "hCas9-AAVS1-a_QC-indels.csv:md5,2194350500b15b6576a9b18ac68facb9", + "hCas9-AAVS1-a_QC-indels.csv:md5,b73b9ccd40b24b949a3248592692e30b", "hCas9-AAVS1-a_cutSite.json:md5,70ab020b23cff216ad6084c9032e3ecd", "hCas9-AAVS1-a_edits.csv:md5,9aca81a5b92576c3c5f1d6a2495727bf", - "hCas9-AAVS1-a_indels.csv:md5,0a0645f402ee5b794ee82b79422d6f3b", + "hCas9-AAVS1-a_indels.csv:md5,02df18be59539683532dd95aea66e64d", "hCas9-AAVS1-a_reads-summary.csv:md5,83012b71fcfad618cb4dbf61194b51a2", "hCas9-AAVS1-a_subs-perc.csv:md5,396cf65626cd9887fbedae1d04db85b1", - "hCas9-TRAC-a_QC-indels.csv:md5,a0af76eb5c4490799233f43036f88db3", + "hCas9-TRAC-a_QC-indels.csv:md5,f49ae9062677fbc9859dc096b66944ca", "hCas9-TRAC-a_cutSite.json:md5,c4bcd013e1c6a4c2e3090da33d52faa2", "hCas9-TRAC-a_edits.csv:md5,66790896e2e6c4680405088e255fdd51", - "hCas9-TRAC-a_indels.csv:md5,e01cda76310420e1795df33f9bf0b565", + "hCas9-TRAC-a_indels.csv:md5,5ab43c40d2abb427dc42f2115edbaab1", "hCas9-TRAC-a_reads-summary.csv:md5,347427be68a7fdb7d18d332b39428e5a", "hCas9-TRAC-a_subs-perc.csv:md5,0b56371851c828e7c18d32cf5ffec2b9", "chr6_edits_classified.csv:md5,5de83c21e57d2641ed51cd6e0f807976", "hCas9-AAVS1-a_edits_classified.csv:md5,5765c9c42065820f947bb571458711d0", "hCas9-TRAC-a_edits_classified.csv:md5,07aaadbcb6210bdea8ccd8b6eff988de", - "chr6.bam:md5,17f99868d17fc4195b5b25593f6174a4", + "chr6.bam:md5,5b4520b393ff3f2ddf5a9a50b35840db", "chr6.bam.bai:md5,1563d893aada5f967765663c8e3d5f9e", - "hCas9-AAVS1-a.bam:md5,f11622ae70beb40010b22a083f1ecc76", - "hCas9-AAVS1-a.bam.bai:md5,1572a5f78e6217f8461584e6d6495a01", - "hCas9-TRAC-a.bam:md5,197702b78ee7105b1c8c0adcdcdac39d", - "hCas9-TRAC-a.bam.bai:md5,c876ef982797ea22e3b09f6b6cf4b55c", + "hCas9-AAVS1-a.bam:md5,00d6baec15ad53098dd9bdf0a0436d3d", + "hCas9-AAVS1-a.bam.bai:md5,c2aa73151f7b643617ee5cb88fdc7ed7", + "hCas9-TRAC-a.bam:md5,264c12d3429ae79a52d7d7566581285e", + "hCas9-TRAC-a.bam.bai:md5,149550dc15c203ce43efad4dc0f9d472", "cutadapt_filtered_reads_plot.txt:md5,5b6e525c9c4db6299945fdb932451063", "cutadapt_trimmed_sequences_plot_5_Counts.txt:md5,0c6bab1733f566ee643b7b7325ef6ab6", "cutadapt_trimmed_sequences_plot_5_Obs_Exp.txt:md5,432bea989f8f54719dd60a5b61e5c5ee", @@ -320,22 +323,22 @@ "fastqc_sequence_duplication_levels_plot.txt:md5,e22607f4ca3b8f479562f3275394f204", "fastqc_sequence_length_distribution_plot.txt:md5,363a86561a86259d91149b463294bdb1", "multiqc_citations.txt:md5,78cc0f4521878c6c4beaf54ad968e411", - "multiqc_cutadapt.txt:md5,6bf68b90cb2b3985add256ef7830ded5", + "multiqc_cutadapt.txt:md5,223473c4f650520601b37e91be220556", "multiqc_edition_bargraph.txt:md5,eaa80086028ee45cc2f6a8f9b9bcd15d", "multiqc_fastqc.txt:md5,47cc5c1d22a95caa05f70a1be4a3803c", "multiqc_general_stats.txt:md5,84883ee128ab99f8082f67310ec15bfb", - "multiqc_indelqc_bargraph.txt:md5,54edd1ae6dda14b6e1fbdc7b951b21c0", + "multiqc_indelqc_bargraph.txt:md5,48669452748768b0a31197e55fec9d91", "multiqc_read_processing.txt:md5,630d8f7de5b4ef4e40e781ba4105c8ba", "chr6_delAlleles_plot.png:md5,8e543c13d43a0904164eeb7c4fb21719", - "chr6_subs-perc_plot.png:md5,96e0c2ba9fc9c446e5e5bd8542a0e3ad", + "chr6_subs-perc_plot.png:md5,bcbc703229a401d50f12505f2b24329a", "chr6_subs-perc_plot_LOGO.png:md5,f44a99bf9c2ed1cd5627e40837c63c42", "chr6_top-alleles_LOGO.png:md5,0b17fa1f3d9d412f90f683b98fb71658", "hCas9-AAVS1-a_delAlleles_plot.png:md5,3b5264e1241bbcfa90d971594b13b6be", - "hCas9-AAVS1-a_subs-perc_plot.png:md5,23cc6d60153dfcc0f7d4ea5fcd791522", + "hCas9-AAVS1-a_subs-perc_plot.png:md5,4e3e35d084b45ee067c1867eecd25add", "hCas9-AAVS1-a_subs-perc_plot_LOGO.png:md5,684ec7ff1093e2b47eff4449e6f5a348", "hCas9-AAVS1-a_top-alleles_LOGO.png:md5,0b877f01f248970ba096f274c6ab6175", "hCas9-TRAC-a_delAlleles_plot.png:md5,4ec69f6207d86aae37321f235dcf3217", - "hCas9-TRAC-a_subs-perc_plot.png:md5,024459b22a149cbc34237365d1139c18", + "hCas9-TRAC-a_subs-perc_plot.png:md5,81147b86321b327e4cb6b68961c4d338", "hCas9-TRAC-a_subs-perc_plot_LOGO.png:md5,112248eb908a46644b94e0581b89c497", "hCas9-TRAC-a_top-alleles_LOGO.png:md5,1a747ebe6021f6e91f1b9130ea831cdd", "chr6.trim.fastq.gz:md5,76dbcb79bd3e2e18c7efa44d182fc9a8", @@ -353,7 +356,7 @@ "hCas9-AAVS1-a.seqtk-seq.fastq.gz:md5,66df17686a9700f51827e640ecfc8711", "hCas9-TRAC-a.seqtk-seq.fastq.gz:md5,af1cfc40cc4bd9ffad3a151ad1b57162", "chr6_NewReference.fasta:md5,37a5dcbff4e0e305cd0ef723c33623e6", - "chr6_template-align.bam:md5,c89ced9af15cd82ec2f2f03fd918ab45", + "chr6_template-align.bam:md5,042b65da98c836e1667873f828d5868d", "chr6_alignment_summary.csv:md5,0aa30af2bfe39e9d980948afc6d14785", "hCas9-AAVS1-a_alignment_summary.csv:md5,48679a137dd512ff180a8b4723a28b1b", "hCas9-TRAC-a_alignment_summary.csv:md5,59c695e2906b6540cb8d377ec6467027" diff --git a/tests/main_targeted_umis.nf.test.snap b/tests/main_targeted_umis.nf.test.snap index b746c71e..1e68b3ff 100644 --- a/tests/main_targeted_umis.nf.test.snap +++ b/tests/main_targeted_umis.nf.test.snap @@ -315,16 +315,16 @@ [ "ERR9897751_ubs.txt:md5,c0792b5871504895871247dfb2fbbc6a", "ERR9897765_ubs.txt:md5,0dfd49da10450b01f3e64f790d27934f", - "ERR9897751_Emptyindels.csv:md5,1a198d29d5f4bd091455694d36660a4c", - "ERR9897751_QC-indels.csv:md5,b22928d06de670e37f4bddbe0f05fdbc", + "ERR9897751_Emptyindels.csv:md5,180e586a687cc688f0427e6d89df8036", + "ERR9897751_QC-indels.csv:md5,04bcf07e5a0b56d1dd840f2ab4bf0c73", "ERR9897751_cutSite.json:md5,d11b8828db601383202aba74a0157c9c", "ERR9897751_edits.csv:md5,9f982c25851f1c5a736e2f2b5788e2ed", "ERR9897751_reads-summary.csv:md5,83e5275979c5fb16bf15a2fb882b4af4", "ERR9897751_subs-perc.csv:md5,2f01037ce78a6a7c612f4a7c95aac2b9", - "ERR9897765_QC-indels.csv:md5,e3161b2f3d2f94bdfe240052b39093a0", + "ERR9897765_QC-indels.csv:md5,594db05e977c1776644f340ed1c47812", "ERR9897765_cutSite.json:md5,8d860a8f6f4a05f725501c81c3333cec", "ERR9897765_edits.csv:md5,02743f8abd73824b8560f553ffd53d5b", - "ERR9897765_indels.csv:md5,571b1386f2f4f45252a12c49b3c90417", + "ERR9897765_indels.csv:md5,e4ec1287385ab0f7014e575d50c6c226", "ERR9897765_reads-summary.csv:md5,f01ee943ec98548088bd2e905a2f1c3a", "ERR9897765_subs-perc.csv:md5,2f01037ce78a6a7c612f4a7c95aac2b9", "ERR9897751_edits_classified.csv:md5,ca83f09438c7a02f7dd05178ef5bf661", @@ -375,7 +375,7 @@ "multiqc_edition_bargraph.txt:md5,2288de54633de14555a5fcedcb0d32a2", "multiqc_fastqc.txt:md5,c3623f42a5982a65e88aed6dab0dcaba", "multiqc_general_stats.txt:md5,095dffb793835d33e4bb980ec8a48c29", - "multiqc_indelqc_bargraph.txt:md5,fc54ca221025ee70f96ba3c072b94eb0", + "multiqc_indelqc_bargraph.txt:md5,17ab8d47786af1438bff70d37a10c811", "multiqc_read_processing.txt:md5,ad2694c5b06ba45e0a55a62688849348", "ERR9897751_delAlleles_plot.png:md5,d41d8cd98f00b204e9800998ecf8427e", "ERR9897751_subs-perc_plot.png:md5,d41d8cd98f00b204e9800998ecf8427e", diff --git a/workflows/crisprseq_screening.nf b/workflows/crisprseq_screening.nf index 97f5a46e..cc388132 100644 --- a/workflows/crisprseq_screening.nf +++ b/workflows/crisprseq_screening.nf @@ -88,8 +88,7 @@ workflow CRISPRSEQ_SCREENING { FASTQC ( ch_input ) - ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip.collect{it[1]}) - ch_versions = ch_versions.mix(FASTQC.out.versions.first()) + ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip.collect{it -> it[1]}) //set adapter seq to null to make it compatible with crispr targeted ch_cutadapt = ch_input.combine(channel.value([[]])) @@ -103,8 +102,7 @@ workflow CRISPRSEQ_SCREENING { [meta, fastq, proto] }.set { ch_cutadapt } - ch_multiqc_files = ch_multiqc_files.mix(CUTADAPT_FIVE_PRIME.out.log.collect{it[1]}) - ch_versions = ch_versions.mix(CUTADAPT_FIVE_PRIME.out.versions) + ch_multiqc_files = ch_multiqc_files.mix(CUTADAPT_FIVE_PRIME.out.log.collect{it -> it[1]}) } if(params.three_prime_adapter) { @@ -112,8 +110,7 @@ workflow CRISPRSEQ_SCREENING { ch_cutadapt ) ch_cutadapt = CUTADAPT_THREE_PRIME.out.reads.combine(channel.value([[]])) - ch_multiqc_files = ch_multiqc_files.mix(CUTADAPT_THREE_PRIME.out.log.collect{it[1]}) - ch_versions = ch_versions.mix(CUTADAPT_THREE_PRIME.out.versions) + ch_multiqc_files = ch_multiqc_files.mix(CUTADAPT_THREE_PRIME.out.log.collect{it -> it[1]}) } @@ -140,7 +137,6 @@ workflow CRISPRSEQ_SCREENING { BOWTIE2_BUILD( ch_fasta ) - ch_versions = ch_versions.mix(BOWTIE2_BUILD.out.versions) BOWTIE2_BUILD.out.index .collect() @@ -153,7 +149,6 @@ workflow CRISPRSEQ_SCREENING { false, false ) - ch_versions = ch_versions.mix(BOWTIE2_ALIGN.out.versions) BOWTIE2_ALIGN.out.bam.map{ meta, bam -> [meta, [bam]] @@ -193,7 +188,7 @@ workflow CRISPRSEQ_SCREENING { ) ch_versions = ch_versions.mix(MAGECK_COUNT.out.versions.first()) - ch_multiqc_files = ch_multiqc_files.mix(MAGECK_COUNT.out.summary.collect{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(MAGECK_COUNT.out.summary.collect{it -> it[1]}) MAGECK_COUNT.out.count.map { it -> it[1] @@ -239,7 +234,7 @@ workflow CRISPRSEQ_SCREENING { ch_samplesheet .map { meta, _fastq -> [meta.condition, meta] } .groupTuple(by: 0) // Group by condition - .map { condition, metas -> [condition, metas.collect { it.id }]} + .map { condition, metas -> [condition, metas.collect { it -> it.id }]} .set { ch_samplesheet_conditions } // tuples (condition, [sample_id1, sample_id2, ...]) // Map each contrast in the contrasts file to a the list of treatment / reference conditions to compare @@ -258,8 +253,8 @@ workflow CRISPRSEQ_SCREENING { ch_contrasts .combine(ch_samplesheet_conditions.collect(flat: false).map{ it -> [it] }) // combine each contrast element with a single-element list containing all (condition, [sample_ids]) tuples .map { contrast_meta, all_conditions -> - def treatment_samples = all_conditions.find { it[0] in contrast_meta.treatment } // Find samples for each condition - def reference_samples = all_conditions.find { it[0] in contrast_meta.reference } + def treatment_samples = all_conditions.find { it -> it[0] in contrast_meta.treatment } // Find samples for each condition + def reference_samples = all_conditions.find { it -> it[0] in contrast_meta.reference } return [ id: contrast_meta.id, treatment: treatment_samples[1].join(","), reference: reference_samples[1].join(",") ] } // emits maps: [id: "...", treatment: "sample1,sample2", reference: "sample3,sample4"] .combine(ch_counts) @@ -356,7 +351,7 @@ workflow CRISPRSEQ_SCREENING { //if the user specified a contrast file if(params.contrasts && params.mle) { - MATRICESCREATION(ch_contrasts_counts.map { it[0] }) + MATRICESCREATION(ch_contrasts_counts.map { it -> it[0] }) ch_mle = MATRICESCREATION.out.design_matrix.combine(ch_counts) MAGECK_MLE (ch_mle, INITIALISATION_CHANNEL_CREATION_SCREENING.out.mle_control_sgrna) @@ -540,7 +535,7 @@ workflow CRISPRSEQ_SCREENING { // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -569,24 +564,31 @@ workflow CRISPRSEQ_SCREENING { // // MODULE: MultiQC // - ch_multiqc_config = channel.fromPath("$projectDir/assets/multiqc_config.yml", checkIfExists: true) - ch_multiqc_custom_config = params.multiqc_config ? channel.fromPath(params.multiqc_config, checkIfExists: true) : channel.empty() - ch_multiqc_logo = params.multiqc_logo ? channel.fromPath(params.multiqc_logo, checkIfExists: true) : channel.empty() - 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_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)) - - MULTIQC ( - ch_multiqc_files.collect(), - ch_multiqc_config.toList(), - ch_multiqc_custom_config.toList(), - ch_multiqc_logo.toList(), - [], - [] + ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) + + def ch_summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") + def ch_workflow_summary = channel.value(paramsSummaryMultiqc(ch_summary_params)) + ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) + + def 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) + def ch_methods_description = channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) + ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: true)) + + MULTIQC( + ch_multiqc_files.flatten().collect().map { files -> + [ + [id: 'crisprseq'], + files, + params.multiqc_config + ? file(params.multiqc_config, checkIfExists: true) + : file("${projectDir}/assets/multiqc_config.yml", checkIfExists: true), + params.multiqc_logo ? file(params.multiqc_logo, checkIfExists: true) : [], + [], + [], + ] + } ) emit: diff --git a/workflows/crisprseq_targeted.nf b/workflows/crisprseq_targeted.nf index fabaac07..94deb3c7 100644 --- a/workflows/crisprseq_targeted.nf +++ b/workflows/crisprseq_targeted.nf @@ -34,7 +34,6 @@ include { MINIMAP2_ALIGN as MINIMAP2_ALIGN_ORIGINAL } from '../modules/nf-core/m include { MINIMAP2_ALIGN as MINIMAP2_ALIGN_UMI_1 } from '../modules/nf-core/minimap2/align/main' include { MINIMAP2_ALIGN as MINIMAP2_ALIGN_UMI_2 } from '../modules/nf-core/minimap2/align/main' include { MINIMAP2_ALIGN as MINIMAP2_ALIGN_TEMPLATE } from '../modules/nf-core/minimap2/align/main' -include { MINIMAP2_INDEX } from '../modules/nf-core/minimap2/index/main' include { MEDAKA } from '../modules/nf-core/medaka/main' include { CUTADAPT } from '../modules/nf-core/cutadapt/main' include { SAMTOOLS_INDEX } from '../modules/nf-core/samtools/index/main' @@ -53,35 +52,28 @@ include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_cris */ def umi_to_sequence(cluster1) { - String line1 String sequences = "" - String sequence1 - String id1 - cluster1.withReader { - while ( line1=it.readLine() ) { - if (line1.startsWith(">")) { - sequence1 = (line1 =~ /;seq=(.*$)/)[0][1] - id1 = (line1 =~ /(>.*?);/)[0][1] - sequences = sequences + id1 + "\n" + sequence1 + "\n" - } + cluster1.eachLine { line1 -> + if (line1.startsWith(">")) { + def sequence1 = (line1 =~ /;seq=(.*$)/)[0][1] + def id1 = (line1 =~ /(>.*?);/)[0][1] + sequences = sequences + id1 + "\n" + sequence1 + "\n" } } return sequences } def umi_to_sequence_centroid(cluster) { - String line - String sequence - String id - cluster.withReader { - while ( line=it.readLine() ) { - if (line.startsWith(">")) { - sequence = (line =~ /;seq=(.*$)/)[0][1] - id = (line =~ /(>.*?);/)[0][1] - return id.replace(">", ">centroid_") + "\n" + sequence - } + String result = null + String id = null + cluster.eachLine { line1 -> + if (result == null && line1.startsWith(">")) { + def sequence = (line1 =~ /;seq=(.*$)/)[0][1] + id = (line1 =~ /(>.*?);/)[0][1] + result = id.replace(">", ">centroid_") + "\n" + sequence } } + return [result, id] } @@ -140,7 +132,6 @@ workflow CRISPRSEQ_TARGETED { return [ meta, fastq ] } .set { ch_cat_fastq } - ch_versions = ch_versions.mix(CAT_FASTQ.out.versions) // // MODULE: Merge paired-end reads @@ -156,13 +147,12 @@ workflow CRISPRSEQ_TARGETED { } .mix( ch_cat_fastq.single ) .set { ch_pear_fastq } - ch_versions = ch_versions.mix(PEAR.out.versions) // Change reference, protospacer and template channels to have the same meta information as the reads ch_pear_fastq .map {meta, reads -> // save single_end value and remove the key from the meta map - single_end = meta.single_end + def single_end = meta.single_end return [ meta - meta.subMap('single_end'), reads, single_end ] } .tap { no_single_end } @@ -173,7 +163,7 @@ workflow CRISPRSEQ_TARGETED { return [ meta - meta.subMap('single_end'), reference ] } ) - .map {meta, reads, single_end, reference -> + .map {meta, _reads, single_end, reference -> // Add the correct single_end value to the reference meta map. return [ meta + ["single_end": single_end], reference ] } @@ -185,18 +175,18 @@ workflow CRISPRSEQ_TARGETED { return [ meta - meta.subMap('single_end'), template ] } ) - .map {meta, reads, single_end, template -> + .map {meta, _reads, single_end, template -> return [ meta + ["single_end": single_end], template ] } .set{ ch_template } no_single_end .join( INITIALISATION_CHANNEL_CREATION_TARGETED.out.reference_protospacer - .map {meta, reference, protospacer -> + .map {meta, _reference, protospacer -> return [ meta - meta.subMap('single_end'), protospacer ] } ) - .map {meta, reads, single_end, protospacer -> + .map {meta, _reads, single_end, protospacer -> return [ meta + ["single_end": single_end], protospacer ] } .set{ ch_protospacer } @@ -208,8 +198,7 @@ workflow CRISPRSEQ_TARGETED { FASTQC ( ch_pear_fastq ) - ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip.collect{it[1]}) - ch_versions = ch_versions.mix(FASTQC.out.versions.first()) + ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip.collect{it -> it[1]}) ch_trimmed = channel.empty() @@ -240,8 +229,7 @@ workflow CRISPRSEQ_TARGETED { CUTADAPT ( ch_adapter_seqs.adapters ) - ch_multiqc_files = ch_multiqc_files.mix(CUTADAPT.out.log.collect{it[1]}) - ch_versions = ch_versions.mix(CUTADAPT.out.versions) + ch_multiqc_files = ch_multiqc_files.mix(CUTADAPT.out.log.collect{it -> it[1]}) ch_adapter_seqs.no_adapters .mix(CUTADAPT.out.reads) @@ -262,7 +250,6 @@ workflow CRISPRSEQ_TARGETED { SEQTK_SEQ_MASK ( ch_trimmed ) - ch_versions = ch_versions.mix(SEQTK_SEQ_MASK.out.versions) if (params.overrepresented) { ch_cat_fastq.paired @@ -275,7 +262,7 @@ workflow CRISPRSEQ_TARGETED { .join( SEQTK_SEQ_MASK.out.fastx .map { meta, masked -> - single_end = meta.single_end + def single_end = meta.single_end return [ meta - meta.subMap('single_end'), masked, single_end] } ) @@ -303,7 +290,7 @@ workflow CRISPRSEQ_TARGETED { .join( SEQTK_SEQ_MASK.out.fastx .map { meta, masked -> - single_end = meta.single_end + def single_end = meta.single_end return [ meta - meta.subMap('single_end'), masked, single_end] } ) @@ -341,7 +328,6 @@ workflow CRISPRSEQ_TARGETED { VSEARCH_CLUSTER ( EXTRACT_UMIS.out.fasta ) - ch_versions = ch_versions.mix(VSEARCH_CLUSTER.out.versions.first()) // Obtain a file with UBS (UBI bin size) and UMI ID VSEARCH_CLUSTER.out.clusters @@ -367,10 +353,10 @@ workflow CRISPRSEQ_TARGETED { ch_umi_bysize.single .tap{ meta_channel } .map{ meta, cluster -> - fasta_line = umi_to_sequence(cluster) + def fasta_line = umi_to_sequence(cluster) [meta, cluster.baseName, fasta_line] } - .collectFile() { meta, name, fasta -> + .collectFile() { _meta, name, fasta -> [ "${name}_consensus.fasta", fasta ] } .map{ new_file -> @@ -380,7 +366,7 @@ workflow CRISPRSEQ_TARGETED { .map { meta, original_file -> ["${original_file.baseName}_consensus", meta] }) - .map{ file_name, new_file, meta -> + .map{ _file_name, new_file, meta -> [meta, new_file] } .set{ ch_single_clusters_consensus } @@ -392,51 +378,53 @@ workflow CRISPRSEQ_TARGETED { ch_umi_bysize.cluster, channel.value("--sortbysize") ) - ch_versions = ch_versions.mix(VSEARCH_SORT.out.versions.first()) // Get the correspondent fasta sequencences from top cluster sequences // Replaces the sequence name adding the "centroid_" prefix to avoid having two sequences with the same name in following steps VSEARCH_SORT.out.fasta // [[id:sample_id, ...], sample_top.fasta] .tap{ meta_channel_2 } // [[id:sample_id, ...], sample_top.fasta] .map{ meta, fasta -> - fasta_line = umi_to_sequence_centroid(fasta) - [meta, fasta.baseName, fasta_line] // [[id:sample_id, ...], sample_top, >centroid_...] + def result = umi_to_sequence_centroid(fasta) + def fasta_line = result[0] + def id = result[1] + [meta, fasta.baseName, id, fasta_line] // [[id:sample_id, ...], sample_top, centroid_id, >centroid_...] } - .collectFile(cache:true,sort:true) { meta, name, fasta -> - [ "${name}.fasta", fasta ] // >centroid_... -> sample_top.fasta + .collectFile(cache:true,sort:true) { _meta, name, id, fasta -> + [ "${name}_${id}.fasta", fasta ] // >centroid_... -> sample_top_centroid_id.fasta } .map{ new_file -> - [new_file.baseName, new_file] // [sample, sample_top.fasta] + [new_file.baseName.tokenize('.')[0], new_file] // [sample, sample_top_centroid_id.fasta] } .join(meta_channel_2 .map { meta, original_file -> - ["${original_file.baseName}", meta] // [sample, [id:sample_id, ...]] + ["${original_file.baseName.tokenize('.')[0]}", meta] // [sample, [id:sample_id, ...]] }) // [sample, sample_top.fasta, [id:sample_id, ...]] - .map{ file_name, new_file, meta -> - [meta + [cluster_id: file_name[0..-5]], new_file] // Add cluster ID to meta map // [[id:sample_id, ..., cluster_id:sample], sample_top.fasta] + .map{ _sample_name, new_file, meta -> + [meta + [cluster_id: new_file.baseName.tokenize('>')[1].tokenize('.')[0]], new_file] // Add cluster ID to meta map // [[id:sample_id, ..., cluster_id:id], sample_top.fasta] } - .set{ ch_top_clusters_sequence } // [[id:sample_id, ..., cluster_id:sample], sample_top.fasta] + .set{ ch_top_clusters_sequence } // [[id:sample_id, ..., cluster_id:id], sample_top.fasta] // Get the correspondent fasta sequencences from UMI clusters ch_umi_bysize.cluster // [[id:sample_id, ...], sample] .tap{ meta_channel_3 } // [[id:sample_id, ...], sample] .map{ meta, cluster -> - fasta_line = umi_to_sequence(cluster) + def fasta_line = umi_to_sequence(cluster) [meta, cluster.baseName, fasta_line] // [[id:sample_id, ...], sample, >...] } - .collectFile(cache:true,sort:true) { meta, name, fasta -> + .collectFile(cache:true,sort:true) { _meta, name, fasta -> [ "${name}_sequences.fasta", fasta ] // >... -> sample_sequences.fasta } .map{ new_file -> - [new_file.baseName[0..-11], new_file] // [sample, sample_sequences.fasta] + [new_file.baseName.tokenize('.')[0], new_file] // [sample, sample_sequences.fasta] } .join(meta_channel_3 .map { meta, original_file -> - ["${original_file.baseName}", meta] // [sample, [id:sample_id, ...]] + ["${original_file.baseName.tokenize('.')[0]}", meta] // [sample, [id:sample_id, ...]] }) // [sample, sample_sequences.fasta, [id:sample_id, ...]] - .map{ file_name, new_file, meta -> - [meta + [cluster_id: file_name], new_file] // Add cluster ID to meta map // [[id:sample_id, ..., cluster_id:sample], sample_sequences.fasta] + .view() + .map{ _sample_name, new_file, meta -> + [meta + [cluster_id: new_file.baseName.tokenize('>')[1].tokenize('.')[1]], new_file] // Add cluster ID to meta map // [[id:sample_id, ..., cluster_id:id], sample_sequences.fasta] } .set{ ch_clusters_sequence } @@ -448,19 +436,21 @@ workflow CRISPRSEQ_TARGETED { // MODULE: Mapping with minimap2 - cycle 1 // // Map each cluster against the top read (most abundant UMI) in the cluster + ch_clusters_sequence.view() + ch_top_clusters_sequence.view() MINIMAP2_ALIGN_UMI_1 ( ch_clusters_sequence .join(ch_top_clusters_sequence), false, //output in paf format + [], false, false ) - ch_versions = ch_versions.mix(MINIMAP2_ALIGN_UMI_1.out.versions.first()) // Only continue with clusters that have aligned sequences MINIMAP2_ALIGN_UMI_1.out.paf - .filter{ it[1].countLines() > 0 } + .filter{ it -> it[1].countLines() > 0 } .set{ ch_minimap_1 } // @@ -481,14 +471,14 @@ workflow CRISPRSEQ_TARGETED { ch_clusters_sequence .join(RACON_1.out.improved_assembly), false, //output in paf format + [], false, false ) - ch_versions = ch_versions.mix(MINIMAP2_ALIGN_UMI_2.out.versions.first()) // Only continue with clusters that have aligned sequences MINIMAP2_ALIGN_UMI_2.out.paf - .filter{ it[1].countLines() > 0 } + .filter{ it -> it[1].countLines() > 0 } .set{ ch_minimap_2 } // @@ -516,7 +506,7 @@ workflow CRISPRSEQ_TARGETED { MEDAKA.out.assembly .tap{ meta_channel_4 } .map{ meta, file -> - file_content = file.getText() + def file_content = file.getText() [meta, file_content] // [[id:sample_id, ...], consensus_content] } .collectFile() { meta, file -> @@ -526,11 +516,11 @@ workflow CRISPRSEQ_TARGETED { [new_file.baseName, new_file] } .join(meta_channel_4 - .map{ meta, consensus -> + .map{ meta, _consensus -> ["${meta.id}_consensus", meta] } ) - .map{ name, file, meta -> + .map{ _name, file, meta -> [meta - meta.subMap('cluster_id'), file] } .set{ ch_umi_consensus } @@ -540,9 +530,8 @@ workflow CRISPRSEQ_TARGETED { // MODULE: Convert fasta to fastq // SEQTK_SEQ_FATOFQ ( - ch_umi_consensus + ch_umi_consensus.concat(ch_single_clusters_consensus) ) - ch_versions = ch_versions.mix(SEQTK_SEQ_FATOFQ.out.versions.first()) } ch_preprocess_reads = params.umi_clustering ? SEQTK_SEQ_FATOFQ.out.fastx : SEQTK_SEQ_MASK.out.fastx @@ -567,11 +556,11 @@ workflow CRISPRSEQ_TARGETED { ch_preprocess_reads .join(ch_oriented_reference), true, + [], false, true ) ch_mapped_bam = MINIMAP2_ALIGN_ORIGINAL.out.bam - ch_versions = ch_versions.mix(MINIMAP2_ALIGN_ORIGINAL.out.versions) } // @@ -581,14 +570,13 @@ workflow CRISPRSEQ_TARGETED { BWA_INDEX ( ch_oriented_reference ) - ch_versions = ch_versions.mix(BWA_INDEX.out.versions) BWA_MEM ( ch_preprocess_reads, BWA_INDEX.out.index, + ch_oriented_reference, true ) ch_mapped_bam = BWA_MEM.out.bam - ch_versions = ch_versions.mix(BWA_MEM.out.versions) } // @@ -598,7 +586,6 @@ workflow CRISPRSEQ_TARGETED { BOWTIE2_BUILD ( ch_oriented_reference ) - ch_versions = ch_versions.mix(BOWTIE2_BUILD.out.versions) BOWTIE2_ALIGN ( ch_preprocess_reads, BOWTIE2_BUILD.out.index, @@ -607,7 +594,6 @@ workflow CRISPRSEQ_TARGETED { true ) ch_mapped_bam = BOWTIE2_ALIGN.out.bam - ch_versions = ch_versions.mix(BOWTIE2_ALIGN.out.versions) } @@ -627,7 +613,6 @@ workflow CRISPRSEQ_TARGETED { SAMTOOLS_INDEX ( ch_mapped_bam ) - ch_versions = ch_versions.mix(SAMTOOLS_INDEX.out.versions) // // MODULE: Obtain a new reference with the template modification @@ -646,12 +631,12 @@ workflow CRISPRSEQ_TARGETED { TEMPLATE_REFERENCE.out.fasta .join(ch_oriented_reference), true, + [], false, true ) .bam .set { ch_template_bam } - ch_versions = ch_versions.mix(MINIMAP2_ALIGN_TEMPLATE.out.versions) ch_mapped_bam .join(SAMTOOLS_INDEX.out.bai) @@ -682,9 +667,9 @@ workflow CRISPRSEQ_TARGETED { CIGAR_PARSER ( ch_to_parse_cigar ) - ch_multiqc_files = ch_multiqc_files.mix(CIGAR_PARSER.out.processing.collect{it[1]}) - ch_multiqc_files = ch_multiqc_files.mix(CIGAR_PARSER.out.edition.collect{it[2]}) - ch_multiqc_files = ch_multiqc_files.mix(CIGAR_PARSER.out.qcindels.collect{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(CIGAR_PARSER.out.processing.collect{it -> it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(CIGAR_PARSER.out.edition.collect{it -> it[2]}) + ch_multiqc_files = ch_multiqc_files.mix(CIGAR_PARSER.out.qcindels.collect{it -> it[1]}) ch_versions = ch_versions.mix(CIGAR_PARSER.out.versions.first()) @@ -695,7 +680,7 @@ workflow CRISPRSEQ_TARGETED { CLONALITY_CLASSIFIER ( CIGAR_PARSER.out.indels .join(CIGAR_PARSER.out.edition) - .map { [it[0], it[1], it[4]] } + .map { it -> [it[0], it[1], it[4]] } ) ch_versions = ch_versions.mix(CLONALITY_CLASSIFIER.out.versions.first()) } @@ -715,7 +700,7 @@ workflow CRISPRSEQ_TARGETED { // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -744,24 +729,31 @@ workflow CRISPRSEQ_TARGETED { // // MODULE: MultiQC // - ch_multiqc_config = channel.fromPath("$projectDir/assets/multiqc_config.yml", checkIfExists: true) - ch_multiqc_custom_config = params.multiqc_config ? channel.fromPath(params.multiqc_config, checkIfExists: true) : channel.empty() - ch_multiqc_logo = params.multiqc_logo ? channel.fromPath(params.multiqc_logo, checkIfExists: true) : channel.empty() - 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_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)) - - MULTIQC ( - ch_multiqc_files.collect(), - ch_multiqc_config.toList(), - ch_multiqc_custom_config.toList(), - ch_multiqc_logo.toList(), - [], - [] + ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) + + def ch_summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") + def ch_workflow_summary = channel.value(paramsSummaryMultiqc(ch_summary_params)) + ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) + + def 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) + def ch_methods_description = channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) + ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: true)) + + MULTIQC( + ch_multiqc_files.flatten().collect().map { files -> + [ + [id: 'crisprseq'], + files, + params.multiqc_config + ? file(params.multiqc_config, checkIfExists: true) + : file("${projectDir}/assets/multiqc_config.yml", checkIfExists: true), + params.multiqc_logo ? file(params.multiqc_logo, checkIfExists: true) : [], + [], + [], + ] + } ) emit: