From 40bf98332c86f93c6b717b3296e50b423cd68152 Mon Sep 17 00:00:00 2001 From: Sateesh Date: Thu, 12 Dec 2024 14:51:29 +0000 Subject: [PATCH] fix fastq_fastqc_umitools_fastp subworkflow --- .../fastq_fastqc_umitools_fastp/main.nf | 73 +- .../tests/main.nf.test | 531 ++++---- .../tests/main.nf.test.snap | 1104 ++++++++--------- .../tests/nextflow.config | 5 + .../tests/nextflow.save_trimmed.config | 6 - .../tests/tags.yml | 2 - 6 files changed, 870 insertions(+), 851 deletions(-) delete mode 100644 subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/nextflow.save_trimmed.config delete mode 100644 subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/tags.yml diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/main.nf b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/main.nf index 9c355a5e328..304a40bd142 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/main.nf +++ b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/main.nf @@ -1,7 +1,6 @@ // // Read QC, UMI extraction and trimming // - include { FASTQC as FASTQC_RAW } from '../../../modules/nf-core/fastqc/main' include { FASTQC as FASTQC_TRIM } from '../../../modules/nf-core/fastqc/main' include { UMITOOLS_EXTRACT } from '../../../modules/nf-core/umitools/extract/main' @@ -10,26 +9,31 @@ include { FASTP } from '../../../modules/nf-core/fastp/main' // // Function that parses fastp json output file to get total number of reads after trimming // -import groovy.json.JsonSlurper def getFastpReadsAfterFiltering(json_file, min_num_reads) { if ( workflow.stubRun ) { return min_num_reads } - def Map json = (Map) new JsonSlurper().parseText(json_file.text).get('summary') + def json = new groovy.json.JsonSlurper().parseText(json_file.text).get('summary') return json['after_filtering']['total_reads'].toLong() } -def getFastpAdapterSequence(json_file){ - - if ( workflow.stubRun ) { return "" } +def getFastpAdapterSequence(json_file) { + // Handle stub runs + if (workflow.stubRun) { + return "" + } - def Map json = (Map) new JsonSlurper().parseText(json_file.text) - try{ - adapter = json['adapter_cutting']['read1_adapter_sequence'] - } catch(Exception ex){ - adapter = "" + // Ensure the input file is valid and parse the JSON + def adapter = "" + try { + def json = new groovy.json.JsonSlurper().parseText(json_file.text) + adapter = json?.adapter_cutting?.read1_adapter_sequence ?: "" + } catch (Exception ex) { + // Log the exception or handle it as needed + println "Error parsing JSON or retrieving adapter sequence: ${ex.message}" } + return adapter } @@ -47,9 +51,20 @@ workflow FASTQ_FASTQC_UMITOOLS_FASTP { min_trimmed_reads // integer: > 0 main: - ch_versions = Channel.empty() - fastqc_raw_html = Channel.empty() - fastqc_raw_zip = Channel.empty() + ch_versions = Channel.empty() + fastqc_raw_html = Channel.empty() + fastqc_raw_zip = Channel.empty() + umi_log = Channel.empty() + trim_json = Channel.empty() + trim_html = Channel.empty() + trim_log = Channel.empty() + trim_reads_fail = Channel.empty() + trim_reads_merged = Channel.empty() + fastqc_trim_html = Channel.empty() + fastqc_trim_zip = Channel.empty() + trim_read_count = Channel.empty() + adapter_seq = Channel.empty() + if (!skip_fastqc) { FASTQC_RAW ( reads @@ -60,7 +75,6 @@ workflow FASTQ_FASTQC_UMITOOLS_FASTP { } umi_reads = reads - umi_log = Channel.empty() if (with_umi && !skip_umi_extract) { UMITOOLS_EXTRACT ( reads @@ -75,24 +89,14 @@ workflow FASTQ_FASTQC_UMITOOLS_FASTP { .out .reads .map { - meta, reads -> - meta.single_end ? [ meta, reads ] : [ meta + [single_end: true], reads[umi_discard_read % 2] ] + meta, _reads -> + meta.single_end ? [ meta, _reads ] : [ meta + [single_end: true], _reads[umi_discard_read % 2] ] } .set { umi_reads } } } - trim_reads = umi_reads - trim_json = Channel.empty() - trim_html = Channel.empty() - trim_log = Channel.empty() - trim_reads_fail = Channel.empty() - trim_reads_merged = Channel.empty() - fastqc_trim_html = Channel.empty() - fastqc_trim_zip = Channel.empty() - trim_read_count = Channel.empty() - adapter_seq = Channel.empty() - + trim_reads = umi_reads if (!skip_trimming) { FASTP ( umi_reads, @@ -115,16 +119,16 @@ workflow FASTQ_FASTQC_UMITOOLS_FASTP { .out .reads .join(trim_json) - .map { meta, reads, json -> [ meta, reads, getFastpReadsAfterFiltering(json, min_trimmed_reads.toLong()) ] } + .map { meta, _reads, json -> [ meta, _reads, getFastpReadsAfterFiltering(json, min_trimmed_reads.toLong()) ] } .set { ch_num_trimmed_reads } ch_num_trimmed_reads - .filter { meta, reads, num_reads -> num_reads >= min_trimmed_reads.toLong() } - .map { meta, reads, num_reads -> [ meta, reads ] } + .filter { meta, _reads, num_reads -> num_reads >= min_trimmed_reads.toLong() } + .map { meta, _reads, num_reads -> [ meta, _reads ] } .set { trim_reads } ch_num_trimmed_reads - .map { meta, reads, num_reads -> [ meta, num_reads ] } + .map { meta, _reads, num_reads -> [ meta, num_reads ] } .set { trim_read_count } trim_json @@ -143,22 +147,17 @@ workflow FASTQ_FASTQC_UMITOOLS_FASTP { emit: reads = trim_reads // channel: [ val(meta), [ reads ] ] - fastqc_raw_html // channel: [ val(meta), [ html ] ] fastqc_raw_zip // channel: [ val(meta), [ zip ] ] - umi_log // channel: [ val(meta), [ log ] ] adapter_seq // channel: [ val(meta), [ adapter_seq] ] - trim_json // channel: [ val(meta), [ json ] ] trim_html // channel: [ val(meta), [ html ] ] trim_log // channel: [ val(meta), [ log ] ] trim_reads_fail // channel: [ val(meta), [ fastq.gz ] ] trim_reads_merged // channel: [ val(meta), [ fastq.gz ] ] trim_read_count // channel: [ val(meta), val(count) ] - fastqc_trim_html // channel: [ val(meta), [ html ] ] fastqc_trim_zip // channel: [ val(meta), [ zip ] ] - versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test index 48ba5f48b30..edf325e6e96 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test @@ -17,8 +17,7 @@ nextflow_workflow { test("sarscov2 paired-end [fastq]") { when { - workflow { - """ + params { skip_fastqc = false with_umi = false skip_umi_extract = false @@ -28,7 +27,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = false min_trimmed_reads = 1 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -36,15 +38,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -73,11 +75,10 @@ nextflow_workflow { } } - test("skip_fastqc") { + test("sarscov2 paired-end [fastq] | skip_fastqc") { when { - workflow { - """ + params { skip_fastqc = true with_umi = false skip_umi_extract = false @@ -87,7 +88,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = false min_trimmed_reads = 1 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end: false ], // meta map [ @@ -95,15 +99,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -132,11 +136,10 @@ nextflow_workflow { } } - test("with_umi") { + test("sarscov2 paired-end [fastq] | with_umi") { when { - workflow { - """ + params { skip_fastqc = false with_umi = true skip_umi_extract = false @@ -146,7 +149,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = false min_trimmed_reads = 1 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -154,15 +160,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -191,11 +197,10 @@ nextflow_workflow { } - test("skip_umi_extract") { + test("sarscov2 paired-end [fastq] | skip_umi_extract") { when { - workflow { - """ + params { skip_fastqc = false with_umi = true skip_umi_extract = true @@ -205,7 +210,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = false min_trimmed_reads = 1 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -213,15 +221,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -250,11 +258,10 @@ nextflow_workflow { } } - test("umi_discard_read = 2") { + test("sarscov2 paired-end [fastq] | umi_discard_read = 2") { when { - workflow { - """ + params { skip_fastqc = false with_umi = true skip_umi_extract = true @@ -264,7 +271,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = false min_trimmed_reads = 1 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -272,15 +282,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -309,11 +319,10 @@ nextflow_workflow { } } - test("skip_trimming") { + test("sarscov2 paired-end [fastq] | skip_trimming") { when { - workflow { - """ + params { skip_fastqc = false with_umi = false skip_umi_extract = false @@ -323,7 +332,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = false min_trimmed_reads = 1 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -331,15 +343,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -369,13 +381,10 @@ nextflow_workflow { } } - test("save_trimmed_fail") { - - config './nextflow.save_trimmed.config' + test("sarscov2 paired-end [fastq] | save_trimmed_fail") { when { - workflow { - """ + params { skip_fastqc = false with_umi = false skip_umi_extract = false @@ -385,7 +394,10 @@ nextflow_workflow { save_trimmed_fail = true save_merged = false min_trimmed_reads = 1 - + fastp_args = "-e 30" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -393,15 +405,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -430,11 +442,10 @@ nextflow_workflow { } } - test("save_merged") { + test("sarscov2 paired-end [fastq] | save_merged") { when { - workflow { - """ + params { skip_fastqc = false with_umi = false skip_umi_extract = false @@ -444,7 +455,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = true min_trimmed_reads = 1 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -452,15 +466,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -489,12 +503,11 @@ nextflow_workflow { } } - test("min_trimmed_reads = 26") { + test("sarscov2 paired-end [fastq] | min_trimmed_reads = 26") { // Subworkflow should stop after FASTP which trims down to 25 reads when { - workflow { - """ + params { skip_fastqc = false with_umi = false skip_umi_extract = false @@ -504,7 +517,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = true min_trimmed_reads = 26 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -512,15 +528,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -550,12 +566,10 @@ nextflow_workflow { } test("sarscov2 paired-end [fastq] - stub") { - - options '-stub' + options '-stub-run' when { - workflow { - """ + params { skip_fastqc = false with_umi = false skip_umi_extract = false @@ -565,7 +579,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = false min_trimmed_reads = 1 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -573,15 +590,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -594,13 +611,11 @@ nextflow_workflow { } } - test("skip_fastqc - stub") { - - options "-stub" + test("sarscov2 paired-end [fastq] | skip_fastqc - stub") { + options "-stub-run" when { - workflow { - """ + params { skip_fastqc = true with_umi = false skip_umi_extract = false @@ -610,7 +625,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = false min_trimmed_reads = 1 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end: false ], // meta map [ @@ -618,15 +636,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -639,13 +657,11 @@ nextflow_workflow { } } - test("with_umi - stub") { - - options "-stub" + test("sarscov2 paired-end [fastq] | with_umi - stub") { + options "-stub-run" when { - workflow { - """ + params { skip_fastqc = false with_umi = true skip_umi_extract = false @@ -655,7 +671,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = false min_trimmed_reads = 1 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -663,15 +682,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -685,13 +704,11 @@ nextflow_workflow { } - test("skip_umi_extract - stub") { - - options "-stub" + test("sarscov2 paired-end [fastq] | skip_umi_extract - stub") { + options "-stub-run" when { - workflow { - """ + params { skip_fastqc = false with_umi = true skip_umi_extract = true @@ -701,7 +718,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = false min_trimmed_reads = 1 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -709,15 +729,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -730,13 +750,11 @@ nextflow_workflow { } } - test("umi_discard_read = 2 - stub") { - - options "-stub" + test("sarscov2 paired-end [fastq] | umi_discard_read = 2 - stub") { + options "-stub-run" when { - workflow { - """ + params { skip_fastqc = false with_umi = true skip_umi_extract = true @@ -746,7 +764,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = false min_trimmed_reads = 1 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -754,15 +775,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -775,13 +796,11 @@ nextflow_workflow { } } - test("skip_trimming - stub") { - - options "-stub" + test("sarscov2 paired-end [fastq] | skip_trimming - stub") { + options "-stub-run" when { - workflow { - """ + params { skip_fastqc = false with_umi = false skip_umi_extract = false @@ -791,7 +810,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = false min_trimmed_reads = 1 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -799,15 +821,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -833,15 +855,11 @@ nextflow_workflow { } } - test("save_trimmed_fail - stub") { - - options "-stub" - - config './nextflow.save_trimmed.config' + test("sarscov2 paired-end [fastq] | save_trimmed_fail - stub") { + options "-stub-run" when { - workflow { - """ + params { skip_fastqc = false with_umi = false skip_umi_extract = false @@ -851,7 +869,10 @@ nextflow_workflow { save_trimmed_fail = true save_merged = false min_trimmed_reads = 1 - + fastp_args = "-e 30" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -859,15 +880,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -880,13 +901,11 @@ nextflow_workflow { } } - test("save_merged - stub") { - - options "-stub" + test("sarscov2 paired-end [fastq] | save_merged - stub") { + options "-stub-run" when { - workflow { - """ + params { skip_fastqc = false with_umi = false skip_umi_extract = false @@ -896,7 +915,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = true min_trimmed_reads = 1 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -904,15 +926,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } @@ -925,14 +947,12 @@ nextflow_workflow { } } - test("min_trimmed_reads = 26 - stub") { + test("sarscov2 paired-end [fastq] | min_trimmed_reads = 26 - stub") { // Subworkflow should stop after FASTP which trims down to 25 reads - - options "-stub" + options "-stub-run" when { - workflow { - """ + params { skip_fastqc = false with_umi = false skip_umi_extract = false @@ -942,7 +962,10 @@ nextflow_workflow { save_trimmed_fail = false save_merged = true min_trimmed_reads = 26 - + fastp_args = "" + } + workflow { + """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ @@ -950,15 +973,15 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads + input[1] = params.skip_fastqc + input[2] = params.with_umi + input[3] = params.skip_umi_extract + input[4] = params.umi_discard_read + input[5] = params.skip_trimming + input[6] = params.adapter_fasta + input[7] = params.save_trimmed_fail + input[8] = params.save_merged + input[9] = params.min_trimmed_reads """ } } diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test.snap index e7d1f51ed96..bc9b84fc5cc 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "skip_fastqc": { + "sarscov2 paired-end [fastq] | skip_umi_extract": { "content": [ [ [ @@ -28,7 +28,7 @@ "id": "test", "single_end": false }, - "test.fastp.json:md5,1e0f8e27e71728e2b63fc64086be95cd" + "test.fastp.json:md5,47a1bbd79b21721d81eb457e44fa3e3b" ] ], [ @@ -50,67 +50,53 @@ ], [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad" + "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", + "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", + "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-22T16:56:01.933832" + "timestamp": "2024-12-12T14:23:56.776685218" }, - "save_trimmed_fail": { + "sarscov2 paired-end [fastq] | with_umi": { "content": [ [ [ { "id": "test", - "single_end": false - }, - "unspecified" - ] - ], - [ - [ - { - "id": "test", - "single_end": false + "single_end": true }, - [ - "test_1.fastp.fastq.gz:md5,6ff32a64c5188b9a9192be1398c262c7", - "test_2.fastp.fastq.gz:md5,db0cb7c9977e94ac2b4b446ebd017a8a" - ] + "" ] ], [ [ { "id": "test", - "single_end": false + "single_end": true }, - "test.fastp.json:md5,4c3268ddb50ea5b33125984776aa3519" + "test.fastp.fastq.gz:md5,ba8c6c3a7ce718d9a2c5857e2edf53bc" ] ], [ [ { "id": "test", - "single_end": false + "single_end": true }, - 162 + "test.fastp.json:md5,0ed43f6b2e5361e7ed6bc3c0b5d6e89a" ] ], [ [ { "id": "test", - "single_end": false + "single_end": true }, - [ - "test.paired.fail.fastq.gz:md5,409b687c734cedd7a1fec14d316e1366", - "test_1.fail.fastq.gz:md5,4f273cf3159c13f79e8ffae12f5661f6", - "test_2.fail.fastq.gz:md5,f97b9edefb5649aab661fbc9e71fc995" - ] + 99 ] ], [ @@ -120,27 +106,22 @@ ], [ + "versions.yml:md5,01f264f78de3c6d893c449cc6d3cd721", "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-22T16:57:38.736" + "timestamp": "2024-12-12T14:23:44.160061128" }, - "skip_umi_extract": { + "sarscov2 paired-end [fastq] | skip_trimming - stub": { "content": [ [ - [ - { - "id": "test", - "single_end": false - }, - "unspecified" - ] + ], [ [ @@ -148,10 +129,7 @@ "id": "test", "single_end": false }, - [ - "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", - "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" - ] + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], [ @@ -160,17 +138,26 @@ "id": "test", "single_end": false }, - "test.fastp.json:md5,1e0f8e27e71728e2b63fc64086be95cd" + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], [ - [ - { - "id": "test", - "single_end": false - }, - 198 - ] + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ @@ -182,18 +169,16 @@ ], [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-22T16:56:47.905105" + "timestamp": "2024-12-12T14:32:15.355312216" }, - "umi_discard_read = 2": { + "sarscov2 paired-end [fastq] | umi_discard_read = 2": { "content": [ [ [ @@ -222,7 +207,7 @@ "id": "test", "single_end": false }, - "test.fastp.json:md5,1e0f8e27e71728e2b63fc64086be95cd" + "test.fastp.json:md5,47a1bbd79b21721d81eb457e44fa3e3b" ] ], [ @@ -250,12 +235,12 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-22T16:57:05.436744" + "timestamp": "2024-12-12T14:24:09.203612468" }, - "umi_discard_read = 2 - stub": { + "sarscov2 paired-end [fastq] | min_trimmed_reads = 26 - stub": { "content": [ { "0": [ @@ -285,7 +270,7 @@ "id": "test", "single_end": false }, - 1 + 26 ] ], "11": [ @@ -363,7 +348,13 @@ ], "9": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] ], "adapter_seq": [ [ @@ -455,14 +446,20 @@ "id": "test", "single_end": false }, - 1 + 26 ] ], "trim_reads_fail": [ ], "trim_reads_merged": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] ], "umi_log": [ @@ -475,72 +472,12 @@ } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:59:27.273892" - }, - "skip_trimming - stub": { - "content": [ - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-22T16:59:39.247758" + "timestamp": "2024-12-12T14:32:39.987530839" }, - "save_merged": { + "sarscov2 paired-end [fastq] | skip_fastqc": { "content": [ [ [ @@ -558,8 +495,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", - "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" + "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", + "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" ] ] ], @@ -569,7 +506,7 @@ "id": "test", "single_end": false }, - "test.fastp.json:md5,b712fd68ed0322f4bec49ff2a5237fcc" + "test.fastp.json:md5,47a1bbd79b21721d81eb457e44fa3e3b" ] ], [ @@ -578,106 +515,7 @@ "id": "test", "single_end": false }, - 75 - ] - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" - ] - ], - [ - - ], - [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:57:57.472342" - }, - "skip_trimming": { - "content": [ - [ - - ], - { - "id": "test", - "single_end": false - }, - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:57:19.875543" - }, - "with_umi": { - "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "" - ] - ], - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.fastq.gz:md5,ba8c6c3a7ce718d9a2c5857e2edf53bc" - ] - ], - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,d39c5c6d9a2e35fb60d26ced46569af6" - ] - ], - [ - [ - { - "id": "test", - "single_end": true - }, - 99 + 198 ] ], [ @@ -685,89 +523,21 @@ ], [ - ], - [ - "versions.yml:md5,01f264f78de3c6d893c449cc6d3cd721", - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:56:26.778625" - }, - "min_trimmed_reads = 26": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "unspecified" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", - "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" - ] - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,b712fd68ed0322f4bec49ff2a5237fcc" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - 75 - ] ], [ ], [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" - ] - ], - [ - - ], - [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" + "versions.yml:md5,85bd0117e5778fff18e3920972a296ad" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-22T16:58:16.36697" + "timestamp": "2024-12-12T14:23:28.044081844" }, - "min_trimmed_reads = 26 - stub": { + "sarscov2 paired-end [fastq] | skip_fastqc - stub": { "content": [ { "0": [ @@ -783,13 +553,7 @@ ] ], "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "10": [ [ @@ -797,40 +561,20 @@ "id": "test", "single_end": false }, - 26 + 1 ] ], "11": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "12": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "13": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" + "versions.yml:md5,85bd0117e5778fff18e3920972a296ad" ], "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "3": [ @@ -875,13 +619,7 @@ ], "9": [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] + ], "adapter_seq": [ [ @@ -893,40 +631,16 @@ ] ], "fastqc_raw_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "fastqc_raw_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "fastqc_trim_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "fastqc_trim_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "reads": [ [ @@ -973,47 +687,42 @@ "id": "test", "single_end": false }, - 26 + 1 ] ], "trim_reads_fail": [ ], "trim_reads_merged": [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] + ], "umi_log": [ ], "versions": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" + "versions.yml:md5,85bd0117e5778fff18e3920972a296ad" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-22T17:00:16.524361" + "timestamp": "2024-12-12T14:31:39.612937297" }, - "with_umi - stub": { + "sarscov2 paired-end [fastq] | save_merged - stub": { "content": [ { "0": [ [ { "id": "test", - "single_end": true + "single_end": false }, - "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + [ + "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] ] ], "1": [ @@ -1029,7 +738,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, 1 ] @@ -1038,7 +747,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -1047,13 +756,12 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "13": [ - "versions.yml:md5,01f264f78de3c6d893c449cc6d3cd721", "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" @@ -1068,19 +776,13 @@ ] ], "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test.umi_extract.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + ], "4": [ [ { "id": "test", - "single_end": true + "single_end": false }, "" ] @@ -1089,7 +791,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -1098,7 +800,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -1107,7 +809,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -1116,13 +818,19 @@ ], "9": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] ], "adapter_seq": [ [ { "id": "test", - "single_end": true + "single_end": false }, "" ] @@ -1149,7 +857,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -1158,7 +866,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -1167,16 +875,19 @@ [ { "id": "test", - "single_end": true + "single_end": false }, - "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + [ + "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] ] ], "trim_html": [ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -1185,7 +896,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -1194,7 +905,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -1203,7 +914,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, 1 ] @@ -1212,19 +923,18 @@ ], "trim_reads_merged": [ - - ], - "umi_log": [ [ { "id": "test", "single_end": false }, - "test.umi_extract.log:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] + ], + "umi_log": [ + ], "versions": [ - "versions.yml:md5,01f264f78de3c6d893c449cc6d3cd721", "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" @@ -1232,12 +942,12 @@ } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-22T16:58:56.42517" + "timestamp": "2024-12-12T14:32:31.825964203" }, - "skip_fastqc - stub": { + "sarscov2 paired-end [fastq] - stub": { "content": [ { "0": [ @@ -1253,7 +963,13 @@ ] ], "1": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "10": [ [ @@ -1265,16 +981,36 @@ ] ], "11": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "12": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "13": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad" + "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", + "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", + "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" ], "2": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "3": [ @@ -1331,16 +1067,40 @@ ] ], "fastqc_raw_html": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "fastqc_raw_zip": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "fastqc_trim_html": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "fastqc_trim_zip": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "reads": [ [ @@ -1400,7 +1160,9 @@ ], "versions": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad" + "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", + "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", + "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" ] } ], @@ -1408,9 +1170,9 @@ "nf-test": "0.9.0", "nextflow": "24.04.3" }, - "timestamp": "2024-07-22T16:58:41.207281" + "timestamp": "2024-07-22T16:58:29.296468" }, - "save_merged - stub": { + "sarscov2 paired-end [fastq] | umi_discard_read = 2 - stub": { "content": [ { "0": [ @@ -1518,13 +1280,7 @@ ], "9": [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] + ], "adapter_seq": [ [ @@ -1623,13 +1379,7 @@ ], "trim_reads_merged": [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] + ], "umi_log": [ @@ -1642,12 +1392,46 @@ } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-22T17:00:03.695409" + "timestamp": "2024-12-12T14:32:07.840128843" }, - "sarscov2 paired-end [fastq]": { + "sarscov2 paired-end [fastq] | skip_trimming": { + "content": [ + [ + + ], + { + "id": "test", + "single_end": false + }, + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-12T14:24:19.774510678" + }, + "sarscov2 paired-end [fastq] | save_trimmed_fail": { "content": [ [ [ @@ -1665,8 +1449,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", - "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" + "test_1.fastp.fastq.gz:md5,6ff32a64c5188b9a9192be1398c262c7", + "test_2.fastp.fastq.gz:md5,db0cb7c9977e94ac2b4b446ebd017a8a" ] ] ], @@ -1676,7 +1460,7 @@ "id": "test", "single_end": false }, - "test.fastp.json:md5,1e0f8e27e71728e2b63fc64086be95cd" + "test.fastp.json:md5,21fdf3cfd611a7959b93318f25d126e9" ] ], [ @@ -1685,11 +1469,21 @@ "id": "test", "single_end": false }, - 198 + 162 ] ], [ - + [ + { + "id": "test", + "single_end": false + }, + [ + "test.paired.fail.fastq.gz:md5,409b687c734cedd7a1fec14d316e1366", + "test_1.fail.fastq.gz:md5,4f273cf3159c13f79e8ffae12f5661f6", + "test_2.fail.fastq.gz:md5,f97b9edefb5649aab661fbc9e71fc995" + ] + ] ], [ @@ -1704,12 +1498,12 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-22T16:55:50.614571" + "timestamp": "2024-12-12T14:24:32.09683126" }, - "sarscov2 paired-end [fastq] - stub": { + "sarscov2 paired-end [fastq] | save_trimmed_fail - stub": { "content": [ { "0": [ @@ -1814,7 +1608,17 @@ ] ], "8": [ - + [ + { + "id": "test", + "single_end": false + }, + [ + "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] ], "9": [ @@ -1896,57 +1700,262 @@ ], "trim_log": [ [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "trim_read_count": [ + [ + { + "id": "test", + "single_end": false + }, + 1 + ] + ], + "trim_reads_fail": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "trim_reads_merged": [ + + ], + "umi_log": [ + + ], + "versions": [ + "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", + "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", + "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-12T14:32:23.571618376" + }, + "sarscov2 paired-end [fastq] | min_trimmed_reads = 26": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "unspecified" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", + "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" + ] + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,b913b6f0faf64d208ecc009eb765ada6" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + 75 + ] + ], + [ + + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" + ] + ], + [ + + ], + [ + "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", + "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", + "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-12T14:24:56.36378285" + }, + "sarscov2 paired-end [fastq]": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "unspecified" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", + "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" ] - ], - "trim_read_count": [ + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,47a1bbd79b21721d81eb457e44fa3e3b" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + 198 + ] + ], + [ + + ], + [ + + ], + [ + + ], + [ + "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", + "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", + "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.2" + }, + "timestamp": "2024-12-12T14:14:48.625336841" + }, + "sarscov2 paired-end [fastq] | save_merged": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "unspecified" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, [ - { - "id": "test", - "single_end": false - }, - 1 + "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", + "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" ] - ], - "trim_reads_fail": [ - - ], - "trim_reads_merged": [ - - ], - "umi_log": [ - - ], - "versions": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" ] - } + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,b913b6f0faf64d208ecc009eb765ada6" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + 75 + ] + ], + [ + + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" + ] + ], + [ + + ], + [ + "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", + "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", + "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" + ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-22T16:58:29.296468" + "timestamp": "2024-12-12T14:24:43.700668074" }, - "save_trimmed_fail - stub": { + "sarscov2 paired-end [fastq] | with_umi - stub": { "content": [ { "0": [ [ { "id": "test", - "single_end": false + "single_end": true }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], "1": [ @@ -1962,7 +1971,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, 1 ] @@ -1971,7 +1980,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -1980,12 +1989,13 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "13": [ + "versions.yml:md5,01f264f78de3c6d893c449cc6d3cd721", "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" @@ -2000,13 +2010,19 @@ ] ], "3": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.umi_extract.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "4": [ [ { "id": "test", - "single_end": false + "single_end": true }, "" ] @@ -2015,7 +2031,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -2024,7 +2040,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -2033,23 +2049,13 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "8": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] + ], "9": [ @@ -2058,7 +2064,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "" ] @@ -2085,7 +2091,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -2094,7 +2100,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -2103,19 +2109,16 @@ [ { "id": "test", - "single_end": false + "single_end": true }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], "trim_html": [ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -2124,7 +2127,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -2133,7 +2136,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -2142,31 +2145,28 @@ [ { "id": "test", - "single_end": false + "single_end": true }, 1 ] ], "trim_reads_fail": [ + + ], + "trim_reads_merged": [ + + ], + "umi_log": [ [ { "id": "test", "single_end": false }, - [ - "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] + "test.umi_extract.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ], - "trim_reads_merged": [ - - ], - "umi_log": [ - ], "versions": [ + "versions.yml:md5,01f264f78de3c6d893c449cc6d3cd721", "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" @@ -2174,12 +2174,12 @@ } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-22T16:59:51.615894" + "timestamp": "2024-12-12T14:31:50.895314014" }, - "skip_umi_extract - stub": { + "sarscov2 paired-end [fastq] | skip_umi_extract - stub": { "content": [ { "0": [ @@ -2399,9 +2399,9 @@ } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-22T16:59:12.592278" + "timestamp": "2024-12-12T14:31:59.266962739" } } \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/nextflow.config b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/nextflow.config index 0174cae5088..428b0d37c06 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/nextflow.config +++ b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/nextflow.config @@ -8,4 +8,9 @@ process { ext.prefix = { "${meta.id}.dedup" } } + // Make filtering more aggressive to make more reads fail + withName: FASTP { + ext.args = params.fastp_args + } + } diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/nextflow.save_trimmed.config b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/nextflow.save_trimmed.config deleted file mode 100644 index 21207addd75..00000000000 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/nextflow.save_trimmed.config +++ /dev/null @@ -1,6 +0,0 @@ -process { - // Make filtering more aggressive to make more reads fail - withName: FASTP { - ext.args = "-e 30" - } -} diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/tags.yml b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/tags.yml deleted file mode 100644 index 84a4b5676c8..00000000000 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -subworkflows/fastq_fastqc_umitools_fastp: - - subworkflows/nf-core/fastq_fastqc_umitools_fastp/**