Skip to content

Commit 349eecb

Browse files
committed
test: add nf-test
1 parent 696d2ce commit 349eecb

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed

tests/test_rnaseq_dream.nf.test

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,35 @@ nextflow_pipeline {
6767
}
6868
}
6969

70+
test("Test rnaseq dream profile - complex contrast - with zero intercept") {
71+
when {
72+
params {
73+
outdir = "$outputDir"
74+
contrasts_yml = "$projectDir/tests/assets/zero_intercept_contrasts.yml"
75+
}
76+
}
77+
78+
then {
79+
// stable_name: All files + folders in ${params.outdir}/ with a stable name
80+
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
81+
// stable_path: All files in ${params.outdir}/ with stable content
82+
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
83+
assertAll(
84+
{ assert workflow.success},
85+
{ assert snapshot(
86+
// Number of successful tasks
87+
workflow.trace.succeeded().size(),
88+
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
89+
removeNextflowVersion("$outputDir/pipeline_info/nf_core_differentialabundance_software_versions.yml"),
90+
// All stable path name, with a relative path
91+
stable_name,
92+
// All files with stable contents
93+
stable_path
94+
).match() }
95+
)
96+
}
97+
}
98+
7099
test("Test rnaseq dream profile - with decoupler") {
71100

72101
when {

tests/test_rnaseq_dream.nf.test.snap

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,5 +171,59 @@
171171
"nextflow": "25.04.7"
172172
},
173173
"timestamp": "2025-09-23T15:46:34.43412188"
174+
},
175+
"Test rnaseq dream profile - complex contrast - with zero intercept": {
176+
"content": [
177+
14,
178+
{
179+
"CUSTOM_FILTERDIFFERENTIALTABLE": {
180+
"pandas": "1.5.2"
181+
},
182+
"GTF_TO_TABLE": {
183+
"atlas-gene-annotation-manipulation": "1.1.1"
184+
},
185+
"GUNZIP_GTF": {
186+
"gunzip": 1.1
187+
},
188+
"VALIDATOR": {
189+
"r-shinyngs": "2.2.4"
190+
},
191+
"VARIANCEPARTITION_DREAM": {
192+
"r-base": "4.3.3",
193+
"bioconductor-edger": "4.0.16",
194+
"variancePartition": "1.32.2"
195+
},
196+
"Workflow": {
197+
"nf-core/differentialabundance": "v1.6.0dev"
198+
}
199+
},
200+
[
201+
"pipeline_info",
202+
"pipeline_info/collated_versions.yml",
203+
"pipeline_info/nf_core_differentialabundance_software_versions.yml",
204+
"tables",
205+
"tables/annotation",
206+
"tables/annotation/SRP254919.anno.tsv",
207+
"tables/differential",
208+
"tables/differential/full_model_with_interactions_SRP254919.dream.results.tsv",
209+
"tables/differential/full_model_with_interactions_SRP254919.dream.results_filtered.tsv",
210+
"tables/differential/interaction_genotype_treatment_SRP254919.dream.results.tsv",
211+
"tables/differential/interaction_genotype_treatment_SRP254919.dream.results_filtered.tsv",
212+
"tables/differential/treatment_plus_genotype_SRP254919.dream.results.tsv",
213+
"tables/differential/treatment_plus_genotype_SRP254919.dream.results_filtered.tsv",
214+
"tables/differential/zero_intercept_model_1_SRP254919.dream.results.tsv",
215+
"tables/differential/zero_intercept_model_1_SRP254919.dream.results_filtered.tsv",
216+
"tables/differential/zero_intercept_model_2_SRP254919.dream.results.tsv",
217+
"tables/differential/zero_intercept_model_2_SRP254919.dream.results_filtered.tsv"
218+
],
219+
[
220+
"SRP254919.anno.tsv:md5,c1d7f21e64bd00f845ec6545c123a1fb"
221+
]
222+
],
223+
"meta": {
224+
"nf-test": "0.9.2",
225+
"nextflow": "25.04.8"
226+
},
227+
"timestamp": "2025-10-07T12:38:36.288584939"
174228
}
175229
}

0 commit comments

Comments
 (0)