Skip to content

Commit 63f2609

Browse files
Include decoupler testing
1 parent 0f0225b commit 63f2609

File tree

4 files changed

+270
-0
lines changed

4 files changed

+270
-0
lines changed

tests/test_rnaseq_dream.nf.test

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,34 @@ nextflow_pipeline {
6767
}
6868
}
6969

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

tests/test_rnaseq_dream.nf.test.snap

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,90 @@
9898
"nextflow": "25.04.6"
9999
},
100100
"timestamp": "2025-07-30T16:32:49.712383975"
101+
},
102+
"Test rnaseq dream profile - with decoupler": {
103+
"content": [
104+
13,
105+
{
106+
"CUSTOM_FILTERDIFFERENTIALTABLE": {
107+
"pandas": "1.5.2"
108+
},
109+
"DECOUPLER_DECOUPLER": null,
110+
"decoupler-py": "1.8.0",
111+
"GTF_TO_TABLE": {
112+
"atlas-gene-annotation-manipulation": "1.1.1"
113+
},
114+
"GUNZIP_GTF": {
115+
"gunzip": 1.1
116+
},
117+
"VALIDATOR": {
118+
"r-shinyngs": "2.2.4"
119+
},
120+
"VARIANCEPARTITION_DREAM": {
121+
"r-base": "4.3.3",
122+
"bioconductor-edger": "4.0.16",
123+
"variancePartition": "1.32.2"
124+
},
125+
"Workflow": {
126+
"nf-core/differentialabundance": "v1.6.0dev"
127+
}
128+
},
129+
[
130+
"pipeline_info",
131+
"pipeline_info/collated_versions.yml",
132+
"pipeline_info/nf_core_differentialabundance_software_versions.yml",
133+
"plots",
134+
"plots/decoupler",
135+
"plots/decoupler/dream_full_model_with_interactions_SRP254919_consensus_estimate_decoupler_plot.png",
136+
"plots/decoupler/dream_full_model_with_interactions_SRP254919_ulm_estimate_decoupler_plot.png",
137+
"plots/decoupler/dream_interaction_genotype_treatment_SRP254919_consensus_estimate_decoupler_plot.png",
138+
"plots/decoupler/dream_interaction_genotype_treatment_SRP254919_ulm_estimate_decoupler_plot.png",
139+
"plots/decoupler/dream_treatment_plus_genotype_SRP254919_consensus_estimate_decoupler_plot.png",
140+
"plots/decoupler/dream_treatment_plus_genotype_SRP254919_ulm_estimate_decoupler_plot.png",
141+
"tables",
142+
"tables/annotation",
143+
"tables/annotation/SRP254919.anno.tsv",
144+
"tables/decoupler",
145+
"tables/decoupler/dream_full_model_with_interactions_SRP254919_consensus_estimate_decoupler.tsv",
146+
"tables/decoupler/dream_full_model_with_interactions_SRP254919_consensus_pvals_decoupler.tsv",
147+
"tables/decoupler/dream_full_model_with_interactions_SRP254919_ulm_estimate_decoupler.tsv",
148+
"tables/decoupler/dream_full_model_with_interactions_SRP254919_ulm_pvals_decoupler.tsv",
149+
"tables/decoupler/dream_interaction_genotype_treatment_SRP254919_consensus_estimate_decoupler.tsv",
150+
"tables/decoupler/dream_interaction_genotype_treatment_SRP254919_consensus_pvals_decoupler.tsv",
151+
"tables/decoupler/dream_interaction_genotype_treatment_SRP254919_ulm_estimate_decoupler.tsv",
152+
"tables/decoupler/dream_interaction_genotype_treatment_SRP254919_ulm_pvals_decoupler.tsv",
153+
"tables/decoupler/dream_treatment_plus_genotype_SRP254919_consensus_estimate_decoupler.tsv",
154+
"tables/decoupler/dream_treatment_plus_genotype_SRP254919_consensus_pvals_decoupler.tsv",
155+
"tables/decoupler/dream_treatment_plus_genotype_SRP254919_ulm_estimate_decoupler.tsv",
156+
"tables/decoupler/dream_treatment_plus_genotype_SRP254919_ulm_pvals_decoupler.tsv",
157+
"tables/differential",
158+
"tables/differential/full_model_with_interactions_SRP254919.dream.results.tsv",
159+
"tables/differential/full_model_with_interactions_SRP254919.dream.results_filtered.tsv",
160+
"tables/differential/interaction_genotype_treatment_SRP254919.dream.results.tsv",
161+
"tables/differential/interaction_genotype_treatment_SRP254919.dream.results_filtered.tsv",
162+
"tables/differential/treatment_plus_genotype_SRP254919.dream.results.tsv",
163+
"tables/differential/treatment_plus_genotype_SRP254919.dream.results_filtered.tsv"
164+
],
165+
[
166+
"SRP254919.anno.tsv:md5,c1d7f21e64bd00f845ec6545c123a1fb",
167+
"dream_full_model_with_interactions_SRP254919_consensus_estimate_decoupler.tsv:md5,e362db3b7988a6cff9138c1f3f04e158",
168+
"dream_full_model_with_interactions_SRP254919_consensus_pvals_decoupler.tsv:md5,e0a6f2bac31c0009492607ffffe039b3",
169+
"dream_full_model_with_interactions_SRP254919_ulm_estimate_decoupler.tsv:md5,a4647244f62228f23dd181708ba524cb",
170+
"dream_full_model_with_interactions_SRP254919_ulm_pvals_decoupler.tsv:md5,c90af52101c49619540ac20adbdd4073",
171+
"dream_interaction_genotype_treatment_SRP254919_consensus_estimate_decoupler.tsv:md5,568545acb5825c2cf97a8c39462db454",
172+
"dream_interaction_genotype_treatment_SRP254919_consensus_pvals_decoupler.tsv:md5,efb57ded7d4f4c3256759cef4eddab57",
173+
"dream_interaction_genotype_treatment_SRP254919_ulm_estimate_decoupler.tsv:md5,33f600b2fbc46b9c7db4bd5c052b4be0",
174+
"dream_interaction_genotype_treatment_SRP254919_ulm_pvals_decoupler.tsv:md5,585b6c763eb86100f166adcb87a6ac7a",
175+
"dream_treatment_plus_genotype_SRP254919_consensus_estimate_decoupler.tsv:md5,32063dfe8ad7dd2a7fc36144b821150c",
176+
"dream_treatment_plus_genotype_SRP254919_consensus_pvals_decoupler.tsv:md5,e248178dd7d51916e088d3666d6435bd",
177+
"dream_treatment_plus_genotype_SRP254919_ulm_estimate_decoupler.tsv:md5,8337f5394f2bca6411f8e42fb51ea015",
178+
"dream_treatment_plus_genotype_SRP254919_ulm_pvals_decoupler.tsv:md5,d49131ebbabc8ddc737c106b60d41f7a"
179+
]
180+
],
181+
"meta": {
182+
"nf-test": "0.9.2",
183+
"nextflow": "25.04.7"
184+
},
185+
"timestamp": "2025-09-22T21:26:00.353247592"
101186
}
102187
}

