Skip to content

Commit 4ae760b

Browse files
Inlcude decoupler config
1 parent 7b976a1 commit 4ae760b

File tree

10 files changed

+201
-35
lines changed

10 files changed

+201
-35
lines changed

conf/modules.config

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ process {
375375

376376
withName: GSEA_GSEA {
377377
ext.prefix = { "${meta.id}.${gene_sets.baseName}." }
378+
378379
publishDir = [
379380
[
380381
path: { "${params.outdir}/report/gsea/${meta.id}/${gene_sets.baseName}" },
@@ -463,6 +464,34 @@ process {
463464
].join(' ').trim() }
464465
}
465466

467+
withName: DECOUPLER_DECOUPLER {
468+
ext.prefix = {
469+
def method = meta.params.differential_method ?: meta.differential_method ?: "unknown"
470+
def prefix = "${method}_${meta.id}"
471+
return prefix
472+
}
473+
ext.args = {
474+
def features_id = meta.params?.features_id_col ?: 'gene_id'
475+
def features_symbol = meta.params?.features_name_col ?: 'gene_name'
476+
def min_n = meta.params?.decoupler_min_n ?: 5
477+
def methods = meta.params?.decoupler_methods ?: 'mlm'
478+
479+
"--min_n ${min_n} --transpose TRUE --ensembl_ids TRUE --methods ${methods} --features_id_col ${features_id} --features_symbol_col ${features_symbol} --column ${params.differential_fc_column}"
480+
}
481+
publishDir = [
482+
[
483+
path: { "${params.outdir}/tables/decoupler" },
484+
mode: params.publish_dir_mode,
485+
pattern: '*.tsv'
486+
],
487+
[
488+
path: { "${params.outdir}/plots/decoupler" },
489+
mode: params.publish_dir_mode,
490+
pattern: '*_estimate_decoupler_plot.png'
491+
]
492+
]
493+
}
494+
466495
// ==================================================================================
467496
// plotting and reports
468497
// ==================================================================================

conf/test.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,8 @@ params {
5555

5656
// Other
5757
round_digits = 3
58+
59+
// DECOUPLER
60+
decoupler_network = 'https://github.com/nf-core/test-datasets/raw/differentialabundance/modules_testdata/progeny/mouse_network.tsv'
61+
5862
}

conf/test_rnaseq_dream.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,7 @@ params {
5555

5656
// Other
5757
round_digits = 3
58+
59+
// DECOUPLER
60+
decoupler_network = 'https://github.com/nf-core/test-datasets/raw/differentialabundance/modules_testdata/progeny/mouse_network.tsv'
5861
}

conf/test_rnaseq_limma.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,7 @@ params {
6161

6262
// Other
6363
round_digits = 3
64+
65+
// DECOUPLER
66+
decoupler_network = 'https://github.com/nf-core/test-datasets/raw/differentialabundance/modules_testdata/progeny/mouse_network.tsv'
6467
}

docs/output.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ This directory contains the main reporting output of the workflow.
1414
- `report/`
1515
- `*.html`: an HTML report file named according to the value of `params.study_name`, containing graphical and tabular summary results for the workflow run.
1616
- `*.zip`: a zip file containing an R markdown file with parameters set and all necessary input files to open and customise the reporting.
17+
- `gsea/`: Directory containing graphical outputs from GSEA (where enabled). Plots are stored in directories named for the associated contrast.
18+
- `[contrast]/png/[gsea_plot_type].png`
1719

1820
</details>
1921

@@ -38,8 +40,6 @@ Stand-alone graphical outputs are placed in this directory. They may be useful i
3840
- `[contrast]/png/volcano.png`: Volcano plots of -log(10) p value agains log(2) fold changes
3941
- `immunedeconv/`: Directory containing graphical outputs of immunedeconv results
4042
- `${prefix}.plot1_stacked_bar_chart.png`
41-
- `gsea/`: Directory containing graphical outputs from GSEA (where enabled). Plots are stored in directories named for the associated contrast.
42-
- `[contrast]/png/[gsea_plot_type].png`
4343
- `gprofiler2/`: Directory containing graphical outputs from gprofiler2 (where enabled). Plots are stored in directories named for the associated contrast.
4444
- `[contrast]/[contrast].gprofiler2.[source].gostplot.html`: An interactive gprofiler2 Manhattan plot of enriched pathways from one specific source/database, e.g. REAC
4545
- `[contrast]/[contrast].gprofiler2.[source].gostplot.png`: A static gprofiler2 Manhattan plot of enriched pathways from one specific source/database, e.g. REAC
@@ -49,8 +49,8 @@ Stand-alone graphical outputs are placed in this directory. They may be useful i
4949
- `[contrast]/[norm_function].normalized_mean_variance_relationship.png`: Plots of log intensity vs mean log intensity after normalization of each contrast level.
5050
- `[contrast]/[norm_function].normalized_distributions.png`: A plot of sample distributions after normalization.
5151
- `[contrast]/raw_distributions.png`: A plot of sample distributions without normalization.
52-
53-
</details>
52+
- `decoupler/`: Directory containing plots of decoupler results - `[differential_method]_[contrast_name]_[decoupler_method]_estimate_decoupler_plot.png`: contains the plot for the estimated activity scores for each regulator (rows) across all samples (columns).
53+
</details>
5454

5555
Most plots are included in the HTML report (see above), but are also included in static files in this folder to facilitate use in external reporting.
5656

@@ -78,6 +78,9 @@ Most plots are included in the HTML report (see above), but are also included in
7878
- `gprofiler2/`: Directory containing tables of differential gene set analyis from gprofiler2 (where enabled)
7979
- `[contrast]/[contrast].gprofiler2.all_enriched_pathways.tsv`: A gprofiler2 report table for all enrichment results
8080
- `[contrast]/[contrast].gprofiler2.[source].sub_enriched_pathways.tsv`: A gprofiler2 report table of enriched pathways from one specific source/database, e.g. REAC
81+
- `decoupler/`: Directory containing tables of decoupler results
82+
- `[differential_method]_[contrast_name]_[decoupler_method]_estimate_decoupler.tsv`: contains the estimated activity scores for each regulator (rows) across all samples (columns).
83+
- `[differential_method]_[contrast_name]_[decoupler_method]_pvals_decoupler.{tsv}.tsv`: contains the associated p-values for those activity scores, when the method supports statistical significance estimation.
8184
- `proteus/`: If `--study_type maxquant`: Directory containing abundance values produced by the proteus module which is used for processing MaxQuant input. Files are prefixed with the associated contrast and chosen normalization function (if any).
8285
- `[contrast]/[norm_function].normalized_proteingroups_tab.tsv`: Abundance table after normalization.
8386
- `[contrast]/raw_proteingroups_tab.tsv`: Abundance table without normalization.
@@ -92,7 +95,7 @@ The `differential` folder is likely to be the core result set for most users, co
9295
<summary>Output files</summary>
9396

9497
- `shinyngs_app/`
95-
- `[study name]`:
98+
- `[study_name]`:
9699
- `data.rds`: serialized R object which can be used to generate a Shiny application
97100
- `app.R`: minimal R script that will source the data object and generate the app
98101

0 commit comments

Comments
 (0)