From 925527d4f1f713bdf9e10d654a3aa2b91b48f46c Mon Sep 17 00:00:00 2001 From: WackerO Date: Thu, 13 Jun 2024 13:05:40 +0200 Subject: [PATCH 1/3] bugfix for gprofiler without gene_sets --- workflows/differentialabundance.nf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/workflows/differentialabundance.nf b/workflows/differentialabundance.nf index 020c0747..cfeb6e65 100644 --- a/workflows/differentialabundance.nf +++ b/workflows/differentialabundance.nf @@ -73,6 +73,8 @@ if (run_gene_set_analysis) { } else if (params.gprofiler2_run) { if (!params.gprofiler2_token && !params.gprofiler2_organism) { error("To run gprofiler2, please provide a run token, GMT file or organism!") + } else { + ch_gene_sets = [[]] // If one of token or organism is provided, make gene_sets empty } } else { ch_gene_sets = [] // For methods that can run without gene sets From ccb9aa4d88f1a4de0e3ef5295aabbfb8dd835ec3 Mon Sep 17 00:00:00 2001 From: WackerO Date: Thu, 13 Jun 2024 14:40:52 +0200 Subject: [PATCH 2/3] add comment, update changelog --- CHANGELOG.md | 1 + workflows/differentialabundance.nf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d844a1e..d2791a4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Fixed` +- [[#278](https://github.com/nf-core/differentialabundance/pull/278)] - Fix missing ch_gene_sets when running gprofiler without gene sets ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords)) - [[#267](https://github.com/nf-core/differentialabundance/pull/267)] - Whitespace fix, remove TODO, also update changelog for release release 1.5.0 ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords)) - [[#265](https://github.com/nf-core/differentialabundance/pull/265)] - GSEA- pngs and htmls in same place ([@pinin4fjords](https://github.com/pinin4fjords), review by [@WackerO](https://github.com/WackerO)) - [[#257](https://github.com/nf-core/differentialabundance/pull/257)] - Fixed FILTER_DIFFTABLE module, updated PROTEUS module to better handle whitespace in prefix param, made docs clearer ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords)) diff --git a/workflows/differentialabundance.nf b/workflows/differentialabundance.nf index cfeb6e65..4442091d 100644 --- a/workflows/differentialabundance.nf +++ b/workflows/differentialabundance.nf @@ -74,7 +74,7 @@ if (run_gene_set_analysis) { if (!params.gprofiler2_token && !params.gprofiler2_organism) { error("To run gprofiler2, please provide a run token, GMT file or organism!") } else { - ch_gene_sets = [[]] // If one of token or organism is provided, make gene_sets empty + ch_gene_sets = [[]] // If one of token or organism is provided, make gene_sets empty (nested because of .first() in the gprofiler call) } } else { ch_gene_sets = [] // For methods that can run without gene sets From af2436f8500758f088ecc1b045b042576bef516e Mon Sep 17 00:00:00 2001 From: WackerO Date: Fri, 14 Jun 2024 10:17:52 +0200 Subject: [PATCH 3/3] simplified gene_sets logic --- workflows/differentialabundance.nf | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/workflows/differentialabundance.nf b/workflows/differentialabundance.nf index 4442091d..eba669bd 100644 --- a/workflows/differentialabundance.nf +++ b/workflows/differentialabundance.nf @@ -62,6 +62,7 @@ if (params.control_features) { ch_control_features = Channel.of([ exp_meta, file def run_gene_set_analysis = params.gsea_run || params.gprofiler2_run if (run_gene_set_analysis) { + ch_gene_sets = Channel.of([]) // For methods that can run without gene sets if (params.gene_sets_files) { gene_sets_files = params.gene_sets_files.split(",") ch_gene_sets = Channel.of(gene_sets_files).map { file(it, checkIfExists: true) } @@ -73,11 +74,7 @@ if (run_gene_set_analysis) { } else if (params.gprofiler2_run) { if (!params.gprofiler2_token && !params.gprofiler2_organism) { error("To run gprofiler2, please provide a run token, GMT file or organism!") - } else { - ch_gene_sets = [[]] // If one of token or organism is provided, make gene_sets empty (nested because of .first() in the gprofiler call) } - } else { - ch_gene_sets = [] // For methods that can run without gene sets } }