From 47ab4f28f22fa2b5233c94b24e8cbce7ba2f47ff Mon Sep 17 00:00:00 2001 From: Emilio Palumbo Date: Mon, 17 Jun 2024 20:15:52 +0200 Subject: [PATCH] Fix module and workflow tests and snapshots --- tests/modules/bigwig/rgcrg/main.nf.test.snap | 2 +- .../bigwig/star/main.bigwig.nf.test.snap | 2 +- .../bigwig/star/main.signal.nf.test.snap | 2 +- tests/modules/contig/rgcrg/main.nf.test.snap | 2 +- .../modules/inferExp/rseqc/main.nf.test.snap | 10 +-- tests/modules/mapping/gem/main.map.nf.test | 4 +- .../mapping/star/main.index.nf.test.snap | 2 +- tests/modules/mapping/star/main.map.nf.test | 4 +- .../mapping/star/main.map.nf.test.snap | 6 +- tests/modules/mergeBam/sambamba/main.nf.test | 2 +- .../mergeBam/sambamba/main.nf.test.snap | 4 +- tests/modules/mergeBam/samtools/main.nf.test | 2 +- .../mergeBam/samtools/main.nf.test.snap | 6 +- .../main.calculateExpression.nf.test.snap | 55 ------------ tests/workflows/mapping.nf.test | 4 +- .../quantification/rsem.nf.test.snap | 55 ------------ tests/workflows/signal.nf.test.snap | 88 +++++++++---------- 17 files changed, 70 insertions(+), 180 deletions(-) diff --git a/tests/modules/bigwig/rgcrg/main.nf.test.snap b/tests/modules/bigwig/rgcrg/main.nf.test.snap index c9463c5..f9b4617 100644 --- a/tests/modules/bigwig/rgcrg/main.nf.test.snap +++ b/tests/modules/bigwig/rgcrg/main.nf.test.snap @@ -27,4 +27,4 @@ }, "timestamp": "2024-04-30T19:01:02.919082" } -} +} \ No newline at end of file diff --git a/tests/modules/bigwig/star/main.bigwig.nf.test.snap b/tests/modules/bigwig/star/main.bigwig.nf.test.snap index d266711..e7f38b2 100644 --- a/tests/modules/bigwig/star/main.bigwig.nf.test.snap +++ b/tests/modules/bigwig/star/main.bigwig.nf.test.snap @@ -31,4 +31,4 @@ }, "timestamp": "2024-04-25T12:34:53.753279" } -} +} \ No newline at end of file diff --git a/tests/modules/bigwig/star/main.signal.nf.test.snap b/tests/modules/bigwig/star/main.signal.nf.test.snap index f857439..5cd8ce6 100644 --- a/tests/modules/bigwig/star/main.signal.nf.test.snap +++ b/tests/modules/bigwig/star/main.signal.nf.test.snap @@ -22,4 +22,4 @@ }, "timestamp": "2024-04-25T12:33:44.577831" } -} +} \ No newline at end of file diff --git a/tests/modules/contig/rgcrg/main.nf.test.snap b/tests/modules/contig/rgcrg/main.nf.test.snap index da78e3b..66841be 100644 --- a/tests/modules/contig/rgcrg/main.nf.test.snap +++ b/tests/modules/contig/rgcrg/main.nf.test.snap @@ -21,4 +21,4 @@ }, "timestamp": "2024-04-30T18:57:32.893994" } -} +} \ No newline at end of file diff --git a/tests/modules/inferExp/rseqc/main.nf.test.snap b/tests/modules/inferExp/rseqc/main.nf.test.snap index 9c01989..ed9bced 100644 --- a/tests/modules/inferExp/rseqc/main.nf.test.snap +++ b/tests/modules/inferExp/rseqc/main.nf.test.snap @@ -1,5 +1,5 @@ { - "Should infer strandedness from BAM (uncompressed annotation)": { + "Should infer strandedness from BAM (compressed annotation)": { "content": [ { "0": [ @@ -15,9 +15,9 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-04-18T18:54:10.824148" + "timestamp": "2024-04-18T18:54:02.195879" }, - "Should infer strandedness from BAM (compressed annotation)": { + "Should infer strandedness from BAM (uncompressed annotation)": { "content": [ { "0": [ @@ -33,6 +33,6 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-04-18T18:54:02.195879" + "timestamp": "2024-04-18T18:54:10.824148" } -} +} \ No newline at end of file diff --git a/tests/modules/mapping/gem/main.map.nf.test b/tests/modules/mapping/gem/main.map.nf.test index 09aacad..c2dbebe 100644 --- a/tests/modules/mapping/gem/main.map.nf.test +++ b/tests/modules/mapping/gem/main.map.nf.test @@ -27,7 +27,7 @@ nextflow_process { } process { """ - def fastqs = file("${baseDir}/data/test1_*.fastq.gz") + def fastqs = file("${baseDir}/data/test1_*.fastq.gz").sort() def qScore = fastq(fastqs[0]).qualityScore() input[0] = file("${baseDir}/data/annotation.gtf.gz") input[1] = index.out @@ -56,7 +56,7 @@ nextflow_process { } process { """ - def fastqs = file("${baseDir}/data/test1_*.fastq.gz") + def fastqs = file("${baseDir}/data/test1_*.fastq.gz").sort() def qScore = fastq(fastqs[0]).qualityScore() input[0] = file("${baseDir}/data/annotation.gtf") input[1] = index.out diff --git a/tests/modules/mapping/star/main.index.nf.test.snap b/tests/modules/mapping/star/main.index.nf.test.snap index dba0439..19cfa6e 100644 --- a/tests/modules/mapping/star/main.index.nf.test.snap +++ b/tests/modules/mapping/star/main.index.nf.test.snap @@ -47,4 +47,4 @@ }, "timestamp": "2024-04-17T17:20:43.134729" } -} +} \ No newline at end of file diff --git a/tests/modules/mapping/star/main.map.nf.test b/tests/modules/mapping/star/main.map.nf.test index a12090b..7442d6f 100644 --- a/tests/modules/mapping/star/main.map.nf.test +++ b/tests/modules/mapping/star/main.map.nf.test @@ -33,7 +33,7 @@ nextflow_process { input[1] = index.out input[2] = Channel.from( [ - [ "sample1", "test1", file("${baseDir}/data/test1_*.fastq.gz"), "fastq", ["fqRd1", "fqRd2"], ''] + [ "sample1", "test1", file("${baseDir}/data/test1_*.fastq.gz").sort(), "fastq", ["fqRd1", "fqRd2"], ''] ] ) """ @@ -67,7 +67,7 @@ nextflow_process { input[1] = index.out input[2] = Channel.from( [ - [ "sample1", "test1", file("${baseDir}/data/test1_*.fastq.gz"), "fastq", ["fqRd1", "fqRd2"], ''] + [ "sample1", "test1", file("${baseDir}/data/test1_*.fastq.gz").sort(), "fastq", ["fqRd1", "fqRd2"], ''] ] ) """ diff --git a/tests/modules/mapping/star/main.map.nf.test.snap b/tests/modules/mapping/star/main.map.nf.test.snap index cc27f6e..0dbecc4 100644 --- a/tests/modules/mapping/star/main.map.nf.test.snap +++ b/tests/modules/mapping/star/main.map.nf.test.snap @@ -12,7 +12,7 @@ ] ], [ - + ], [ [ @@ -54,7 +54,7 @@ ] ], [ - + ], [ [ @@ -83,4 +83,4 @@ }, "timestamp": "2024-04-23T23:11:13.889531" } -} +} \ No newline at end of file diff --git a/tests/modules/mergeBam/sambamba/main.nf.test b/tests/modules/mergeBam/sambamba/main.nf.test index 7efce46..91fab33 100644 --- a/tests/modules/mergeBam/sambamba/main.nf.test +++ b/tests/modules/mergeBam/sambamba/main.nf.test @@ -16,7 +16,7 @@ nextflow_process { process { """ input[0] = Channel.from([ - [ "sample2", [ "test2", "test3" ], file("${baseDir}/data/test*/*toGenome_sorted.bam"), "bam", "GenomeAlignments", true] + [ "sample2", [ "test2", "test3" ], file("${baseDir}/data/test*/*toGenome_sorted.bam").sort(), "bam", "GenomeAlignments", true] ]) """ } diff --git a/tests/modules/mergeBam/sambamba/main.nf.test.snap b/tests/modules/mergeBam/sambamba/main.nf.test.snap index 5426633..152ea53 100644 --- a/tests/modules/mergeBam/sambamba/main.nf.test.snap +++ b/tests/modules/mergeBam/sambamba/main.nf.test.snap @@ -6,7 +6,7 @@ [ "sample2", "test2:test3", - "sample2_m4_n10_toGenome.bam:md5,724ebe0d965d40decaa80c6b09e47ba5", + "sample2_m4_n10_toGenome.bam:md5,92d1c59a6e5b111f7a277135310415c2", "bam", "GenomeAlignments", true @@ -18,6 +18,6 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-05-02T11:08:00.400122" + "timestamp": "2024-06-17T17:22:45.897345592" } } \ No newline at end of file diff --git a/tests/modules/mergeBam/samtools/main.nf.test b/tests/modules/mergeBam/samtools/main.nf.test index 9862dbe..70c0570 100644 --- a/tests/modules/mergeBam/samtools/main.nf.test +++ b/tests/modules/mergeBam/samtools/main.nf.test @@ -16,7 +16,7 @@ nextflow_process { process { """ input[0] = Channel.from([ - [ "sample2", [ "test2", "test3" ], file("${baseDir}/data/test*/*toGenome_sorted.bam"), "bam", "GenomeAlignments", true] + [ "sample2", [ "test2", "test3" ], file("${baseDir}/data/test*/*toGenome_sorted.bam").sort() , "bam", "GenomeAlignments", true] ]) """ } diff --git a/tests/modules/mergeBam/samtools/main.nf.test.snap b/tests/modules/mergeBam/samtools/main.nf.test.snap index 899e41a..171f316 100644 --- a/tests/modules/mergeBam/samtools/main.nf.test.snap +++ b/tests/modules/mergeBam/samtools/main.nf.test.snap @@ -6,7 +6,7 @@ [ "sample2", "test2:test3", - "sample2_m4_n10_toGenome.bam:md5,1aafe9aacc6e403ed8a5466a30549c85", + "sample2_m4_n10_toGenome.bam:md5,9c721443896d97df3f2151ce5397c512", "bam", "GenomeAlignments", true @@ -16,8 +16,8 @@ ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-05-02T11:27:59.686395" + "timestamp": "2024-06-17T16:44:46.900499" } } \ No newline at end of file diff --git a/tests/modules/quantification/rsem/main.calculateExpression.nf.test.snap b/tests/modules/quantification/rsem/main.calculateExpression.nf.test.snap index e2948fb..7aa6568 100644 --- a/tests/modules/quantification/rsem/main.calculateExpression.nf.test.snap +++ b/tests/modules/quantification/rsem/main.calculateExpression.nf.test.snap @@ -1,59 +1,4 @@ { - "Should quantify with RSEM (with credibility intervals)": { - "content": [ - { - "0": [ - [ - "sample3", - "test3", - "sample3.isoforms.results:md5,a2ddfd7d7919830d69f941176ddff86f", - "tsv", - "TranscriptQuantifications", - true, - "MATE2_SENSE" - ] - ], - "1": [ - [ - "sample3", - "test3", - "sample3.genes.results:md5,568855cd154369988f0e9120660dcea6", - "tsv", - "GeneQuantifications", - true, - "MATE2_SENSE" - ] - ], - "genes": [ - [ - "sample3", - "test3", - "sample3.genes.results:md5,568855cd154369988f0e9120660dcea6", - "tsv", - "GeneQuantifications", - true, - "MATE2_SENSE" - ] - ], - "isoforms": [ - [ - "sample3", - "test3", - "sample3.isoforms.results:md5,a2ddfd7d7919830d69f941176ddff86f", - "tsv", - "TranscriptQuantifications", - true, - "MATE2_SENSE" - ] - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-30T17:37:25.520162" - }, "Should quantify with RSEM converting the input BAM file": { "content": [ { diff --git a/tests/workflows/mapping.nf.test b/tests/workflows/mapping.nf.test index 288638d..5454142 100644 --- a/tests/workflows/mapping.nf.test +++ b/tests/workflows/mapping.nf.test @@ -23,7 +23,7 @@ nextflow_workflow { input[1] = file("${baseDir}/data/annotation.gtf.gz") input[2] = Channel.from( [ - [ "sample1", "test1", file("${baseDir}/data/test1_*.fastq.gz"), "fastq", ["fqRd1", "fqRd2"], ''] + [ "sample1", "test1", file("${baseDir}/data/test1_*.fastq.gz").sort(), "fastq", ["fqRd1", "fqRd2"], ''] ] ) """ @@ -59,7 +59,7 @@ nextflow_workflow { input[1] = file("${baseDir}/data/annotation.gtf") input[2] = Channel.from( [ - [ "sample1", "test1", file("${baseDir}/data/test1_*.fastq.gz"), "fastq", ["fqRd1", "fqRd2"], ''] + [ "sample1", "test1", file("${baseDir}/data/test1_*.fastq.gz").sort(), "fastq", ["fqRd1", "fqRd2"], ''] ] ) """ diff --git a/tests/workflows/quantification/rsem.nf.test.snap b/tests/workflows/quantification/rsem.nf.test.snap index 752b7c9..6eb0d17 100644 --- a/tests/workflows/quantification/rsem.nf.test.snap +++ b/tests/workflows/quantification/rsem.nf.test.snap @@ -1,59 +1,4 @@ { - "Should run quantification with RSEM (with credibility intervals)": { - "content": [ - { - "0": [ - [ - "sample3", - "test3", - "sample3.genes.results:md5,568855cd154369988f0e9120660dcea6", - "tsv", - "GeneQuantifications", - true, - "MATE2_SENSE" - ] - ], - "1": [ - [ - "sample3", - "test3", - "sample3.isoforms.results:md5,a2ddfd7d7919830d69f941176ddff86f", - "tsv", - "TranscriptQuantifications", - true, - "MATE2_SENSE" - ] - ], - "genes": [ - [ - "sample3", - "test3", - "sample3.genes.results:md5,568855cd154369988f0e9120660dcea6", - "tsv", - "GeneQuantifications", - true, - "MATE2_SENSE" - ] - ], - "isoforms": [ - [ - "sample3", - "test3", - "sample3.isoforms.results:md5,a2ddfd7d7919830d69f941176ddff86f", - "tsv", - "TranscriptQuantifications", - true, - "MATE2_SENSE" - ] - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-30T17:55:23.922489" - }, "Should run quantification with RSEM": { "content": [ { diff --git a/tests/workflows/signal.nf.test.snap b/tests/workflows/signal.nf.test.snap index af62091..f798b01 100644 --- a/tests/workflows/signal.nf.test.snap +++ b/tests/workflows/signal.nf.test.snap @@ -1,48 +1,9 @@ { - "Should produce BED file with contigs": { - "content": [ - { - "0": [ - [ - "sample3", - "test3", - "sample3.contigs.bed:md5,89f19344b1f1a346a105f2b3f9443f9e", - "bed", - "Contigs", - true, - "MATE2_SENSE" - ] - ], - "1": [ - - ], - "bigwigs": [ - - ], - "contigs": [ - [ - "sample3", - "test3", - "sample3.contigs.bed:md5,89f19344b1f1a346a105f2b3f9443f9e", - "bed", - "Contigs", - true, - "MATE2_SENSE" - ] - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-30T18:20:00.779747" - }, "Should produce bigwig files using RGCRG tools": { "content": [ { "0": [ - + ], "1": [ [ @@ -85,7 +46,7 @@ ] ], "contigs": [ - + ] } ], @@ -99,7 +60,7 @@ "content": [ { "0": [ - + ], "1": [ [ @@ -178,7 +139,7 @@ ] ], "contigs": [ - + ] } ], @@ -187,5 +148,44 @@ "nextflow": "23.10.1" }, "timestamp": "2024-04-30T18:20:54.929343" + }, + "Should produce BED file with contigs": { + "content": [ + { + "0": [ + [ + "sample3", + "test3", + "sample3.contigs.bed:md5,89f19344b1f1a346a105f2b3f9443f9e", + "bed", + "Contigs", + true, + "MATE2_SENSE" + ] + ], + "1": [ + + ], + "bigwigs": [ + + ], + "contigs": [ + [ + "sample3", + "test3", + "sample3.contigs.bed:md5,89f19344b1f1a346a105f2b3f9443f9e", + "bed", + "Contigs", + true, + "MATE2_SENSE" + ] + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-30T18:20:00.779747" } -} +} \ No newline at end of file