-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split ch_tools into subworkflow relevant subchannels #308
Changes from 6 commits
a6c2b3d
95e406a
0464932
41adc93
1cbdb17
9d35597
062c5a3
4075a80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ include { PROPR_GREA as GREA } from "../../../modules/local/propr/grea/main.nf" | |
|
||
workflow ENRICHMENT { | ||
take: | ||
ch_tools // [ pathway_name, enrichment_map ] | ||
ch_counts | ||
ch_results_genewise | ||
ch_results_genewise_filtered | ||
|
@@ -31,10 +32,20 @@ workflow ENRICHMENT { | |
// ---------------------------------------------------- | ||
|
||
ch_adjacency | ||
.filter { it[0]["enr_method"] == "grea" } | ||
.set { ch_adjacency_grea } | ||
.map { meta, matrix -> [meta.subMap(["pathway_name"]), meta, matrix] } | ||
.join(ch_tools, by: [0]) | ||
.map { | ||
pathway_name, meta, matrix, meta_tools -> | ||
def new_meta = meta.clone() + meta_tools.clone() | ||
[ new_meta, matrix ] | ||
} | ||
.branch { | ||
grea: it[0]["enr_method"] == "grea" | ||
gsea: it[0]["enr_method"] == "gsea" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. gsea dont use ch_adjacency as input. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, yes, that sounds good to me. But I'd would change it then when we include gsea. |
||
} | ||
.set { ch_adjacency } | ||
|
||
GREA(ch_adjacency_grea, ch_gmt.collect()) | ||
GREA(ch_adjacency.grea, ch_gmt.collect()) | ||
ch_enriched = ch_enriched.mix(GREA.out.results) | ||
|
||
// ---------------------------------------------------- | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -361,8 +361,16 @@ workflow DIFFERENTIALABUNDANCE { | |
.first() | ||
} else if (params.study_type == 'experimental') { | ||
|
||
// Convert the samplesheet.csv in a channel with the proper format | ||
// Convert the toolsheet.csv in a channel with the proper format | ||
ch_tools = Channel.fromList(samplesheetToList(params.tools, './assets/schema_tools.json')) | ||
.map { | ||
it -> | ||
def pathway_name = it[0].subMap(["pathway_name"]) | ||
def differential_map = it[0].subMap(["diff_method","args_diff"]) | ||
def correlation_map = it[0].subMap(["cor_method","args_cor"]) | ||
def enrichment_map = it[0].subMap(["enr_method","args_enr"]) | ||
[ pathway_name, differential_map, correlation_map, enrichment_map ] | ||
}.unique() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is super clean! I like it! |
||
|
||
// Filter the tools to the pathway(s) of interest, or run everything if requested | ||
if (params.pathway == "all") { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deseq2 does not do anything yet here no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just a placeholder for how it would look like. And with your new additions it would become functional, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, with the new additions it would be good!