Skip to content

Commit

Permalink
simplified gene_sets logic
Browse files Browse the repository at this point in the history
  • Loading branch information
WackerO committed Jun 14, 2024
1 parent ccb9aa4 commit af2436f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions workflows/differentialabundance.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand All @@ -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
}
}

Expand Down

0 comments on commit af2436f

Please sign in to comment.