Skip to content

Commit

Permalink
Merge branch 'master' into functional_analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
suzannejin authored Jan 16, 2025
2 parents 12b7f8c + 2b977a4 commit ca61db0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 37 deletions.
32 changes: 15 additions & 17 deletions subworkflows/nf-core/abundance_differential_filter/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,16 @@ workflow ABUNDANCE_DIFFERENTIAL_FILTER {

// Set up how the channels crossed below will be used to generate channels for processing
def criteria = multiMapCriteria { meta_input, abundance, analysis_method, fc_threshold, stat_threshold, meta_exp, samplesheet, meta_contrasts, variable, reference, target ->
def meta_for_diff = mergeMaps(meta_contrasts, meta_input) + [ 'method': analysis_method ]
def meta_input_new = meta_input + [ 'method': analysis_method ]
samples_and_matrix:
meta_map = meta_input + [ 'method': analysis_method ]
[meta_map, samplesheet, abundance]
contrasts:
meta_map = mergeMaps(meta_contrasts, meta_input) + [ 'method': analysis_method ]
[ meta_map, variable, reference, target ]
[ meta_input_new, samplesheet, abundance ]
contrasts_for_diff:
[ meta_for_diff, variable, reference, target ]
filter_params:
meta_map = mergeMaps(meta_contrasts, meta_input) + [ 'method': analysis_method ]
[meta_map, [ 'fc_threshold': fc_threshold, 'stat_threshold': stat_threshold ]]
[ meta_for_diff, [ 'fc_threshold': fc_threshold, 'stat_threshold': stat_threshold ]]
contrasts_for_norm:
meta_map = meta_input + [ 'method': analysis_method ]
[ meta_map, variable, reference, target ]
[ meta_input_new, variable, reference, target ]
}

// For DIFFERENTIAL modules we need to cross the things we're iterating so we
Expand All @@ -61,13 +59,13 @@ workflow ABUNDANCE_DIFFERENTIAL_FILTER {
// depending on the contrast setting etc, these modules may subset matrices,
// hence not returning the full normalized matrix as NORM modules would do.
LIMMA_NORM(
inputs.contrasts_for_norm.filter{it[0].method == 'limma'}.unique(),
inputs.samples_and_matrix.filter{it[0].method == 'limma'}.unique()
norm_inputs.contrasts_for_norm.filter{it[0].method == 'limma'},
norm_inputs.samples_and_matrix.filter{it[0].method == 'limma'}
)

LIMMA_DIFFERENTIAL(
inputs.contrasts.filter{it[0].method == 'limma'},
inputs.samples_and_matrix.filter { it[0].method == 'limma' }
inputs.contrasts_for_diff.filter{ it[0].method == 'limma' },
inputs.samples_and_matrix.filter{ it[0].method == 'limma' }
)

// ----------------------------------------------------
Expand All @@ -79,14 +77,14 @@ workflow ABUNDANCE_DIFFERENTIAL_FILTER {
// depending on the contrast setting etc, these modules may subset matrices,
// hence not returning the full normalized matrix as NORM modules would do.
DESEQ2_NORM(
inputs.contrasts_for_norm.filter{it[0].method == 'deseq2'}.unique(),
inputs.samples_and_matrix.filter{it[0].method == 'deseq2'}.unique(),
norm_inputs.contrasts_for_norm.filter{it[0].method == 'deseq2'},
norm_inputs.samples_and_matrix.filter{it[0].method == 'deseq2'},
ch_control_features.first(),
ch_transcript_lengths.first()
)

DESEQ2_DIFFERENTIAL(
inputs.contrasts.filter{it[0].method == 'deseq2'},
inputs.contrasts_for_diff.filter{it[0].method == 'deseq2'},
inputs.samples_and_matrix.filter{it[0].method == 'deseq2'},
ch_control_features.first(),
ch_transcript_lengths.first()
Expand All @@ -99,7 +97,7 @@ workflow ABUNDANCE_DIFFERENTIAL_FILTER {
// NOTE that this method don't rely on normalization, hence it does
// not produce a normalized matrix.
PROPR_PROPD(
inputs.contrasts.filter{it[0].method == 'propd'},
inputs.contrasts_for_diff.filter{it[0].method == 'propd'},
inputs.samples_and_matrix.filter { it[0].method == 'propd' }
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
]
],
[

],
[
[
Expand All @@ -48,9 +48,9 @@
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.2"
"nextflow": "24.10.3"
},
"timestamp": "2024-12-07T16:33:03.091762783"
"timestamp": "2025-01-14T16:51:17.162826924"
},
"deseq2 and limma - mouse - basic": {
"content": [
Expand Down Expand Up @@ -234,9 +234,9 @@
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.2"
"nextflow": "24.10.3"
},
"timestamp": "2024-12-07T16:34:54.548033825"
"timestamp": "2025-01-14T16:53:11.245100955"
},
"limma - voom": {
"content": [
Expand Down Expand Up @@ -308,9 +308,9 @@
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.2"
"nextflow": "24.10.3"
},
"timestamp": "2024-12-07T16:33:26.97858478"
"timestamp": "2025-01-14T16:51:32.460857013"
},
"deseq2 + limma-voom + propd - mouse - basic": {
"content": [
Expand Down Expand Up @@ -568,9 +568,9 @@
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.2"
"nextflow": "24.10.3"
},
"timestamp": "2024-12-13T16:07:08.941008861"
"timestamp": "2025-01-14T16:53:54.80697542"
},
"stub": {
"content": [
Expand Down Expand Up @@ -628,7 +628,7 @@
]
],
"2": [

],
"3": [
[
Expand Down Expand Up @@ -677,7 +677,7 @@
"versions.yml:md5,05e3901f6d78f8839a7e07f422e9bc03"
],
"adjacency": [

],
"model": [
[
Expand Down Expand Up @@ -781,9 +781,9 @@
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.2"
"nextflow": "24.10.3"
},
"timestamp": "2024-12-13T15:08:45.989521056"
"timestamp": "2025-01-14T16:54:12.823125892"
},
"deseq2 - mouse - basic": {
"content": [
Expand Down Expand Up @@ -888,9 +888,9 @@
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.2"
"nextflow": "24.10.3"
},
"timestamp": "2024-12-07T16:32:17.301539736"
"timestamp": "2025-01-14T16:50:35.085607799"
},
"deseq2 - with transcript lengths": {
"content": [
Expand Down Expand Up @@ -995,9 +995,9 @@
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.2"
"nextflow": "24.10.3"
},
"timestamp": "2024-12-07T16:34:05.584119298"
"timestamp": "2025-01-14T16:52:07.822745077"
},
"propd - mouse - basic": {
"content": [
Expand Down Expand Up @@ -1084,8 +1084,8 @@
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.2"
"nextflow": "24.10.3"
},
"timestamp": "2024-12-13T15:02:45.903371649"
"timestamp": "2025-01-14T16:52:25.336720308"
}
}
}

0 comments on commit ca61db0

Please sign in to comment.