tests/test_rnaseq_limma.nf.test

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,34 @@ nextflow_pipeline {
100100
)
101101
}
102102
}
103+
104+
test("Test rnaseq limma profile - with decoupler") {
105+
106+
when {
107+
params {
108+
outdir = "$outputDir"
109+
functional_method = "decoupler"
110+
}
111+
}
112+
113+
then {
114+
// stable_name: All files + folders in ${params.outdir}/ with a stable name
115+
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
116+
// stable_path: All files in ${params.outdir}/ with stable content
117+
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
118+
assertAll(
119+
{ assert workflow.success},
120+
{ assert snapshot(
121+
// Number of successful tasks
122+
workflow.trace.succeeded().size(),
123+
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
124+
removeNextflowVersion("$outputDir/pipeline_info/nf_core_differentialabundance_software_versions.yml"),
125+
// All stable path name, with a relative path
126+
stable_name,
127+
// All files with stable contents
128+
stable_path
129+
).match() }
130+
)
131+
}
132+
}
103133
}

tests/test_rnaseq_limma.nf.test.snap

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,129 @@
11
{
2+
"Test rnaseq limma profile - with decoupler": {
3+
"content": [
4+
17,
5+
{
6+
"CUSTOM_FILTERDIFFERENTIALTABLE": {
7+
"pandas": "1.5.2"
8+
},
9+
"DECOUPLER_DECOUPLER": null,
10+
"decoupler-py": "1.8.0",
11+
"GTF_TO_TABLE": {
12+
"atlas-gene-annotation-manipulation": "1.1.1"
13+
},
14+
"GUNZIP_GTF": {
15+
"gunzip": 1.1
16+
},
17+
"LIMMA_DIFFERENTIAL": {
18+
"r-base": "4.3.3",
19+
"bioconductor-limma": "3.58.1"
20+
},
21+
"LIMMA_NORM": {
22+
"r-base": "4.3.3",
23+
"bioconductor-limma": "3.58.1"
24+
},
25+
"PLOT_DIFFERENTIAL": {
26+
"r-shinyngs": "2.2.4"
27+
},
28+
"PLOT_EXPLORATORY": {
29+
"r-shinyngs": "2.2.4"
30+
},
31+
"SHINYNGS_APP": {
32+
"r-shinyngs": "2.2.4"
33+
},
34+
"VALIDATOR": {
35+
"r-shinyngs": "2.2.4"
36+
},
37+
"Workflow": {
38+
"nf-core/differentialabundance": "v1.6.0dev"
39+
}
40+
},
41+
[
42+
"other",
43+
"other/limma",
44+
"other/limma/treatment_mCherry_hND6__SRP254919.MArrayLM.limma.rds",
45+
"other/limma/treatment_mCherry_hND6_sample_number_SRP254919.MArrayLM.limma.rds",
46+
"pipeline_info",
47+
"pipeline_info/collated_versions.yml",
48+
"pipeline_info/nf_core_differentialabundance_software_versions.yml",
49+
"plots",
50+
"plots/decoupler",
51+
"plots/decoupler/limma_treatment_mCherry_hND6__SRP254919_consensus_estimate_decoupler_plot.png",
52+
"plots/decoupler/limma_treatment_mCherry_hND6__SRP254919_ulm_estimate_decoupler_plot.png",
53+
"plots/decoupler/limma_treatment_mCherry_hND6_sample_number_SRP254919_consensus_estimate_decoupler_plot.png",
54+
"plots/decoupler/limma_treatment_mCherry_hND6_sample_number_SRP254919_ulm_estimate_decoupler_plot.png",
55+
"plots/differential",
56+
"plots/differential/treatment_mCherry_hND6__SRP254919",
57+
"plots/differential/treatment_mCherry_hND6__SRP254919/png",
58+
"plots/differential/treatment_mCherry_hND6__SRP254919/png/volcano.png",
59+
"plots/differential/treatment_mCherry_hND6_sample_number_SRP254919",
60+
"plots/differential/treatment_mCherry_hND6_sample_number_SRP254919/png",
61+
"plots/differential/treatment_mCherry_hND6_sample_number_SRP254919/png/volcano.png",
62+
"plots/differential/versions.yml",
63+
"plots/exploratory",
64+
"plots/exploratory/treatment",
65+
"plots/exploratory/treatment/png",
66+
"plots/exploratory/treatment/png/boxplot.png",
67+
"plots/exploratory/treatment/png/density.png",
68+
"plots/exploratory/treatment/png/mad_correlation.png",
69+
"plots/exploratory/treatment/png/pca2d.png",
70+
"plots/exploratory/treatment/png/pca3d.png",
71+
"plots/exploratory/treatment/png/sample_dendrogram.png",
72+
"plots/exploratory/versions.yml",
73+
"plots/qc",
74+
"plots/qc/treatment_mCherry_hND6__SRP254919.limma.mean_difference.png",
75+
"plots/qc/treatment_mCherry_hND6_sample_number_SRP254919.limma.mean_difference.png",
76+
"report",
77+
"report/SRP254919.html",
78+
"report/SRP254919.zip",
79+
"shinyngs_app",
80+
"shinyngs_app/SRP254919",
81+
"shinyngs_app/SRP254919/app.R",
82+
"shinyngs_app/SRP254919/data.rds",
83+
"shinyngs_app/versions.yml",
84+
"tables",
85+
"tables/annotation",
86+
"tables/annotation/SRP254919.anno.tsv",
87+
"tables/decoupler",
88+
"tables/decoupler/limma_treatment_mCherry_hND6__SRP254919_consensus_estimate_decoupler.tsv",
89+
"tables/decoupler/limma_treatment_mCherry_hND6__SRP254919_consensus_pvals_decoupler.tsv",
90+
"tables/decoupler/limma_treatment_mCherry_hND6__SRP254919_ulm_estimate_decoupler.tsv",
91+
"tables/decoupler/limma_treatment_mCherry_hND6__SRP254919_ulm_pvals_decoupler.tsv",
92+
"tables/decoupler/limma_treatment_mCherry_hND6_sample_number_SRP254919_consensus_estimate_decoupler.tsv",
93+
"tables/decoupler/limma_treatment_mCherry_hND6_sample_number_SRP254919_consensus_pvals_decoupler.tsv",
94+
"tables/decoupler/limma_treatment_mCherry_hND6_sample_number_SRP254919_ulm_estimate_decoupler.tsv",
95+
"tables/decoupler/limma_treatment_mCherry_hND6_sample_number_SRP254919_ulm_pvals_decoupler.tsv",
96+
"tables/differential",
97+
"tables/differential/treatment_mCherry_hND6__SRP254919.limma.results.tsv",
98+
"tables/differential/treatment_mCherry_hND6__SRP254919.limma.results_filtered.tsv",
99+
"tables/differential/treatment_mCherry_hND6_sample_number_SRP254919.limma.results.tsv",
100+
"tables/differential/treatment_mCherry_hND6_sample_number_SRP254919.limma.results_filtered.tsv",
101+
"tables/processed_abundance",
102+
"tables/processed_abundance/all.normalised_counts.tsv"
103+
],
104+
[
105+
"versions.yml:md5,225ced8832439345efa781c726cf2e5c",
106+
"versions.yml:md5,d5f6ad8fe6242dcd75bc62b654d1d211",
107+
"app.R:md5,bedcfc45b6cdcc2b8fe3627987e2b17a",
108+
"versions.yml:md5,b3436c10ff83d0dab55060de3cae3ef2",
109+
"SRP254919.anno.tsv:md5,c1d7f21e64bd00f845ec6545c123a1fb",
110+
"limma_treatment_mCherry_hND6__SRP254919_consensus_estimate_decoupler.tsv:md5,a620d9e50bb80a940a1d625c156db57d",
111+
"limma_treatment_mCherry_hND6__SRP254919_consensus_pvals_decoupler.tsv:md5,0277a05f838537294818d929a00f3a51",
112+
"limma_treatment_mCherry_hND6__SRP254919_ulm_estimate_decoupler.tsv:md5,93e9f630eeb2b18aa7f9ee8368f87ae9",
113+
"limma_treatment_mCherry_hND6__SRP254919_ulm_pvals_decoupler.tsv:md5,5126f48f59bf1043076699f0677700bd",
114+
"limma_treatment_mCherry_hND6_sample_number_SRP254919_consensus_estimate_decoupler.tsv:md5,40d606009fd45e6e905b5c0284df720e",
115+
"limma_treatment_mCherry_hND6_sample_number_SRP254919_consensus_pvals_decoupler.tsv:md5,b58b5606148076511354925719d2476c",
116+
"limma_treatment_mCherry_hND6_sample_number_SRP254919_ulm_estimate_decoupler.tsv:md5,9156bed5878264a8ca2d543b3d2b73cf",
117+
"limma_treatment_mCherry_hND6_sample_number_SRP254919_ulm_pvals_decoupler.tsv:md5,b1eebaaa790893da0af00dc311a09236",
118+
"all.normalised_counts.tsv:md5,534f0f37e10325163656cad95418f34a"
119+
]
120+
],
121+
"meta": {
122+
"nf-test": "0.9.2",
123+
"nextflow": "25.04.7"
124+
},
125+
"timestamp": "2025-09-22T21:38:20.091516183"
126+
},
2127
"Test rnaseq limma profile": {
3128
"content": [
4129
22,

0 commit comments

Comments
 (0)