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 } }