From c3383824a0cc283aea33164632afa74eba035f3e Mon Sep 17 00:00:00 2001 From: WackerO Date: Fri, 14 Jun 2024 16:00:17 +0200 Subject: [PATCH 1/4] Fix report issue with missing logo --- CHANGELOG.md | 6 ++++-- modules/local/report.nf | 2 ++ nextflow.config | 2 ++ nextflow_schema.json | 10 ++++++++++ workflows/rnadeseq.nf | 6 +++++- 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 039ed3dc..8d5c7fc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 2.3 +## 2.3 - Flowering Orchards ### Added @@ -20,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- [#243](https://github.com/qbic-pipelines/rnadeseq/pull/243) Fix missing QBiC logo and css styling in report by adding logo/css params +- [#242](https://github.com/qbic-pipelines/rnadeseq/pull/242) Fix path issue in report by adding report_file/references_file params - [#241](https://github.com/qbic-pipelines/rnadeseq/pull/241) Undo fix branch protection bug in order to get precommit test to run - [#240](https://github.com/qbic-pipelines/rnadeseq/pull/240) Fix branch protection bug --> third attempt - [#239](https://github.com/qbic-pipelines/rnadeseq/pull/239) Fix branch protection bug --> second attempt @@ -32,7 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#225](https://github.com/qbic-pipelines/rnadeseq/pull/225) Fixed too many devices error from tryCatch around normalized heatmaps - [#221](https://github.com/qbic-pipelines/rnadeseq/pull/221) Fixed non-conformable arrays bug, fix wrong volcano colors when no DE genes -## 2.2 Avenue of Poplars +## 2.2 - Avenue of Poplars ### Added diff --git a/modules/local/report.nf b/modules/local/report.nf index 5c0fcab1..7e46da27 100644 --- a/modules/local/report.nf +++ b/modules/local/report.nf @@ -21,6 +21,8 @@ process REPORT { path custom_background path report_file path references_file + path css + path logo output: path "*.zip" diff --git a/nextflow.config b/nextflow.config index 8db8337c..faf95d30 100644 --- a/nextflow.config +++ b/nextflow.config @@ -50,6 +50,8 @@ params { software_versions = 'NO_FILE6' report_file = "$projectDir/assets/RNAseq_report.Rmd" references_file = "$projectDir/assets/references.bibtex" + css = "$projectDir/assets/corp-styles.css" + logo = "$projectDir/assets/logo.png" // Additional arg to indicate that a github test is run citest = false diff --git a/nextflow_schema.json b/nextflow_schema.json index aa6b89a2..33f48902 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -193,6 +193,16 @@ "type": "string", "default": "${projectDir}/assets/references.bibtex", "description": "Reference bibtex file for the report, should not be changed." + }, + "css": { + "type": "string", + "default": "${projectDir}/assets/corp-styles.css", + "description": "Stylesheet css file for the report, should not be changed." + }, + "logo": { + "type": "string", + "default": "${projectDir}/assets/logo.png", + "description": "QBiC logo png file for the report, should not be changed." } } }, diff --git a/workflows/rnadeseq.nf b/workflows/rnadeseq.nf index ead6be2a..6f11e26d 100644 --- a/workflows/rnadeseq.nf +++ b/workflows/rnadeseq.nf @@ -33,6 +33,8 @@ ch_proj_summary_file = Channel.fromPath(params.project_summary) ch_softwareversions_file = Channel.fromPath(params.software_versions) ch_report_file = Channel.fromPath(params.report_file) ch_references_file = Channel.fromPath(params.references_file) +ch_css = Channel.fromPath(params.css) +ch_logo = Channel.fromPath(params.logo) /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -78,7 +80,9 @@ workflow RNADESEQ { ch_custom_gmt, ch_custom_background, ch_report_file, - ch_references_file + ch_references_file, + ch_css, + ch_logo ) //TODO: Enable this: From 8559abf792db0028528843f929728f4e38c864c4 Mon Sep 17 00:00:00 2001 From: WackerO Date: Fri, 14 Jun 2024 16:16:05 +0200 Subject: [PATCH 2/4] linting --- .nf-core.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.nf-core.yml b/.nf-core.yml index ee90d841..86cdab14 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -23,6 +23,8 @@ lint: - params.custom_config_base - params.report_file - params.references_file + - params.css + - params.logo multiqc_config: - report_comment # otherwise throws error: multiqc_config: 'assets/multiqc_config.yml' does not contain a matching 'report_comment'. From b886173b8ddfe2107fcf19960f0efcbcef3444e4 Mon Sep 17 00:00:00 2001 From: WackerO Date: Mon, 17 Jun 2024 10:25:55 +0200 Subject: [PATCH 3/4] finally fixed logo; also re-added colorbar to sample metadata --- assets/RNAseq_report.Rmd | 10 ++++++++-- bin/Execute_report.R | 2 ++ modules/local/report.nf | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/assets/RNAseq_report.Rmd b/assets/RNAseq_report.Rmd index 9e66e7d4..72482212 100644 --- a/assets/RNAseq_report.Rmd +++ b/assets/RNAseq_report.Rmd @@ -52,6 +52,7 @@ params: path_quote: '' path_software_versions: '' revision: '' + logo: '' #Additional arg to indicate that a github test is run citest: '' @@ -301,7 +302,12 @@ author: "`r PM`, Bioinformatics Research Scientist" date: '`r format(Sys.Date(), "%B %d, %Y")`' --- - +```{r logo, echo=FALSE, results='asis'} +logo_file = file.path(getwd(), "logo.png") +img_data <- base64enc::dataURI(file = logo_file, mime = "image/png") # Need to use base64 because the logo will otherwise for some reason not be loaded correctly +cat(sprintf('', img_data)) +``` +
QBiC
```{r docSetup, bootstrap.show.code = FALSE, dev = c('png'), bootstrap.show.message=FALSE, echo=FALSE, message=FALSE, warning=FALSE} @@ -1027,7 +1033,7 @@ if (mqc_version == 'old_mqc') { table_complete <- table_complete %>% mutate( Sample = Sample, - ReadNumber = round((ReadNumber/1000000),2), + ReadNumber = color_bar("lightblue")(round((ReadNumber/1000000),2)), DuplicateReadsIntercept = ifelse(DuplicateReadsIntercept > 1, cell_spec(DuplicateReadsIntercept, color="orange", bold=T), cell_spec(DuplicateReadsIntercept, color="black")), diff --git a/bin/Execute_report.R b/bin/Execute_report.R index 574fbc1e..21d2ad93 100755 --- a/bin/Execute_report.R +++ b/bin/Execute_report.R @@ -42,6 +42,7 @@ option_list = list( make_option(c("--path_quote"), type="character", default=NULL, help="Path to the quote PDF", metavar="character"), make_option(c("-v", "--software_versions"), type="character", default=NULL, help="Versions file", metavar="character"), make_option(c("-j", "--revision"), type="character", default=NULL, help="Rnadeseq workflow revision", metavar="character"), + make_option("--logo", type="character", default=NULL, help="Logo image file", metavar="character"), make_option("--citest", action="store_true", default=FALSE, help="Run github test and don't save pathway heatmaps.") ) @@ -93,5 +94,6 @@ rmarkdown::render(opt$report, output_file = opt$output, knit_root_dir = wd, outp path_quote = opt$path_quote, path_software_versions = opt$software_versions, revision = opt$revision, + logo = opt$logo, citest = opt$citest)) diff --git a/modules/local/report.nf b/modules/local/report.nf index 7e46da27..05e10831 100644 --- a/modules/local/report.nf +++ b/modules/local/report.nf @@ -91,6 +91,7 @@ process REPORT { $software_versions_opt \ --proj_summary $proj_summary \ --revision $workflow.manifest.version \ + --logo $logo \ $citest_opt # Remove allgenes dir as the contained files do not contain only DE genes From 32f08b648a0e2f68cd0e154971ce66c692bce112 Mon Sep 17 00:00:00 2001 From: WackerO Date: Mon, 17 Jun 2024 10:42:12 +0200 Subject: [PATCH 4/4] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d5c7fc5..7cab29c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- [#243](https://github.com/qbic-pipelines/rnadeseq/pull/243) Release 2.3 to master, part II (found a bug before actual release) - [#237](https://github.com/qbic-pipelines/rnadeseq/pull/237) Changed geom_jitter to geom_point for volcano plot so that points are accurate +- [#233](https://github.com/qbic-pipelines/rnadeseq/pull/233) Release 2.3 to master, part I - [#225](https://github.com/qbic-pipelines/rnadeseq/pull/225) Shortened names of some output files ### Fixed