From 4566b3d46e0e80042552f1e5373a2416a6ffaf5e Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Thu, 30 Nov 2023 08:23:22 -0500 Subject: [PATCH 01/37] Move nf-test files and container definitions --- conf/container.config | 3 --- modules/local/plot_run_gantt/main.nf | 1 + modules/local/plot_run_gantt/tests/nextflow.config | 2 -- modules/local/seqera_runs_dump/main.nf | 1 + .../local/seqera_runs_dump/tests/nextflow.config | 1 - nextflow.config | 13 +++++-------- tests/nextflow.config | 5 ----- .../nf_aggregate/tests}/main.nf.test | 2 +- {tests => workflows/nf_aggregate/tests}/tags.yml | 0 9 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 conf/container.config delete mode 100644 modules/local/plot_run_gantt/tests/nextflow.config delete mode 100644 modules/local/seqera_runs_dump/tests/nextflow.config delete mode 100644 tests/nextflow.config rename {tests => workflows/nf_aggregate/tests}/main.nf.test (88%) rename {tests => workflows/nf_aggregate/tests}/tags.yml (100%) diff --git a/conf/container.config b/conf/container.config deleted file mode 100644 index aa02ee2..0000000 --- a/conf/container.config +++ /dev/null @@ -1,3 +0,0 @@ -process { withName: 'NF_AGGREGATE:SEQERA_RUNS_DUMP' { container = 'quay.io/seqeralabs/nf-aggregate:tower-cli-0.9.0--2cb0f2e9d85d026b' } } -process { withName: 'NF_AGGREGATE:MULTIQC' { container = 'quay.io/seqeralabs/nf-aggregate:multiqc--545f544898344f7d' } } -process { withName: 'NF_AGGREGATE:PLOT_RUN_GANTT' { container = 'quay.io/seqeralabs/nf-aggregate:click-8.0.1_pandas-1.1.5_plotly_express-0.4.1_typing-3.10.0.0--342dabfe6548a051' } } diff --git a/modules/local/plot_run_gantt/main.nf b/modules/local/plot_run_gantt/main.nf index 9f9a0fe..7413640 100644 --- a/modules/local/plot_run_gantt/main.nf +++ b/modules/local/plot_run_gantt/main.nf @@ -1,6 +1,7 @@ process PLOT_RUN_GANTT { tag "$meta.id" conda 'click=8.0.1 pandas=1.1.5 plotly_express=0.4.1 typing=3.10.0.0' + container 'seqeralabs/nf-aggregate:click-8.0.1_pandas-1.1.5_plotly_express-0.4.1_typing-3.10.0.0--342dabfe6548a051' input: tuple val(meta), path(run_dump) diff --git a/modules/local/plot_run_gantt/tests/nextflow.config b/modules/local/plot_run_gantt/tests/nextflow.config deleted file mode 100644 index a7b7f88..0000000 --- a/modules/local/plot_run_gantt/tests/nextflow.config +++ /dev/null @@ -1,2 +0,0 @@ -process { withName: 'SEQERA_RUNS_DUMP' { container = 'public.ecr.aws/seqera-labs/wave/containers:tower-cli-0.9.0--2cb0f2e9d85d026b' } } -process { withName: 'PLOT_RUN_GANTT' { container = 'quay.io/seqeralabs/nf-aggregate:click-8.0.1_pandas-1.1.5_plotly_express-0.4.1_typing-3.10.0.0--342dabfe6548a051' } } diff --git a/modules/local/seqera_runs_dump/main.nf b/modules/local/seqera_runs_dump/main.nf index 4ea74c9..1628beb 100644 --- a/modules/local/seqera_runs_dump/main.nf +++ b/modules/local/seqera_runs_dump/main.nf @@ -3,6 +3,7 @@ include { getRunMetadata } from './functions' process SEQERA_RUNS_DUMP { tag "$meta.id" conda 'tower-cli=0.9.0' + container 'seqeralabs/nf-aggregate:tower-cli-0.9.0--2cb0f2e9d85d026b' input: val meta diff --git a/modules/local/seqera_runs_dump/tests/nextflow.config b/modules/local/seqera_runs_dump/tests/nextflow.config deleted file mode 100644 index e1348a5..0000000 --- a/modules/local/seqera_runs_dump/tests/nextflow.config +++ /dev/null @@ -1 +0,0 @@ -process { withName: 'SEQERA_RUNS_DUMP' { container = 'quay.io/seqeralabs/nf-aggregate:tower-cli-0.9.0--2cb0f2e9d85d026b' } } diff --git a/nextflow.config b/nextflow.config index a42e39d..aafbd8d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -58,7 +58,7 @@ profiles { wave { wave.enabled = true wave.strategy = ['conda'] - wave.build.repository = 'public.ecr.aws/seqera-labs/wave/containers' + wave.build.repository = 'quay.io/seqeralabs/nf-aggregate' wave.freeze = true } test_full { @@ -157,10 +157,10 @@ profiles { // Set default registry for Apptainer, Docker, Podman and Singularity independent of -profile // Will not be used unless Apptainer / Docker / Podman / Singularity are enabled // Set to your registry if you have a mirror of containers -apptainer.registry = 'public.ecr.aws/seqera-labs/wave/containers' -docker.registry = 'public.ecr.aws/seqera-labs/wave/containers' -podman.registry = 'public.ecr.aws/seqera-labs/wave/containers' -singularity.registry = 'public.ecr.aws/seqera-labs/wave/containers' +apptainer.registry = 'quay.io' +docker.registry = 'quay.io' +podman.registry = 'quay.io' +singularity.registry = 'quay.io' // Nextflow plugins plugins { @@ -182,9 +182,6 @@ env { // Load Nextflow config for nf_aggregate workflow includeConfig 'workflows/nf_aggregate/nextflow.config' -// Load container config for nf_aggregate workflow -includeConfig 'conf/container.config' - // Capture exit codes from upstream processes when piping process.shell = ['/bin/bash', '-euo', 'pipefail'] diff --git a/tests/nextflow.config b/tests/nextflow.config deleted file mode 100644 index c19b1ad..0000000 --- a/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -/* -======================================================================================== - Nextflow config file for running tests -======================================================================================== -*/ diff --git a/tests/main.nf.test b/workflows/nf_aggregate/tests/main.nf.test similarity index 88% rename from tests/main.nf.test rename to workflows/nf_aggregate/tests/main.nf.test index 403d653..6f828f2 100644 --- a/tests/main.nf.test +++ b/workflows/nf_aggregate/tests/main.nf.test @@ -10,7 +10,7 @@ nextflow_pipeline { when { params { - outdir = "results" + outdir = "results" } } diff --git a/tests/tags.yml b/workflows/nf_aggregate/tests/tags.yml similarity index 100% rename from tests/tags.yml rename to workflows/nf_aggregate/tests/tags.yml From d27f656372c5f2ed684f921c468e1b6cbd1cc1d2 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Thu, 30 Nov 2023 14:03:47 +0000 Subject: [PATCH 02/37] Fix CI test triggers (which weren't active on PR) --- .github/workflows/ci.yml | 11 +++++++---- modules/local/plot_run_gantt/tests/main.nf.test | 1 - modules/local/seqera_runs_dump/tests/main.nf.test | 1 - nf-test.config | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1122e3f..d00e809 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,15 @@ name: nf-aggregate CI # This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors on: - push: - branches: - - dev pull_request: release: - types: [published] + types: + - published + merge_group: + types: + - checks_requested + branches: + - master env: NXF_ANSI_LOG: false diff --git a/modules/local/plot_run_gantt/tests/main.nf.test b/modules/local/plot_run_gantt/tests/main.nf.test index 372198b..3d56dbf 100644 --- a/modules/local/plot_run_gantt/tests/main.nf.test +++ b/modules/local/plot_run_gantt/tests/main.nf.test @@ -3,7 +3,6 @@ nextflow_process { name "Test Process PLOT_RUN_GANTT" script "../main.nf" process "PLOT_RUN_GANTT" - config "./nextflow.config" tag "modules" tag "modules_local" diff --git a/modules/local/seqera_runs_dump/tests/main.nf.test b/modules/local/seqera_runs_dump/tests/main.nf.test index 71fe5f2..9d90498 100644 --- a/modules/local/seqera_runs_dump/tests/main.nf.test +++ b/modules/local/seqera_runs_dump/tests/main.nf.test @@ -3,7 +3,6 @@ nextflow_process { name "Test Process SEQERA_RUNS_DUMP" script "../main.nf" process "SEQERA_RUNS_DUMP" - config "./nextflow.config" tag "modules" tag "modules_local" diff --git a/nf-test.config b/nf-test.config index cb656b9..0799cb4 100644 --- a/nf-test.config +++ b/nf-test.config @@ -3,7 +3,7 @@ config { testsDir "." // nf-test directory including temporary files for each test - workDir "/tmp" + workDir ".nf-test" // location of library folder that is added automatically to the classpath libDir "lib/" From 0d8c84ce9545f7b87a28865f3286ebb5afa4ab28 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Thu, 30 Nov 2023 14:04:29 +0000 Subject: [PATCH 03/37] Fix mistake in CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d00e809..42aa3a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,6 @@ concurrency: cancel-in-progress: true jobs: - test: changes: name: Check for changes runs-on: ubuntu-latest @@ -37,6 +36,7 @@ jobs: id: filter with: filters: ".github/tags.yml" + nf-test: name: nf-test ${{ matrix.tags }} ${{ matrix.profile }} needs: [changes] From a0af0a4d9127a71b903857b20ea0b5b9f457ee02 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Thu, 30 Nov 2023 14:59:31 +0000 Subject: [PATCH 04/37] Add FASTQC for testing purposes --- .gitignore | 2 +- modules.json | 5 ++ modules/nf-core/fastqc/environment.yml | 7 +++ modules/nf-core/fastqc/main.nf | 55 ++++++++++++++++++ modules/nf-core/fastqc/meta.yml | 57 +++++++++++++++++++ modules/nf-core/fastqc/tests/main.nf.test | 41 +++++++++++++ .../nf-core/fastqc/tests/main.nf.test.snap | 10 ++++ modules/nf-core/fastqc/tests/tags.yml | 2 + 8 files changed, 178 insertions(+), 1 deletion(-) create mode 100644 modules/nf-core/fastqc/environment.yml create mode 100644 modules/nf-core/fastqc/main.nf create mode 100644 modules/nf-core/fastqc/meta.yml create mode 100644 modules/nf-core/fastqc/tests/main.nf.test create mode 100644 modules/nf-core/fastqc/tests/main.nf.test.snap create mode 100644 modules/nf-core/fastqc/tests/tags.yml diff --git a/.gitignore b/.gitignore index 089a407..2eef655 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ results/ testing/ testing* *.pyc -.nf-test +.nf-test* diff --git a/modules.json b/modules.json index 01231a9..963932d 100644 --- a/modules.json +++ b/modules.json @@ -5,6 +5,11 @@ "https://github.com/nf-core/modules.git": { "modules": { "nf-core": { + "fastqc": { + "branch": "master", + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": ["modules"] + }, "multiqc": { "branch": "master", "git_sha": "1537442a7be4a78efa3d1ff700a923c627bbda5d", diff --git a/modules/nf-core/fastqc/environment.yml b/modules/nf-core/fastqc/environment.yml new file mode 100644 index 0000000..1787b38 --- /dev/null +++ b/modules/nf-core/fastqc/environment.yml @@ -0,0 +1,7 @@ +name: fastqc +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::fastqc=0.12.1 diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf new file mode 100644 index 0000000..50e59f2 --- /dev/null +++ b/modules/nf-core/fastqc/main.nf @@ -0,0 +1,55 @@ +process FASTQC { + tag "$meta.id" + label 'process_medium' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/fastqc:0.12.1--hdfd78af_0' : + 'biocontainers/fastqc:0.12.1--hdfd78af_0' }" + + input: + 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 + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + // Make list of old name and new name pairs to use for renaming in the bash while loop + def old_new_pairs = reads instanceof Path || reads.size() == 1 ? [[ reads, "${prefix}.${reads.extension}" ]] : reads.withIndex().collect { entry, index -> [ entry, "${prefix}_${index + 1}.${entry.extension}" ] } + def rename_to = old_new_pairs*.join(' ').join(' ') + def renamed_files = old_new_pairs.collect{ old_name, new_name -> new_name }.join(' ') + """ + printf "%s %s\\n" $rename_to | while read old_name new_name; do + [ -f "\${new_name}" ] || ln -s \$old_name \$new_name + done + + fastqc \\ + $args \\ + --threads $task.cpus \\ + $renamed_files + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" ) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.html + touch ${prefix}.zip + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/fastqc/meta.yml b/modules/nf-core/fastqc/meta.yml new file mode 100644 index 0000000..ee5507e --- /dev/null +++ b/modules/nf-core/fastqc/meta.yml @@ -0,0 +1,57 @@ +name: fastqc +description: Run FastQC on sequenced reads +keywords: + - quality control + - qc + - adapters + - fastq +tools: + - fastqc: + description: | + FastQC gives general quality metrics about your reads. + It provides information about the quality score distribution + across your reads, the per base sequence content (%A/C/G/T). + You get information about adapter contamination and other + overrepresented sequences. + homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ + documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/ + licence: ["GPL-2.0-only"] +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. +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - html: + type: file + description: FastQC report + pattern: "*_{fastqc.html}" + - zip: + type: file + description: FastQC report archive + pattern: "*_{fastqc.zip}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@drpatelh" + - "@grst" + - "@ewels" + - "@FelixKrueger" +maintainers: + - "@drpatelh" + - "@grst" + - "@ewels" + - "@FelixKrueger" diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test new file mode 100644 index 0000000..6437a14 --- /dev/null +++ b/modules/nf-core/fastqc/tests/main.nf.test @@ -0,0 +1,41 @@ +nextflow_process { + + name "Test Process FASTQC" + script "../main.nf" + process "FASTQC" + tag "modules" + tag "modules_nfcore" + tag "fastqc" + + test("Single-Read") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id: 'test', single_end:true ], + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + // NOTE The report contains the date inside it, which means that the md5sum is stable per day, but not longer than that. So you can't md5sum it. + // looks like this:
Mon 2 Oct 2023
test.gz
+ // https://github.com/nf-core/modules/pull/3903#issuecomment-1743620039 + { assert process.out.html.get(0).get(1) ==~ ".*/test_fastqc.html" }, + { assert path(process.out.html.get(0).get(1)).getText().contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match("versions") }, + { assert process.out.zip.get(0).get(1) ==~ ".*/test_fastqc.zip" } + ) + } + } +} diff --git a/modules/nf-core/fastqc/tests/main.nf.test.snap b/modules/nf-core/fastqc/tests/main.nf.test.snap new file mode 100644 index 0000000..636a32c --- /dev/null +++ b/modules/nf-core/fastqc/tests/main.nf.test.snap @@ -0,0 +1,10 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] + ], + "timestamp": "2023-10-09T23:40:54+0000" + } +} \ No newline at end of file diff --git a/modules/nf-core/fastqc/tests/tags.yml b/modules/nf-core/fastqc/tests/tags.yml new file mode 100644 index 0000000..7834294 --- /dev/null +++ b/modules/nf-core/fastqc/tests/tags.yml @@ -0,0 +1,2 @@ +fastqc: + - modules/nf-core/fastqc/** From e50384e7e6e11b1916529fd4885358d01d7f0bcc Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Thu, 30 Nov 2023 16:49:08 +0000 Subject: [PATCH 05/37] Load test data --- nf-test.config | 4 ++-- tests/nextflow.config | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 tests/nextflow.config diff --git a/nf-test.config b/nf-test.config index 0799cb4..48e26bd 100644 --- a/nf-test.config +++ b/nf-test.config @@ -3,13 +3,13 @@ config { testsDir "." // nf-test directory including temporary files for each test - workDir ".nf-test" + workDir "/tmp" // location of library folder that is added automatically to the classpath libDir "lib/" // location of an optional nextflow.config file specific for executing tests - configFile "nextflow.config" + configFile "tests/nextflow.config" // run all test with the defined docker profile from the main nextflow.config profile "" diff --git a/tests/nextflow.config b/tests/nextflow.config new file mode 100644 index 0000000..fec66b4 --- /dev/null +++ b/tests/nextflow.config @@ -0,0 +1 @@ +includeConfig 'https://raw.githubusercontent.com/nf-core/modules/47ad5f5402a5125c6c6f6107abc9a8732ce7dd12/tests/config/test_data.config' \ No newline at end of file From fad7a36969acc6729bf59863d155e926e0ffb566 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Thu, 30 Nov 2023 17:33:24 +0000 Subject: [PATCH 06/37] Trying to load an extra param into tests --- modules/local/plot_run_gantt/tests/main.nf.test | 3 +++ modules/local/seqera_runs_dump/tests/main.nf.test | 3 +++ nf-test.config | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/local/plot_run_gantt/tests/main.nf.test b/modules/local/plot_run_gantt/tests/main.nf.test index 3d56dbf..5c8b6f6 100644 --- a/modules/local/plot_run_gantt/tests/main.nf.test +++ b/modules/local/plot_run_gantt/tests/main.nf.test @@ -23,6 +23,9 @@ nextflow_process { } when { + params { + publish_dir_mode = "copy" + } process { """ diff --git a/modules/local/seqera_runs_dump/tests/main.nf.test b/modules/local/seqera_runs_dump/tests/main.nf.test index 9d90498..1247025 100644 --- a/modules/local/seqera_runs_dump/tests/main.nf.test +++ b/modules/local/seqera_runs_dump/tests/main.nf.test @@ -11,6 +11,9 @@ nextflow_process { test("Should run without failures") { when { + params { + publish_dir_mode = "copy" + } process { """ input[0] = ['id': '4Bi5xBK6E2Nbhj', 'workspace': 'community/showcase'] diff --git a/nf-test.config b/nf-test.config index 48e26bd..fc55554 100644 --- a/nf-test.config +++ b/nf-test.config @@ -3,7 +3,7 @@ config { testsDir "." // nf-test directory including temporary files for each test - workDir "/tmp" + workDir ".nf-test" // location of library folder that is added automatically to the classpath libDir "lib/" From 4fdb0501166e6c48665597b4be88408cc8b1ae92 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Fri, 1 Dec 2023 16:50:45 +0000 Subject: [PATCH 07/37] Move pipeline level test back to pipeline folder --- {workflows/nf_aggregate/tests => tests}/main.nf.test | 2 +- {workflows/nf_aggregate/tests => tests}/tags.yml | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename {workflows/nf_aggregate/tests => tests}/main.nf.test (90%) rename {workflows/nf_aggregate/tests => tests}/tags.yml (100%) diff --git a/workflows/nf_aggregate/tests/main.nf.test b/tests/main.nf.test similarity index 90% rename from workflows/nf_aggregate/tests/main.nf.test rename to tests/main.nf.test index 6f828f2..a87e57d 100644 --- a/workflows/nf_aggregate/tests/main.nf.test +++ b/tests/main.nf.test @@ -1,6 +1,6 @@ nextflow_pipeline { - name "Test Workflow main.nf" + name "Test Pipeline main.nf" script "../main.nf" tag "pipeline" diff --git a/workflows/nf_aggregate/tests/tags.yml b/tests/tags.yml similarity index 100% rename from workflows/nf_aggregate/tests/tags.yml rename to tests/tags.yml From 6b0f457375ddd49682f59f9494e9f71be89c68d6 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Fri, 1 Dec 2023 16:53:07 +0000 Subject: [PATCH 08/37] Remove publish_dir_mode use because it broke stuff --- modules/local/plot_run_gantt/nextflow.config | 1 - modules/local/seqera_runs_dump/nextflow.config | 1 - 2 files changed, 2 deletions(-) diff --git a/modules/local/plot_run_gantt/nextflow.config b/modules/local/plot_run_gantt/nextflow.config index 2b2ebb6..f2f794c 100644 --- a/modules/local/plot_run_gantt/nextflow.config +++ b/modules/local/plot_run_gantt/nextflow.config @@ -2,7 +2,6 @@ process { withName: 'PLOT_RUN_GANTT' { publishDir = [ path: { "${params.outdir}/${meta.projectName?.replace("/", "_") ?: ""}/gantt" }, - mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } diff --git a/modules/local/seqera_runs_dump/nextflow.config b/modules/local/seqera_runs_dump/nextflow.config index 963db9a..8e79a50 100644 --- a/modules/local/seqera_runs_dump/nextflow.config +++ b/modules/local/seqera_runs_dump/nextflow.config @@ -4,7 +4,6 @@ process { ext.args2 = { params.skip_run_gantt ? '' : '--add-task-logs --add-fusion-logs' } publishDir = [ path: { "${params.outdir}/${metaOut?.projectName?.replace("/", "_") ?: ""}/runs_dump" }, - mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.json') ? null : filename } ] } From cb63b7ac62780aeab441db927e03001bf22b6831 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Fri, 1 Dec 2023 13:24:10 -0500 Subject: [PATCH 09/37] Remove FastQC module --- modules.json | 5 -- modules/nf-core/fastqc/environment.yml | 7 --- modules/nf-core/fastqc/main.nf | 55 ------------------ modules/nf-core/fastqc/meta.yml | 57 ------------------- modules/nf-core/fastqc/tests/main.nf.test | 41 ------------- .../nf-core/fastqc/tests/main.nf.test.snap | 10 ---- modules/nf-core/fastqc/tests/tags.yml | 2 - 7 files changed, 177 deletions(-) delete mode 100644 modules/nf-core/fastqc/environment.yml delete mode 100644 modules/nf-core/fastqc/main.nf delete mode 100644 modules/nf-core/fastqc/meta.yml delete mode 100644 modules/nf-core/fastqc/tests/main.nf.test delete mode 100644 modules/nf-core/fastqc/tests/main.nf.test.snap delete mode 100644 modules/nf-core/fastqc/tests/tags.yml diff --git a/modules.json b/modules.json index 963932d..01231a9 100644 --- a/modules.json +++ b/modules.json @@ -5,11 +5,6 @@ "https://github.com/nf-core/modules.git": { "modules": { "nf-core": { - "fastqc": { - "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": ["modules"] - }, "multiqc": { "branch": "master", "git_sha": "1537442a7be4a78efa3d1ff700a923c627bbda5d", diff --git a/modules/nf-core/fastqc/environment.yml b/modules/nf-core/fastqc/environment.yml deleted file mode 100644 index 1787b38..0000000 --- a/modules/nf-core/fastqc/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: fastqc -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::fastqc=0.12.1 diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf deleted file mode 100644 index 50e59f2..0000000 --- a/modules/nf-core/fastqc/main.nf +++ /dev/null @@ -1,55 +0,0 @@ -process FASTQC { - tag "$meta.id" - label 'process_medium' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/fastqc:0.12.1--hdfd78af_0' : - 'biocontainers/fastqc:0.12.1--hdfd78af_0' }" - - input: - 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 - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - // Make list of old name and new name pairs to use for renaming in the bash while loop - def old_new_pairs = reads instanceof Path || reads.size() == 1 ? [[ reads, "${prefix}.${reads.extension}" ]] : reads.withIndex().collect { entry, index -> [ entry, "${prefix}_${index + 1}.${entry.extension}" ] } - def rename_to = old_new_pairs*.join(' ').join(' ') - def renamed_files = old_new_pairs.collect{ old_name, new_name -> new_name }.join(' ') - """ - printf "%s %s\\n" $rename_to | while read old_name new_name; do - [ -f "\${new_name}" ] || ln -s \$old_name \$new_name - done - - fastqc \\ - $args \\ - --threads $task.cpus \\ - $renamed_files - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" ) - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.html - touch ${prefix}.zip - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" ) - END_VERSIONS - """ -} diff --git a/modules/nf-core/fastqc/meta.yml b/modules/nf-core/fastqc/meta.yml deleted file mode 100644 index ee5507e..0000000 --- a/modules/nf-core/fastqc/meta.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: fastqc -description: Run FastQC on sequenced reads -keywords: - - quality control - - qc - - adapters - - fastq -tools: - - fastqc: - description: | - FastQC gives general quality metrics about your reads. - It provides information about the quality score distribution - across your reads, the per base sequence content (%A/C/G/T). - You get information about adapter contamination and other - overrepresented sequences. - homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ - documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/ - licence: ["GPL-2.0-only"] -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. -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - html: - type: file - description: FastQC report - pattern: "*_{fastqc.html}" - - zip: - type: file - description: FastQC report archive - pattern: "*_{fastqc.zip}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@drpatelh" - - "@grst" - - "@ewels" - - "@FelixKrueger" -maintainers: - - "@drpatelh" - - "@grst" - - "@ewels" - - "@FelixKrueger" diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test deleted file mode 100644 index 6437a14..0000000 --- a/modules/nf-core/fastqc/tests/main.nf.test +++ /dev/null @@ -1,41 +0,0 @@ -nextflow_process { - - name "Test Process FASTQC" - script "../main.nf" - process "FASTQC" - tag "modules" - tag "modules_nfcore" - tag "fastqc" - - test("Single-Read") { - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [ id: 'test', single_end:true ], - [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) - ] - ] - """ - } - } - - then { - assertAll ( - { assert process.success }, - // NOTE The report contains the date inside it, which means that the md5sum is stable per day, but not longer than that. So you can't md5sum it. - // looks like this:
Mon 2 Oct 2023
test.gz
- // https://github.com/nf-core/modules/pull/3903#issuecomment-1743620039 - { assert process.out.html.get(0).get(1) ==~ ".*/test_fastqc.html" }, - { assert path(process.out.html.get(0).get(1)).getText().contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).match("versions") }, - { assert process.out.zip.get(0).get(1) ==~ ".*/test_fastqc.zip" } - ) - } - } -} diff --git a/modules/nf-core/fastqc/tests/main.nf.test.snap b/modules/nf-core/fastqc/tests/main.nf.test.snap deleted file mode 100644 index 636a32c..0000000 --- a/modules/nf-core/fastqc/tests/main.nf.test.snap +++ /dev/null @@ -1,10 +0,0 @@ -{ - "versions": { - "content": [ - [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] - ], - "timestamp": "2023-10-09T23:40:54+0000" - } -} \ No newline at end of file diff --git a/modules/nf-core/fastqc/tests/tags.yml b/modules/nf-core/fastqc/tests/tags.yml deleted file mode 100644 index 7834294..0000000 --- a/modules/nf-core/fastqc/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -fastqc: - - modules/nf-core/fastqc/** From 8d271f89955dec44ac3031553f96f794ba8e28c3 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Fri, 1 Dec 2023 13:25:03 -0500 Subject: [PATCH 10/37] Add wave.strategy precedence --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index aafbd8d..b148b09 100644 --- a/nextflow.config +++ b/nextflow.config @@ -57,7 +57,7 @@ profiles { } wave { wave.enabled = true - wave.strategy = ['conda'] + wave.strategy = ['conda', 'container', 'dockerfile', 'spack'] wave.build.repository = 'quay.io/seqeralabs/nf-aggregate' wave.freeze = true } From cf8b31ebf77a0f823f1e7d9a4de0c8aaa9b7a724 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Fri, 1 Dec 2023 13:32:45 -0500 Subject: [PATCH 11/37] Remove Conda profile from testing in CI --- .github/workflows/ci.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42aa3a7..535b431 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,6 @@ jobs: tags: ["${{ fromJson(needs.changes.outputs.tags) }}"] profile: - "docker" - - "conda" steps: - name: Check out pipeline code @@ -64,22 +63,6 @@ jobs: with: version: "${{ matrix.NXF_VER }}" - - name: Set up miniconda - uses: conda-incubator/setup-miniconda@v2 - with: - miniconda-version: "latest" - auto-update-conda: true - channels: conda-forge,bioconda,defaults - python-version: ${{ matrix.python-version }} - - - name: Conda setup - run: | - conda clean -a - conda install -n base conda-libmamba-solver - conda config --set solver libmamba - echo $(realpath $CONDA)/condabin >> $GITHUB_PATH - echo $(realpath python) >> $GITHUB_PATH - - name: Cache nf-test installation id: cache-software uses: actions/cache@v3 From e7216d016c551499234710f0d9631c3c65f2a2ff Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Fri, 1 Dec 2023 13:36:42 -0500 Subject: [PATCH 12/37] Add publish_dir_mode parameter back --- modules/local/plot_run_gantt/nextflow.config | 1 + modules/local/plot_run_gantt/tests/main.nf.test | 2 +- modules/local/seqera_runs_dump/nextflow.config | 1 + modules/local/seqera_runs_dump/tests/main.nf.test | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/local/plot_run_gantt/nextflow.config b/modules/local/plot_run_gantt/nextflow.config index f2f794c..2b2ebb6 100644 --- a/modules/local/plot_run_gantt/nextflow.config +++ b/modules/local/plot_run_gantt/nextflow.config @@ -2,6 +2,7 @@ process { withName: 'PLOT_RUN_GANTT' { publishDir = [ path: { "${params.outdir}/${meta.projectName?.replace("/", "_") ?: ""}/gantt" }, + mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } diff --git a/modules/local/plot_run_gantt/tests/main.nf.test b/modules/local/plot_run_gantt/tests/main.nf.test index 5c8b6f6..bacc703 100644 --- a/modules/local/plot_run_gantt/tests/main.nf.test +++ b/modules/local/plot_run_gantt/tests/main.nf.test @@ -24,7 +24,7 @@ nextflow_process { when { params { - publish_dir_mode = "copy" + publish_dir_mode = "copy" } process { diff --git a/modules/local/seqera_runs_dump/nextflow.config b/modules/local/seqera_runs_dump/nextflow.config index 8e79a50..963db9a 100644 --- a/modules/local/seqera_runs_dump/nextflow.config +++ b/modules/local/seqera_runs_dump/nextflow.config @@ -4,6 +4,7 @@ process { ext.args2 = { params.skip_run_gantt ? '' : '--add-task-logs --add-fusion-logs' } publishDir = [ path: { "${params.outdir}/${metaOut?.projectName?.replace("/", "_") ?: ""}/runs_dump" }, + mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.json') ? null : filename } ] } diff --git a/modules/local/seqera_runs_dump/tests/main.nf.test b/modules/local/seqera_runs_dump/tests/main.nf.test index 1247025..ccce4ce 100644 --- a/modules/local/seqera_runs_dump/tests/main.nf.test +++ b/modules/local/seqera_runs_dump/tests/main.nf.test @@ -12,7 +12,7 @@ nextflow_process { when { params { - publish_dir_mode = "copy" + publish_dir_mode = "copy" } process { """ From 36b9cd8920a4e3fc7e1aa6977bc7555d83876f17 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Fri, 1 Dec 2023 18:05:27 -0500 Subject: [PATCH 13/37] Remove lib path --- nf-test.config | 3 --- 1 file changed, 3 deletions(-) diff --git a/nf-test.config b/nf-test.config index fc55554..c0ca9e3 100644 --- a/nf-test.config +++ b/nf-test.config @@ -5,9 +5,6 @@ config { // nf-test directory including temporary files for each test workDir ".nf-test" - // location of library folder that is added automatically to the classpath - libDir "lib/" - // location of an optional nextflow.config file specific for executing tests configFile "tests/nextflow.config" From 24751945f63fcf8375b0ad11d65730a6de21f276 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Fri, 1 Dec 2023 18:08:16 -0500 Subject: [PATCH 14/37] Remove config for test data --- nf-test.config | 2 +- tests/nextflow.config | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 tests/nextflow.config diff --git a/nf-test.config b/nf-test.config index c0ca9e3..2f5050c 100644 --- a/nf-test.config +++ b/nf-test.config @@ -6,7 +6,7 @@ config { workDir ".nf-test" // location of an optional nextflow.config file specific for executing tests - configFile "tests/nextflow.config" + configFile "nextflow.config" // run all test with the defined docker profile from the main nextflow.config profile "" diff --git a/tests/nextflow.config b/tests/nextflow.config deleted file mode 100644 index fec66b4..0000000 --- a/tests/nextflow.config +++ /dev/null @@ -1 +0,0 @@ -includeConfig 'https://raw.githubusercontent.com/nf-core/modules/47ad5f5402a5125c6c6f6107abc9a8732ce7dd12/tests/config/test_data.config' \ No newline at end of file From 031c97aafa6143b051e88c567e5cae957d77a16c Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 4 Dec 2023 15:25:29 +0000 Subject: [PATCH 15/37] Add workflow tests --- workflows/nf_aggregate/tests/main.nf.test | 38 +++++++++++++++++++ .../nf_aggregate/tests/main.nf.test.snap | 33 ++++++++++++++++ workflows/nf_aggregate/tests/tags.yml | 2 + 3 files changed, 73 insertions(+) create mode 100644 workflows/nf_aggregate/tests/main.nf.test create mode 100644 workflows/nf_aggregate/tests/main.nf.test.snap create mode 100644 workflows/nf_aggregate/tests/tags.yml diff --git a/workflows/nf_aggregate/tests/main.nf.test b/workflows/nf_aggregate/tests/main.nf.test new file mode 100644 index 0000000..9585439 --- /dev/null +++ b/workflows/nf_aggregate/tests/main.nf.test @@ -0,0 +1,38 @@ +nextflow_workflow { + + name "Test Workflow NF_AGGREGATE" + script "../main.nf" + workflow "NF_AGGREGATE" + + tag "workflows" + tag "workflows_nf_aggregate" + + stage { + symlink "workflows/nf_aggregate/assets/multiqc_config.yml" + } + + test("Should run without failures") { + + when { + workflow { + """ + input[0] = ['id': '4Bi5xBK6E2Nbhj', 'workspace': 'community/showcase'] + input[1] = [] + input[2] = [] + """ + } + } + + then { + assertAll( + { assert snapshot( + workflow.out.multiqc_report, + workflow.out.versions + ).match()}, + { assert workflow.success } + ) + } + + } + +} diff --git a/workflows/nf_aggregate/tests/main.nf.test.snap b/workflows/nf_aggregate/tests/main.nf.test.snap new file mode 100644 index 0000000..533b724 --- /dev/null +++ b/workflows/nf_aggregate/tests/main.nf.test.snap @@ -0,0 +1,33 @@ +{ + "Parameters: default": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "multiqc_report": [ + + ], + "versions": [ + + ] + } + ], + "timestamp": "2023-12-04T10:38:26.10265603" + }, + "Should run without failures": { + "content": [ + [ + "multiqc_report.html:md5,1c7b0ef50b0e93acf89a58e2384309be" + ], + [ + "versions.yml:md5,1294de7c9d8f7ce29bbb3a638ac1d108", + "versions.yml:md5,43372d67fa3f029a02cc64a571d88e13" + ] + ], + "timestamp": "2023-12-04T15:19:31.112758226" + } +} \ No newline at end of file diff --git a/workflows/nf_aggregate/tests/tags.yml b/workflows/nf_aggregate/tests/tags.yml new file mode 100644 index 0000000..50048dc --- /dev/null +++ b/workflows/nf_aggregate/tests/tags.yml @@ -0,0 +1,2 @@ +workflows_nf_aggregate: + - workflows/nf_aggregate/** From 0dbc43143752d8d870cb274d21fe444a63d47385 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 4 Dec 2023 15:36:53 +0000 Subject: [PATCH 16/37] Contains check for variable HTML --- workflows/nf_aggregate/tests/main.nf.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/nf_aggregate/tests/main.nf.test b/workflows/nf_aggregate/tests/main.nf.test index 9585439..bcee8ce 100644 --- a/workflows/nf_aggregate/tests/main.nf.test +++ b/workflows/nf_aggregate/tests/main.nf.test @@ -26,9 +26,9 @@ nextflow_workflow { then { assertAll( { assert snapshot( - workflow.out.multiqc_report, workflow.out.versions ).match()}, + { assert path(process.out.multiqc_report.get(0)).getText().contains("nf-core/rnaseq_4Bi5xBK6E2Nbhj") }, { assert workflow.success } ) } From 58ed65517eb1f60c1672a9d0a8fc19203a3f9b00 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 4 Dec 2023 15:52:56 +0000 Subject: [PATCH 17/37] Switch to contains --- workflows/nf_aggregate/tests/main.nf.test | 2 +- workflows/nf_aggregate/tests/main.nf.test.snap | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/workflows/nf_aggregate/tests/main.nf.test b/workflows/nf_aggregate/tests/main.nf.test index bcee8ce..ac5f6d7 100644 --- a/workflows/nf_aggregate/tests/main.nf.test +++ b/workflows/nf_aggregate/tests/main.nf.test @@ -28,7 +28,7 @@ nextflow_workflow { { assert snapshot( workflow.out.versions ).match()}, - { assert path(process.out.multiqc_report.get(0)).getText().contains("nf-core/rnaseq_4Bi5xBK6E2Nbhj") }, + { assert path(workflow.out.multiqc_report.get(0)).getText().contains("nf-core/rnaseq_4Bi5xBK6E2Nbhj") }, { assert workflow.success } ) } diff --git a/workflows/nf_aggregate/tests/main.nf.test.snap b/workflows/nf_aggregate/tests/main.nf.test.snap index 533b724..2d875da 100644 --- a/workflows/nf_aggregate/tests/main.nf.test.snap +++ b/workflows/nf_aggregate/tests/main.nf.test.snap @@ -20,14 +20,11 @@ }, "Should run without failures": { "content": [ - [ - "multiqc_report.html:md5,1c7b0ef50b0e93acf89a58e2384309be" - ], [ "versions.yml:md5,1294de7c9d8f7ce29bbb3a638ac1d108", "versions.yml:md5,43372d67fa3f029a02cc64a571d88e13" ] ], - "timestamp": "2023-12-04T15:19:31.112758226" + "timestamp": "2023-12-04T15:47:00.36029546" } } \ No newline at end of file From ad114437bf15a708e6da3517cb73c14fe9d2479b Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 4 Dec 2023 17:16:19 +0000 Subject: [PATCH 18/37] Add subworkflow tests --- .../utils_nf_aggregate/tests/main.nf.test | 41 +++++++++++++++++++ .../tests/main.nf.test.snap | 25 +++++++++++ .../local/utils_nf_aggregate/tests/tags.yml | 2 + 3 files changed, 68 insertions(+) create mode 100644 subworkflows/local/utils_nf_aggregate/tests/main.nf.test create mode 100644 subworkflows/local/utils_nf_aggregate/tests/main.nf.test.snap create mode 100644 subworkflows/local/utils_nf_aggregate/tests/tags.yml diff --git a/subworkflows/local/utils_nf_aggregate/tests/main.nf.test b/subworkflows/local/utils_nf_aggregate/tests/main.nf.test new file mode 100644 index 0000000..c2cf408 --- /dev/null +++ b/subworkflows/local/utils_nf_aggregate/tests/main.nf.test @@ -0,0 +1,41 @@ +nextflow_workflow { + + name "Test Workflow PIPELINE_INITIALISATION" + script "../main.nf" + workflow "PIPELINE_INITIALISATION" + + tag "subworkflows" + tag "subworkflows_local_utils_nf_aggregate" + + stage { + symlink "nextflow_schema.json" + symlink "workflows/nf_aggregate/assets/test_run_ids.csv" + } + + test("Should run without failures") { + + when { + params { + // define parameters here. Example: + // outdir = "tests/results" + } + workflow { + """ + // define inputs of the workflow here. Example: + // input[0] = file("test-file.txt") + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot( + workflow.out.ids + ).match() } + ) + } + + } + +} diff --git a/subworkflows/local/utils_nf_aggregate/tests/main.nf.test.snap b/subworkflows/local/utils_nf_aggregate/tests/main.nf.test.snap new file mode 100644 index 0000000..97c8cdf --- /dev/null +++ b/subworkflows/local/utils_nf_aggregate/tests/main.nf.test.snap @@ -0,0 +1,25 @@ +{ + "Should run without failures": { + "content": [ + [ + { + "id": "2lXd1j7OwZVfxh", + "workspace": "community/showcase" + }, + { + "id": "38QXz4OfQDpwOV", + "workspace": "community/showcase" + }, + { + "id": "4Bi5xBK6E2Nbhj", + "workspace": "community/showcase" + }, + { + "id": "4LWT4uaXDaGcDY", + "workspace": "community/showcase" + } + ] + ], + "timestamp": "2023-12-04T17:13:53.098963" + } +} \ No newline at end of file diff --git a/subworkflows/local/utils_nf_aggregate/tests/tags.yml b/subworkflows/local/utils_nf_aggregate/tests/tags.yml new file mode 100644 index 0000000..4fc1520 --- /dev/null +++ b/subworkflows/local/utils_nf_aggregate/tests/tags.yml @@ -0,0 +1,2 @@ +subworkflows_local_utils_nf_aggregate: + - subworkflows/local/utils_nf_aggregate/** From 000be55105c0e6c839e77f6ab147c765b7f6b05e Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Mon, 4 Dec 2023 17:18:16 +0000 Subject: [PATCH 19/37] Remove unused params --- subworkflows/local/utils_nf_aggregate/tests/main.nf.test | 4 ---- 1 file changed, 4 deletions(-) diff --git a/subworkflows/local/utils_nf_aggregate/tests/main.nf.test b/subworkflows/local/utils_nf_aggregate/tests/main.nf.test index c2cf408..ecc46f5 100644 --- a/subworkflows/local/utils_nf_aggregate/tests/main.nf.test +++ b/subworkflows/local/utils_nf_aggregate/tests/main.nf.test @@ -15,10 +15,6 @@ nextflow_workflow { test("Should run without failures") { when { - params { - // define parameters here. Example: - // outdir = "tests/results" - } workflow { """ // define inputs of the workflow here. Example: From 255a6d1b0e6f779356ebe97ef09d7e078e8eeecf Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Tue, 5 Dec 2023 11:31:46 +0000 Subject: [PATCH 20/37] Bump to multiqc without fastqc --- modules.json | 2 +- modules/nf-core/multiqc/nextflow.config | 10 ------- modules/nf-core/multiqc/tests/main.nf.test | 32 ++-------------------- 3 files changed, 3 insertions(+), 41 deletions(-) delete mode 100644 modules/nf-core/multiqc/nextflow.config diff --git a/modules.json b/modules.json index 01231a9..d650ecf 100644 --- a/modules.json +++ b/modules.json @@ -7,7 +7,7 @@ "nf-core": { "multiqc": { "branch": "master", - "git_sha": "1537442a7be4a78efa3d1ff700a923c627bbda5d", + "git_sha": "4ab13872435962dadc239979554d13709e20bf29", "installed_by": ["modules"] } } diff --git a/modules/nf-core/multiqc/nextflow.config b/modules/nf-core/multiqc/nextflow.config deleted file mode 100644 index 4e507e7..0000000 --- a/modules/nf-core/multiqc/nextflow.config +++ /dev/null @@ -1,10 +0,0 @@ -process { - withName: 'MULTIQC' { - ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } - publishDir = [ - path: { "${params.outdir}/multiqc" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } -} \ No newline at end of file diff --git a/modules/nf-core/multiqc/tests/main.nf.test b/modules/nf-core/multiqc/tests/main.nf.test index 68fffa9..c2dad21 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test +++ b/modules/nf-core/multiqc/tests/main.nf.test @@ -9,27 +9,13 @@ nextflow_process { test("MULTIQC: FASTQC") { - setup { - run("FASTQC") { - script "../../fastqc/main.nf" - process { - """ - input[0] = Channel.of([ - [ id: 'test', single_end: false ], - [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)] - ]) - """ - } - } - } - when { params { outdir = "$outputDir" } process { """ - input[0] = FASTQC.out.zip.collect { it[1] } + input[0] = Channel.of([file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz_fastqc_zip'], checkIfExists: true)]) input[1] = [] input[2] = [] input[3] = [] @@ -50,27 +36,13 @@ nextflow_process { test("MULTIQC: FASTQC and a config file") { - setup { - run("FASTQC") { - script "../../fastqc/main.nf" - process { - """ - input[0] = Channel.of([ - [ id: 'test', single_end: false ], - [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)] - ]) - """ - } - } - } - when { params { outdir = "$outputDir" } process { """ - input[0] = FASTQC.out.zip.collect { it[1] } + input[0] = Channel.of([file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz_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] = [] From 34c1f753450d298dbc5e3695e1dc902650684ab8 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Tue, 5 Dec 2023 11:39:45 +0000 Subject: [PATCH 21/37] Reinstate multiqc config --- modules/nf-core/multiqc/nextflow.config | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 modules/nf-core/multiqc/nextflow.config diff --git a/modules/nf-core/multiqc/nextflow.config b/modules/nf-core/multiqc/nextflow.config new file mode 100644 index 0000000..4e507e7 --- /dev/null +++ b/modules/nf-core/multiqc/nextflow.config @@ -0,0 +1,10 @@ +process { + withName: 'MULTIQC' { + ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } + publishDir = [ + path: { "${params.outdir}/multiqc" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } +} \ No newline at end of file From 155c62917b96037b242b54d0f9b956708d430b15 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Tue, 5 Dec 2023 11:57:11 +0000 Subject: [PATCH 22/37] Revert "Remove config for test data" This reverts commit 24751945f63fcf8375b0ad11d65730a6de21f276. --- nf-test.config | 2 +- tests/nextflow.config | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 tests/nextflow.config diff --git a/nf-test.config b/nf-test.config index 2f5050c..c0ca9e3 100644 --- a/nf-test.config +++ b/nf-test.config @@ -6,7 +6,7 @@ config { workDir ".nf-test" // location of an optional nextflow.config file specific for executing tests - configFile "nextflow.config" + configFile "tests/nextflow.config" // run all test with the defined docker profile from the main nextflow.config profile "" diff --git a/tests/nextflow.config b/tests/nextflow.config new file mode 100644 index 0000000..fec66b4 --- /dev/null +++ b/tests/nextflow.config @@ -0,0 +1 @@ +includeConfig 'https://raw.githubusercontent.com/nf-core/modules/47ad5f5402a5125c6c6f6107abc9a8732ce7dd12/tests/config/test_data.config' \ No newline at end of file From 23c0a057f5b483697ec91b149730170a2dcd9ec8 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Tue, 5 Dec 2023 12:03:36 +0000 Subject: [PATCH 23/37] Bump modules sha for test data --- tests/nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/nextflow.config b/tests/nextflow.config index fec66b4..c6d5e48 100644 --- a/tests/nextflow.config +++ b/tests/nextflow.config @@ -1 +1 @@ -includeConfig 'https://raw.githubusercontent.com/nf-core/modules/47ad5f5402a5125c6c6f6107abc9a8732ce7dd12/tests/config/test_data.config' \ No newline at end of file +includeConfig 'https://raw.githubusercontent.com/nf-core/modules/ 0094ae45ba8f5a2e30644d4e252970775a03ee91/tests/config/test_data.config' From 13e6b4bfc354c4da8ee77f2a7044ba49f438df4d Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Tue, 5 Dec 2023 12:04:00 +0000 Subject: [PATCH 24/37] Fix typo --- tests/nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/nextflow.config b/tests/nextflow.config index c6d5e48..350286b 100644 --- a/tests/nextflow.config +++ b/tests/nextflow.config @@ -1 +1 @@ -includeConfig 'https://raw.githubusercontent.com/nf-core/modules/ 0094ae45ba8f5a2e30644d4e252970775a03ee91/tests/config/test_data.config' +includeConfig 'https://raw.githubusercontent.com/nf-core/modules/0094ae45ba8f5a2e30644d4e252970775a03ee91/tests/config/test_data.config' From 7daa4e88e7b14d4c6fd729b871d933d6ecfb2a9f Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Tue, 5 Dec 2023 18:51:11 +0000 Subject: [PATCH 25/37] Try again to bypass the filtering --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 535b431..8392885 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,8 +23,7 @@ jobs: name: Check for changes runs-on: ubuntu-latest outputs: - # Expose matched filters as job 'tags' output variable - tags: ${{ steps.filter.outputs.changes }} + tags: ${{ steps.get_tags.outputs.tags }} steps: - uses: actions/checkout@v3 - name: Combine all tags.yml files @@ -32,10 +31,11 @@ jobs: run: find . -name "tags.yml" -not -path "./.github/*" -exec cat {} + > .github/tags.yml - name: debug run: cat .github/tags.yml - - uses: dorny/paths-filter@v2 - id: filter + - name: Get tags using yq + id: get_tags + uses: mikefarah/yq@master with: - filters: ".github/tags.yml" + cmd: 'echo "tags=$(yq -e ". | keys | tojson" .github/tags.yml)" >> $GITHUB_ENV' nf-test: name: nf-test ${{ matrix.tags }} ${{ matrix.profile }} @@ -50,7 +50,7 @@ jobs: NXF_VER: - "23.10.0" - "latest-everything" - tags: ["${{ fromJson(needs.changes.outputs.tags) }}"] + tags: ${{ fromJson(needs.changes.outputs.tags) }} profile: - "docker" From 7f87368655d0699203c3aae98a37e00ecdc6b81f Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Tue, 5 Dec 2023 19:38:45 +0000 Subject: [PATCH 26/37] Fix env -> out --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8392885..9446895 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: id: get_tags uses: mikefarah/yq@master with: - cmd: 'echo "tags=$(yq -e ". | keys | tojson" .github/tags.yml)" >> $GITHUB_ENV' + cmd: 'echo "tags=$(yq -e ". | keys | tojson" .github/tags.yml)" >> $GITHUB_OUTPUT' nf-test: name: nf-test ${{ matrix.tags }} ${{ matrix.profile }} From 651eda4005a4fedff5cbba7a4724df9eb7753a3d Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Tue, 5 Dec 2023 19:45:33 +0000 Subject: [PATCH 27/37] Fix output bit --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9446895..2d547df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,8 +34,9 @@ jobs: - name: Get tags using yq id: get_tags uses: mikefarah/yq@master - with: - cmd: 'echo "tags=$(yq -e ". | keys | tojson" .github/tags.yml)" >> $GITHUB_OUTPUT' + run: | + tags="$(yq -e '. | keys | tojson' .github/tags.yml)" + echo "tags=$tags" >> "$GITHUB_OUTPUT" nf-test: name: nf-test ${{ matrix.tags }} ${{ matrix.profile }} From 19f42db9f298a10f04ee74c07d2b1a6893f63900 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Tue, 5 Dec 2023 19:51:52 +0000 Subject: [PATCH 28/37] fix up yq actions usage --- .github/workflows/ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d547df..56c877e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: name: Check for changes runs-on: ubuntu-latest outputs: - tags: ${{ steps.get_tags.outputs.tags }} + tags: ${{ steps.get_tags.outputs.result }} steps: - uses: actions/checkout@v3 - name: Combine all tags.yml files @@ -34,9 +34,8 @@ jobs: - name: Get tags using yq id: get_tags uses: mikefarah/yq@master - run: | - tags="$(yq -e '. | keys | tojson' .github/tags.yml)" - echo "tags=$tags" >> "$GITHUB_OUTPUT" + with: + cmd: yq -e '. | keys | tojson' .github/tags.yml nf-test: name: nf-test ${{ matrix.tags }} ${{ matrix.profile }} From ec14aa0e3f81695a5e0ef4940a813522b4d5ee1b Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Tue, 5 Dec 2023 20:13:23 +0000 Subject: [PATCH 29/37] Tweaks --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56c877e..07952f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ concurrency: jobs: changes: - name: Check for changes + name: Find tags to test runs-on: ubuntu-latest outputs: tags: ${{ steps.get_tags.outputs.result }} @@ -38,7 +38,7 @@ jobs: cmd: yq -e '. | keys | tojson' .github/tags.yml nf-test: - name: nf-test ${{ matrix.tags }} ${{ matrix.profile }} + name: nf-test ${{ matrix.tags }} ${{ matrix.profile }} nf-${{ matrix.NXF_VER }} needs: [changes] if: needs.changes.outputs.tags != '[]' runs-on: ubuntu-latest @@ -80,7 +80,7 @@ jobs: - name: Run nf-test run: | - nf-test test --tag ${{ matrix.tags }} --profile "test,${{ matrix.profile }}" --junitxml=test.xml + nf-test test --tag ${{ matrix.tags }} --profile "test,${{ matrix.profile }}" --junitxml=test.xml --verbose - name: Output log on failure if: failure() From dec50d59e33bee1e311990a465fd2b0db014bc4d Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Wed, 6 Dec 2023 10:52:06 +0000 Subject: [PATCH 30/37] Remove reports from nf-test configuration --- tests/nextflow.config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/nextflow.config b/tests/nextflow.config index 350286b..fc1e56c 100644 --- a/tests/nextflow.config +++ b/tests/nextflow.config @@ -1 +1,6 @@ includeConfig 'https://raw.githubusercontent.com/nf-core/modules/0094ae45ba8f5a2e30644d4e252970775a03ee91/tests/config/test_data.config' + +timeline.enabled = false +report.enabled = false +trace.enabled = false +dag.enabled = false \ No newline at end of file From 68ccda2728db5bfaa236e9fc5b7234d0bf19c0a0 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Wed, 6 Dec 2023 11:50:02 +0000 Subject: [PATCH 31/37] Remove params from nf-aggregate workflow --- main.nf | 5 ++++- workflows/nf_aggregate/main.nf | 9 ++++++--- workflows/nf_aggregate/tests/main.nf.test | 3 +++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/main.nf b/main.nf index 003d43f..b979634 100644 --- a/main.nf +++ b/main.nf @@ -43,7 +43,10 @@ workflow { NF_AGGREGATE ( PIPELINE_INITIALISATION.out.ids, ch_multiqc_custom_config, - ch_multiqc_logo + ch_multiqc_logo, + params.seqera_api_endpoint, + params.skip_run_gantt, + params.skip_multiqc ) } diff --git a/workflows/nf_aggregate/main.nf b/workflows/nf_aggregate/main.nf index 9658be4..8208174 100644 --- a/workflows/nf_aggregate/main.nf +++ b/workflows/nf_aggregate/main.nf @@ -16,6 +16,9 @@ workflow NF_AGGREGATE { ids // channel: run ids read in from --input multiqc_custom_config // channel: user specified custom config file used by MultiQC multiqc_logo // channel: logo rendered in MultiQC report + seqera_api_endpoint // val: Seqera Platform API endpoint URL + skip_run_gantt // val: Skip GANTT chart creation for each run + skip_multiqc // val: Skip MultiQC main: @@ -27,14 +30,14 @@ workflow NF_AGGREGATE { // SEQERA_RUNS_DUMP ( ids, - params.seqera_api_endpoint + seqera_api_endpoint ) ch_versions = ch_versions.mix(SEQERA_RUNS_DUMP.out.versions.first()) // // MODULE: Generate Gantt chart for workflow execution // - if (!params.skip_run_gantt) { + if (!skip_run_gantt) { PLOT_RUN_GANTT ( SEQERA_RUNS_DUMP.out.run_dump ) @@ -55,7 +58,7 @@ workflow NF_AGGREGATE { // MODULE: MultiQC // ch_multiqc_report = Channel.empty() - if (!params.skip_multiqc) { + if (!skip_multiqc) { ch_multiqc_config = Channel.fromPath("$projectDir/workflows/nf_aggregate/assets/multiqc_config.yml", checkIfExists: true) summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") ch_workflow_summary = Channel.value(paramsSummaryMultiqc(summary_params)) diff --git a/workflows/nf_aggregate/tests/main.nf.test b/workflows/nf_aggregate/tests/main.nf.test index ac5f6d7..1243975 100644 --- a/workflows/nf_aggregate/tests/main.nf.test +++ b/workflows/nf_aggregate/tests/main.nf.test @@ -19,6 +19,9 @@ nextflow_workflow { input[0] = ['id': '4Bi5xBK6E2Nbhj', 'workspace': 'community/showcase'] input[1] = [] input[2] = [] + input[3] = 'https://api.tower.nf' + input[4] = false + input[5] = false """ } } From d5cd84899ac19b36740f8e54dce8d9033ede3db7 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Wed, 6 Dec 2023 11:53:21 +0000 Subject: [PATCH 32/37] Remove explicit params.publish_dir_mode definition in tests --- modules/local/plot_run_gantt/tests/main.nf.test | 4 ---- modules/local/seqera_runs_dump/tests/main.nf.test | 3 --- 2 files changed, 7 deletions(-) diff --git a/modules/local/plot_run_gantt/tests/main.nf.test b/modules/local/plot_run_gantt/tests/main.nf.test index bacc703..712ed7c 100644 --- a/modules/local/plot_run_gantt/tests/main.nf.test +++ b/modules/local/plot_run_gantt/tests/main.nf.test @@ -23,11 +23,7 @@ nextflow_process { } when { - params { - publish_dir_mode = "copy" - } process { - """ input[0] = SEQERA_RUNS_DUMP.out.run_dump """ diff --git a/modules/local/seqera_runs_dump/tests/main.nf.test b/modules/local/seqera_runs_dump/tests/main.nf.test index ccce4ce..9d90498 100644 --- a/modules/local/seqera_runs_dump/tests/main.nf.test +++ b/modules/local/seqera_runs_dump/tests/main.nf.test @@ -11,9 +11,6 @@ nextflow_process { test("Should run without failures") { when { - params { - publish_dir_mode = "copy" - } process { """ input[0] = ['id': '4Bi5xBK6E2Nbhj', 'workspace': 'community/showcase'] From d9521fa1f4c743f92e9643ab8b01f5f232167c81 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Wed, 6 Dec 2023 12:05:40 +0000 Subject: [PATCH 33/37] Update UTILS_NFVALIDATION_PLUGIN subworkflow --- modules.json | 2 +- .../nf-core/utils_nfvalidation_plugin/tests/main.nf.test | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules.json b/modules.json index d650ecf..eecf5c4 100644 --- a/modules.json +++ b/modules.json @@ -21,7 +21,7 @@ }, "utils_nfvalidation_plugin": { "branch": "master", - "git_sha": "c81784b47d44464b35e04220e00051bb5be27524", + "git_sha": "f0f8f4dc889970251eb251b85610f7ec2eafded9", "installed_by": ["subworkflows"] } } diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test index f95b967..904f97b 100644 --- a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test +++ b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test @@ -3,8 +3,10 @@ nextflow_workflow { name "Test Workflow UTILS_NFVALIDATION_PLUGIN" script "../main.nf" workflow "UTILS_NFVALIDATION_PLUGIN" - tag "subworkflow" - tag "subworkflow_nfcore" + tag "subworkflows" + tag "subworkflows_nfcore" + tag "plugin/nf-validation" + tag "'plugin/nf-validation'" tag "utils_nfvalidation_plugin" tag "subworkflows/utils_nfvalidation_plugin" @@ -168,6 +170,7 @@ nextflow_workflow { params { monochrome_logs = true test_data = '' + outdir = 1 } workflow { """ @@ -191,7 +194,6 @@ nextflow_workflow { then { assert workflow.failed assert workflow.stdout.any { it.contains('ERROR ~ ERROR: Validation of pipeline parameters failed!') } - assert workflow.stdout.any { it.contains('The following invalid input values have been detected:') } } } From 64fb120a8b04f68171935bef000a028e31606ddf Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Wed, 6 Dec 2023 12:20:26 +0000 Subject: [PATCH 34/37] Add final CI test to confirm all nf-tests passed --- .github/workflows/ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07952f2..faa0742 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,3 +93,21 @@ jobs: if: always() # always run even if the previous step fails with: report_paths: test.xml + + confirm-pass: + runs-on: ubuntu-latest + needs: [changes, nf-test] + if: always() + steps: + - name: All tests ok + if: ${{ success() || !contains(needs.*.result, 'failure') }} + run: exit 0 + - name: One or more tests failed + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 + + - name: debug-print + if: always() + run: | + echo "toJSON(needs) = ${{ toJSON(needs) }}" + echo "toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}" From 20d8a3a76ce2d49886e0f31847f6fd744ffa666b Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Wed, 6 Dec 2023 15:55:34 +0000 Subject: [PATCH 35/37] Try workdir thing Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> --- nf-test.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf-test.config b/nf-test.config index c0ca9e3..0a4311a 100644 --- a/nf-test.config +++ b/nf-test.config @@ -3,7 +3,7 @@ config { testsDir "." // nf-test directory including temporary files for each test - workDir ".nf-test" + workDir { System.getenv("TMPDIR") ?: '.nf-test' } // location of an optional nextflow.config file specific for executing tests configFile "tests/nextflow.config" From 520fd129f8a6de071e0ee36ffe19b898c96a5693 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Wed, 6 Dec 2023 15:59:00 +0000 Subject: [PATCH 36/37] try tmpdir thing without closure --- nf-test.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf-test.config b/nf-test.config index 0a4311a..c7fed01 100644 --- a/nf-test.config +++ b/nf-test.config @@ -3,7 +3,7 @@ config { testsDir "." // nf-test directory including temporary files for each test - workDir { System.getenv("TMPDIR") ?: '.nf-test' } + workDir System.getenv("TMPDIR") ?: '.nf-test' // location of an optional nextflow.config file specific for executing tests configFile "tests/nextflow.config" From 9af0c7eebf25e99aaf59dad390db87df82f6f830 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Wed, 6 Dec 2023 16:22:14 +0000 Subject: [PATCH 37/37] Ignore process selector warnings by default in favour of using -profile debug --- nextflow.config | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/nextflow.config b/nextflow.config index b148b09..a14bc20 100644 --- a/nextflow.config +++ b/nextflow.config @@ -51,16 +51,13 @@ process { maxErrors = '-1' } +// Ignore process selector warnings by default +nextflow.enable.configProcessNamesValidation = false + profiles { test { params.input = "${projectDir}/workflows/nf_aggregate/assets/test_run_ids.csv" } - wave { - wave.enabled = true - wave.strategy = ['conda', 'container', 'dockerfile', 'spack'] - wave.build.repository = 'quay.io/seqeralabs/nf-aggregate' - wave.freeze = true - } test_full { params.input = "${projectDir}/workflows/nf_aggregate/assets/test_run_ids.csv" } @@ -68,6 +65,13 @@ profiles { dumpHashes = true process.beforeScript = 'echo $HOSTNAME' cleanup = false + nextflow.enable.configProcessNamesValidation = true + } + wave { + wave.enabled = true + wave.strategy = ['conda', 'container', 'dockerfile', 'spack'] + wave.build.repository = 'quay.io/seqeralabs/nf-aggregate' + wave.freeze = true } conda { conda.enabled = true