From 1350e4b8b841669e9ac0f760bc03ebcdeb1672ef Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 9 Jan 2024 11:21:36 +0100 Subject: [PATCH 1/3] Added rounds to numeric tables --- assets/differentialabundance_report.Rmd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/differentialabundance_report.Rmd b/assets/differentialabundance_report.Rmd index 0372852d..18ff6bb5 100644 --- a/assets/differentialabundance_report.Rmd +++ b/assets/differentialabundance_report.Rmd @@ -874,6 +874,7 @@ for (i in 1:nrow(contrasts)){ colnames(contrast_de) <- prettifyVariablename(colnames(contrast_de)) if (nrow(contrast_de) > 0){ + contrast_de <- round_dataframe_columns(contrast_de, digits=params$report_round_digits) print( htmltools::tagList(datatable(contrast_de, caption = paste('Differential genes', dir, 'in', contrast_descriptions[i], " (check", differential_files[[i]], "for more detail)"), rownames = FALSE) )) }else{ cat(paste0("No significantly differential '", dir, "' genes.\n\n")) @@ -903,8 +904,10 @@ if (any(unlist(params[paste0(possible_gene_set_methods, '_run')]))){ for (i in 1:nrow(contrasts)){ cat("\n###### ", contrast_descriptions[i], "\n") target_gsea_results <- read_metadata(target_gsea_tables[i])[,c(-2,-3)] + target_gsea_results <- round_dataframe_columns(target_gsea_results, digits=params$report_round_digits) print( htmltools::tagList(datatable(target_gsea_results, caption = paste0("\nTarget (", contrasts$target[i], ")\n"), rownames = FALSE) )) ref_gsea_results <- read_metadata(reference_gsea_tables[i])[,c(-2,-3)] + ref_gsea_results <- round_dataframe_columns(ref_gsea_results, digits=params$report_round_digits) print( htmltools::tagList(datatable(ref_gsea_results, caption = paste0("\nReference (", contrasts$reference[i], ")\n"), rownames = FALSE) )) } } From 8baf8f4c9b0ec1adb6dd3306ac64e4c59e426161 Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 9 Jan 2024 13:06:26 +0100 Subject: [PATCH 2/3] Removed newline to rerun git tests --- assets/differentialabundance_report.Rmd | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/differentialabundance_report.Rmd b/assets/differentialabundance_report.Rmd index 18ff6bb5..48e5a44f 100644 --- a/assets/differentialabundance_report.Rmd +++ b/assets/differentialabundance_report.Rmd @@ -470,7 +470,6 @@ display_columns <- unique(c(display_columns, informative_variables)) observations_to_print <- observations[,unique(display_columns)] colnames(observations_to_print) <- prettifyVariablename(colnames(observations_to_print)) print( htmltools::tagList(datatable(observations_to_print, caption = paste(ucfirst(params$observations_type), 'metadata'), rownames = FALSE, options = list(dom = 'tb')) )) - ``` ## Contrasts From 2e9560dde3f8795425a99fd9b6ffe3fe62669b39 Mon Sep 17 00:00:00 2001 From: WackerO Date: Thu, 11 Jan 2024 08:33:05 +0100 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e39968da..a54bd20f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Added` +- [[#222](https://github.com/nf-core/differentialabundance/pull/222)] - Add rounding to all numeric report tables ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords)) - [[#219](https://github.com/nf-core/differentialabundance/pull/219)] - Template update for nf-core/tools v2.11.1 ([@WackerO](https://github.com/WackerO), review by [@pinin4fjords](https://github.com/pinin4fjords)) ### `Fixed`