@@ -57,6 +57,102 @@ nextflow_process {
5757 }
5858 }
5959
60+ test("RNAseq - Feature Counts - formula + limma contrast string - interaction") {
61+ config './contrasts_interaction.config'
62+
63+ when {
64+ process {
65+ """
66+ input[0] = Channel.of([
67+ 'id': 'genotype_WT_KO',
68+ 'formula': '~ 0 + genotype',
69+ 'comparison': 'genotypeWT - genotypeKO'
70+ ])
71+ .map {
72+ tuple(it, it.variable, it.reference, it.target, it.formula, it.comparison)
73+ }
74+
75+ input[1] = Channel.of([
76+ [ id: 'test' ],
77+ file("https://github.com/nf-core/test-datasets/raw/differentialabundance/modules_testdata/variancepartition_dream/metadata.tsv", checkIfExists: true),
78+ file("https://github.com/nf-core/test-datasets/raw/differentialabundance/modules_testdata/variancepartition_dream/counts.tsv", checkIfExists: true)
79+ ])
80+
81+ ch_spikes = [[],[]]
82+ ch_lengths = [[],[]]
83+ input[2] = ch_spikes
84+ input[3] = ch_lengths
85+ """
86+ }
87+ }
88+
89+ then {
90+ assertAll(
91+ { assert process.success },
92+ { assert snapshot(
93+ process.out.results,
94+ process.out.size_factors,
95+ process.out.normalised_counts,
96+ process.out.rlog_counts,
97+ process.out.vst_counts,
98+ process.out.model,
99+ process.out.versions,
100+ file(process.out.dispersion_plot[0][1]).name,
101+ file(process.out.rdata[0][1]).name
102+ ).match() },
103+ { assert path(process.out.session_info[0][1]).text.contains("DESeq2_1.34.0") }
104+ )
105+ }
106+ }
107+
108+ test("RNAseq - Feature Counts - formula + limma contrast string - shrunken") {
109+ config './contrasts_shrink.config'
110+
111+ when {
112+ process {
113+ """
114+ input[0] = Channel.of([
115+ 'id': 'genotype_WT_KO',
116+ 'formula': '~ 0 + genotype',
117+ 'comparison': 'genotypeWT - genotypeKO'
118+ ])
119+ .map {
120+ tuple(it, it.variable, it.reference, it.target, it.formula, it.comparison)
121+ }
122+
123+ input[1] = Channel.of([
124+ [ id: 'test' ],
125+ file("https://github.com/nf-core/test-datasets/raw/differentialabundance/modules_testdata/variancepartition_dream/metadata.tsv", checkIfExists: true),
126+ file("https://github.com/nf-core/test-datasets/raw/differentialabundance/modules_testdata/variancepartition_dream/counts.tsv", checkIfExists: true)
127+ ])
128+
129+ ch_spikes = [[],[]]
130+ ch_lengths = [[],[]]
131+ input[2] = ch_spikes
132+ input[3] = ch_lengths
133+ """
134+ }
135+ }
136+
137+ then {
138+ assertAll(
139+ { assert process.success },
140+ { assert snapshot(
141+ process.out.results,
142+ process.out.size_factors,
143+ process.out.normalised_counts,
144+ process.out.rlog_counts,
145+ process.out.vst_counts,
146+ process.out.model,
147+ process.out.versions,
148+ file(process.out.dispersion_plot[0][1]).name,
149+ file(process.out.rdata[0][1]).name
150+ ).match() },
151+ { assert path(process.out.session_info[0][1]).text.contains("DESeq2_1.34.0") }
152+ )
153+ }
154+ }
155+
60156 test("mouse - contrasts - matrix") {
61157
62158 config './contrasts_matrix.config'
0 commit comments