From 26bfacb6206024c06714a0fb3f837de4a782ae26 Mon Sep 17 00:00:00 2001 From: Matthew Angel Date: Wed, 20 May 2026 14:42:21 -0400 Subject: [PATCH] add testing --- modules/find_switchback_reads.nf | 7 +++++++ tests/main.nf.test.snap | 12 +++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/modules/find_switchback_reads.nf b/modules/find_switchback_reads.nf index cd3f27e..248b05e 100644 --- a/modules/find_switchback_reads.nf +++ b/modules/find_switchback_reads.nf @@ -21,4 +21,11 @@ process find_switchback_reads { --metrics ${library}.switchbacks \\ --ref ${genome_fa} """ + + stub: + """ + touch ${library}.switchbacks.bam + printf 'sample\tlibrary\ttemplates\taligned_templates\tswitchback_templates\tfraction_switchbacks\tread_based_switchbacks\tmean_length\tmean_offset\ttandem_based_switchbacks\tmean_gap\n' > ${library}.switchbacks.summary.txt + printf '${library}\t${library}\t0\t0\t0\t0.0\t0\t0.0\t0.0\t0\t0.0\n' >> ${library}.switchbacks.summary.txt + """ } diff --git a/tests/main.nf.test.snap b/tests/main.nf.test.snap index 24a5025..d757b75 100644 --- a/tests/main.nf.test.snap +++ b/tests/main.nf.test.snap @@ -3,8 +3,8 @@ "content": [ { "tasksFailed": 0, - "tasksCount": 57, - "tasksSucceeded": 57 + "tasksCount": 59, + "tasksSucceeded": 59 }, [ "bwameth_file_1", @@ -356,7 +356,8 @@ "--fastqc emseq-test1.md_fastqc.zip ", "--nonconverted_read_counts emseq-test1.nonconverted_counts.for_agg.tsv ", "--tasmanian emseq-test1.tasmanian.csv ", - "--combined_mbias_records emseq-test1.combined_mbias.tsv", + "--combined_mbias_records emseq-test1.combined_mbias.tsv ", + "--fgbio_switchbacks emseq-test1.switchbacks.summary.txt", "--workflow EM-seq" ] ] @@ -371,8 +372,8 @@ "content": [ { "tasksFailed": 0, - "tasksCount": 49, - "tasksSucceeded": 49 + "tasksCount": 51, + "tasksSucceeded": 51 }, [ "bwameth_file_1", @@ -687,6 +688,7 @@ "--nonconverted_read_counts emseq-test1.nonconverted_counts.for_agg.tsv ", "--tasmanian emseq-test1.tasmanian.csv ", "--combined_mbias_records emseq-test1.combined_mbias.tsv ", + "--fgbio_switchbacks emseq-test1.switchbacks.summary.txt ", "--insert emseq-test1.insertsize_metrics", "--workflow EM-seq" ]