-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51c2192
commit 8aa0e56
Showing
5 changed files
with
334 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
nextflow_process { | ||
|
||
name "Test Process GPROFILER2_GOST" | ||
script "../main.nf" | ||
process "GPROFILER2_GOST" | ||
config "./nextflow.config" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "gprofiler" | ||
tag "gprofiler_gost" | ||
tag "gost" | ||
tag "gprofiler2/gost" | ||
tag "gprofiler2" | ||
|
||
test("test") { | ||
|
||
when { | ||
params{ | ||
gprofiler2_significant = true | ||
gprofiler2_measure_underrepresentation = false | ||
gprofiler2_correction_method = "gSCS" | ||
gprofiler2_evcodes = false | ||
gprofiler2_max_qval = 0.05 | ||
gprofiler2_domain_scope = "annotated" | ||
gprofiler2_min_diff = 1 | ||
report_round_digits = 4 | ||
gprofiler2_palette_name = "Blues" | ||
differential_feature_id_column = "gene_id" | ||
gprofiler2_token = null | ||
gprofiler2_organism = "mmusculus" | ||
gprofiler2_background_column = null | ||
gprofiler2_sources = null | ||
|
||
module_args = [ | ||
"--significant \"${params.gprofiler2_significant}\"", | ||
"--measure_underrepresentation \"${params.gprofiler2_measure_underrepresentation}\"", | ||
"--correction_method \"${params.gprofiler2_correction_method}\"", | ||
"--evcodes \"${params.gprofiler2_evcodes}\"", | ||
"--pval_threshold \"${params.gprofiler2_max_qval}\"", | ||
"--domain_scope ${params.gprofiler2_domain_scope}", | ||
"--min_diff \"${params.gprofiler2_min_diff}\"", | ||
"--round_digits ${params.report_round_digits}", | ||
"--palette_name \"${params.gprofiler2_palette_name}\"", | ||
((params.differential_feature_id_column == null) ? '' : "--de_id_column \"${params.differential_feature_id_column}\""), | ||
((params.gprofiler2_token == null) ? '' : "--token \"${params.gprofiler2_token}\""), | ||
((params.gprofiler2_organism == null) ? '' : "--organism \"${params.gprofiler2_organism}\""), | ||
((params.gprofiler2_background_column == null) ? '' : "--background_column \"${params.gprofiler2_background_column}\""), | ||
((params.gprofiler2_sources == null) ? '' : "--sources \"${params.gprofiler2_sources}\"") | ||
].join(' ').trim() | ||
} | ||
process { | ||
""" | ||
input[0] = [['id':'Condition_genotype_WT_KO', 'variable':'Condition genotype', 'reference':'WT', 'target':'KO', 'blocking':'batch'], file("https://github.com/nf-core/test-datasets/raw/refs/heads/differentialabundance/modules_testdata/Condition_genotype_WT_KO.deseq2.results_filtered.tsv", checkIfExists: true)] | ||
input[1] = file("https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/mus_musculus/gene_set_analysis/mh.all.v2022.1.Mm.symbols.gmt", checkIfExists: true) | ||
input[2] = file("https://github.com/nf-core/test-datasets/raw/refs/heads/differentialabundance/modules_testdata/study.filtered.tsv", checkIfExists: true) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll ( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.all_enrich, | ||
process.out.plot_png, | ||
process.out.sub_enrich, | ||
process.out.sub_plot, | ||
process.out.filtered_gmt, | ||
process.out.session_info, | ||
process.out.versions, | ||
process.out.plot_html.collect{ meta,html -> file(html).name }, //assert unstable file | ||
process.out.rds.collect{ meta,rds -> file(rds).name } //assert unstable file | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
|
||
test("stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
params{ | ||
module_args = null | ||
} | ||
process { | ||
""" | ||
input[0] = [['id':'Condition_genotype_WT_KO', 'variable':'Condition genotype', 'reference':'WT', 'target':'KO', 'blocking':'batch'], file("https://github.com/nf-core/test-datasets/raw/refs/heads/differentialabundance/modules_testdata/Condition_genotype_WT_KO.deseq2.results_filtered.tsv", checkIfExists: true)] | ||
input[1] = file("https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/mus_musculus/gene_set_analysis/mh.all.v2022.1.Mm.symbols.gmt", checkIfExists: true) | ||
input[2] = file("https://github.com/nf-core/test-datasets/raw/refs/heads/differentialabundance/modules_testdata/study.filtered.tsv", checkIfExists: true) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll ( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.all_enrich, | ||
process.out.plot_png, | ||
process.out.sub_enrich, | ||
process.out.sub_plot, | ||
process.out.filtered_gmt, | ||
process.out.session_info, | ||
process.out.versions, | ||
process.out.plot_html.collect{ meta,html -> file(html).name }, //assert unstable file | ||
process.out.rds.collect{ meta,rds -> file(rds).name } //assert unstable file | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
} |
193 changes: 193 additions & 0 deletions
193
modules/nf-core/gprofiler2/gost/tests/main.nf.test.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
{ | ||
"test": { | ||
"content": [ | ||
[ | ||
[ | ||
{ | ||
"id": "Condition_genotype_WT_KO", | ||
"variable": "Condition genotype", | ||
"reference": "WT", | ||
"target": "KO", | ||
"blocking": "batch" | ||
}, | ||
"Condition_genotype_WT_KO.gprofiler2.all_enriched_pathways.tsv:md5,1134a02ca061c463bcbff277eefbfb19" | ||
] | ||
], | ||
[ | ||
[ | ||
{ | ||
"id": "Condition_genotype_WT_KO", | ||
"variable": "Condition genotype", | ||
"reference": "WT", | ||
"target": "KO", | ||
"blocking": "batch" | ||
}, | ||
"Condition_genotype_WT_KO.gprofiler2.gostplot.png:md5,4b83d1bcf7dc9dbf6cef3d545e440c5b" | ||
] | ||
], | ||
[ | ||
[ | ||
{ | ||
"id": "Condition_genotype_WT_KO", | ||
"variable": "Condition genotype", | ||
"reference": "WT", | ||
"target": "KO", | ||
"blocking": "batch" | ||
}, | ||
[ | ||
"Condition_genotype_WT_KO.gprofiler2.GO:BP.sub_enriched_pathways.tsv:md5,d527b94cdb160070bcaa0bfb0cecf914", | ||
"Condition_genotype_WT_KO.gprofiler2.GO:CC.sub_enriched_pathways.tsv:md5,ef418c3f06d50446317928e37ec8ddfb", | ||
"Condition_genotype_WT_KO.gprofiler2.GO:MF.sub_enriched_pathways.tsv:md5,e460d4917feb0b64d334a528f59e0731", | ||
"Condition_genotype_WT_KO.gprofiler2.HP.sub_enriched_pathways.tsv:md5,865d8f092503552831c51d775a98c6eb", | ||
"Condition_genotype_WT_KO.gprofiler2.KEGG.sub_enriched_pathways.tsv:md5,413724002abe683f376ea914d4f21ade", | ||
"Condition_genotype_WT_KO.gprofiler2.MIRNA.sub_enriched_pathways.tsv:md5,fce81051d7af955ddb2925ba2da9ff57", | ||
"Condition_genotype_WT_KO.gprofiler2.REAC.sub_enriched_pathways.tsv:md5,e89e1876698ea644671a0720c85f4dbb", | ||
"Condition_genotype_WT_KO.gprofiler2.TF.sub_enriched_pathways.tsv:md5,e272217ec7fcf01ea463ab8bcc8335cf", | ||
"Condition_genotype_WT_KO.gprofiler2.WP.sub_enriched_pathways.tsv:md5,fdd1efa836d85bb127e933e925290cba" | ||
] | ||
] | ||
], | ||
[ | ||
[ | ||
{ | ||
"id": "Condition_genotype_WT_KO", | ||
"variable": "Condition genotype", | ||
"reference": "WT", | ||
"target": "KO", | ||
"blocking": "batch" | ||
}, | ||
[ | ||
"Condition_genotype_WT_KO.gprofiler2.GO:BP.sub_enriched_pathways.png:md5,d89498267e985adf0ad1266e2deb9f48", | ||
"Condition_genotype_WT_KO.gprofiler2.GO:CC.sub_enriched_pathways.png:md5,e04cdd51b200671613254d021d3af242", | ||
"Condition_genotype_WT_KO.gprofiler2.GO:MF.sub_enriched_pathways.png:md5,33ea0652d78111978677acde0fe7f807", | ||
"Condition_genotype_WT_KO.gprofiler2.HP.sub_enriched_pathways.png:md5,6c040ac4baba73ae5637b00650e6aea1", | ||
"Condition_genotype_WT_KO.gprofiler2.KEGG.sub_enriched_pathways.png:md5,fbd232c4eeced95ceda60b43a02dbe1f", | ||
"Condition_genotype_WT_KO.gprofiler2.MIRNA.sub_enriched_pathways.png:md5,956880d3bf4852a06b0ffaaaba565732", | ||
"Condition_genotype_WT_KO.gprofiler2.REAC.sub_enriched_pathways.png:md5,0e8f9217d275668986771dc7fede3170", | ||
"Condition_genotype_WT_KO.gprofiler2.TF.sub_enriched_pathways.png:md5,0697164bc87e95e6508db966df94e01e", | ||
"Condition_genotype_WT_KO.gprofiler2.WP.sub_enriched_pathways.png:md5,09976762c7541ff9e5009e8763986845" | ||
] | ||
] | ||
], | ||
[ | ||
|
||
], | ||
[ | ||
[ | ||
{ | ||
"id": "Condition_genotype_WT_KO", | ||
"variable": "Condition genotype", | ||
"reference": "WT", | ||
"target": "KO", | ||
"blocking": "batch" | ||
}, | ||
"R_sessionInfo.log:md5,47643dc530c1a01102cc9db58c1f6b62" | ||
] | ||
], | ||
[ | ||
"versions.yml:md5,7ff4ab78463faf97bba7e698ed9a9069" | ||
], | ||
[ | ||
"Condition_genotype_WT_KO.gprofiler2.gostplot.html" | ||
], | ||
[ | ||
"Condition_genotype_WT_KO.gprofiler2.gost_results.rds" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2024-12-27T19:16:24.14894842" | ||
}, | ||
"stub": { | ||
"content": [ | ||
[ | ||
[ | ||
{ | ||
"id": "Condition_genotype_WT_KO", | ||
"variable": "Condition genotype", | ||
"reference": "WT", | ||
"target": "KO", | ||
"blocking": "batch" | ||
}, | ||
"Condition_genotype_WT_KO.gprofiler2.all_enriched_pathways.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
[ | ||
[ | ||
{ | ||
"id": "Condition_genotype_WT_KO", | ||
"variable": "Condition genotype", | ||
"reference": "WT", | ||
"target": "KO", | ||
"blocking": "batch" | ||
}, | ||
"Condition_genotype_WT_KO.gprofiler2.gostplot.png:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
[ | ||
[ | ||
{ | ||
"id": "Condition_genotype_WT_KO", | ||
"variable": "Condition genotype", | ||
"reference": "WT", | ||
"target": "KO", | ||
"blocking": "batch" | ||
}, | ||
"Condition_genotype_WT_KO.gprofiler2.*.sub_enriched_pathways.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
[ | ||
[ | ||
{ | ||
"id": "Condition_genotype_WT_KO", | ||
"variable": "Condition genotype", | ||
"reference": "WT", | ||
"target": "KO", | ||
"blocking": "batch" | ||
}, | ||
"Condition_genotype_WT_KO.gprofiler2.*.sub_enriched_pathways.png:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
[ | ||
[ | ||
{ | ||
"id": "Condition_genotype_WT_KO", | ||
"variable": "Condition genotype", | ||
"reference": "WT", | ||
"target": "KO", | ||
"blocking": "batch" | ||
}, | ||
"Condition_genotype_WT_KO.ENSG_filtered.gmt:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
[ | ||
[ | ||
{ | ||
"id": "Condition_genotype_WT_KO", | ||
"variable": "Condition genotype", | ||
"reference": "WT", | ||
"target": "KO", | ||
"blocking": "batch" | ||
}, | ||
"Condition_genotype_WT_KO.R_sessionInfo.log:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
[ | ||
"versions.yml:md5,7ff4ab78463faf97bba7e698ed9a9069" | ||
], | ||
[ | ||
"Condition_genotype_WT_KO.gprofiler2.gostplot.html" | ||
], | ||
[ | ||
"Condition_genotype_WT_KO.gprofiler2.gost_results.rds" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2024-12-27T19:16:37.689819563" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
process { | ||
ext.args = params.module_args | ||
} |