Skip to content

Commit 655d08e

Browse files
committed
Merge branch 'dev' into quarto
2 parents 8e421f2 + c1e587a commit 655d08e

35 files changed

+1553
-161
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
### Added
99

10+
-[[#510]](https://github.com/nf-core/differentialabundance/pull/510) - Add decoupler module to differential functional enrichment subworkflow. ([@antoniasaracco](https://github.com/antoniasaracco), review by [@pinin4fjords](https://github.com/pinin4fjords) and [@grst](https://github.com/grst)).
11+
1012
- [[#473](https://github.com/nf-core/differentialabundance/pull/473)] - Allow formula-based contrasts in DESEQ2. ([@atrigila](https://github.com/atrigila), review by [@pinin4fjords](https://github.com/pinin4fjords) and [@grst](https://github.com/grst)).
1113
- [[#443](https://github.com/nf-core/differentialabundance/pull/443)] - Add toolsheet-related implementations. ([@suzannejin](https://github.com/suzannejin), review by [@pinin4fjords](https://github.com/pinin4fjords), [@mirpedrol](https://github.com/mirpedrol) and [@JoseEspinosa](https://github.com/JoseEspinosa))
1214
- [[#450](https://github.com/nf-core/differentialabundance/pull/441)] - Allow usage of strings for makeContrasts in DREAM. ([@atrigila](https://github.com/atrigila), review by [@pinin4fjords](https://github.com/pinin4fjords), [@suzannejin](https://github.com/suzannejin) and [@grst](https://github.com/grst)).
@@ -25,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2527

2628
### Fixed
2729

30+
- [[#476](https://github.com/nf-core/differentialabundance/pull/476)] - Fixed null.csv and warning at top of report ([@SusiJo](https://github.com/SusiJo), reviewed by [@pinin4fjords](https://github.com/pinin4fjords), [@atrigila](https://github.com/atrigila), [@maxulysse](https://github.com/maxulysse))
2831
- [[#358](https://github.com/nf-core/differentialabundance/pull/358)] - Fixed nf-tests not running due to `--changed-since HEAD^`([@atrigila](https://github.com/atrigila), review by [@pinin4fjords](https://github.com/pinin4fjords))
2932
- [[#344](https://github.com/nf-core/differentialabundance/pull/344)] - Fixed replacement of NA sub-strings
3033
([@atrigila](https://github.com/atrigila), suggested by [@BEFH](https://github.com/BEFH), review by [@apeltzer](https://github.com/apeltzer) and [@nschcolnicov](https://github.com/nschcolnicov))
@@ -40,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4043

4144
### Changed
4245

46+
- [[#476](https://github.com/nf-core/differentialabundance/pull/476)] - Update documentation & report fixes ([@SusiJo](https://github.com/SusiJo), reviewed by [@pinin4fjords](https://github.com/pinin4fjords), [@atrigila](https://github.com/atrigila), [@maxulysse](https://github.com/maxulysse))
4347
- [[#468](https://github.com/nf-core/differentialabundance/pull/468)] - Template update for nf-core/tools v3.3.1 ([@SusiJo](https://github.com/SusiJo), reviewed by [@famosab](https://github.com/famosab), [@mashehu](https://github.com/mashehu))
4448
- [[#448](https://github.com/nf-core/differentialabundance/pull/448)] - Simplify toolsheet handling and restructure workflow to use paramset in meta. ([@pinin4fjords](https://github.com/pinin4fjords), review by [@suzannejin](https://github.com/suzannejin) and [@grst](https://github.com/grst))
4549
- [[#431](https://github.com/nf-core/differentialabundance/pull/431)] - Replace the calls to differential and functional analysis modules by subworkflows. ([@suzannejin](https://github.com/suzannejin), review by [@pinin4fjords](https://github.com/pinin4fjords))

assets/differentialabundance_report.qmd

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,8 +1023,8 @@ if (!is.null(params$meta$params$functional_method)){
10231023
cat("\n##### ", gmt_name ,"\n")
10241024
cat("::: {.panel-tabset}", "\n")
10251025
1026-
reference_gsea_tables <- paste0(differential_names, ".", gmt_name, '.gsea_report_for_', gsea_contrasts$reference, '.tsv')
1027-
target_gsea_tables <- paste0(differential_names, ".", gmt_name, '.gsea_report_for_', gsea_contrasts$target, '.tsv')
1026+
reference_gsea_tables <- paste0(gsea_contrasts$id, ".", gmt_name, '.gsea_report_for_', gsea_contrasts$reference, '.tsv')
1027+
target_gsea_tables <- paste0(gsea_contrasts$id, ".", gmt_name, '.gsea_report_for_', gsea_contrasts$target, '.tsv')
10281028
10291029
for (i in seq_len(nrow(gsea_contrasts))) {
10301030
cat("\n###### ", contrast_descriptions[i], "\n")
@@ -1062,10 +1062,11 @@ if (!is.null(params$meta$params$functional_method)){
10621062
ifelse(params$meta$params$gprofiler2_significant, paste0(" Enrichment was only considered if significant, i.e. adjusted p-value <= ", params$meta$params$gprofiler2_max_qval, "."), "Enrichment was also considered if not significant."), "\n"))
10631063
10641064
# Make sure to grab only non-empty files
1065-
for (name in differential_names) {
1065+
for (i in seq_along(differential_names)) {
1066+
name <- differential_names[i]
10661067
cat(paste0("\n##### ", name, "\n"))
10671068
1068-
table <- paste0(name, ".gprofiler2.all_enriched_pathways.tsv")
1069+
table <- paste0(contrasts$id[i], ".gprofiler2.all_enriched_pathways.tsv")
10691070
table_path <- file.path(params$input_dir, table)
10701071
if (!file.exists(table_path) || file.size(table_path) == 0){
10711072
cat(paste0("No ", ifelse(params$meta$params$gprofiler2_significant, "significantly", ""), " enriched pathways were found for this contrast."))

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
- `*_[Quarto notebook name].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 a Quarto notebook 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`: 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)