From 02d7e41e1106f53c9203f1402e99b94c8131109a Mon Sep 17 00:00:00 2001 From: m7pr Date: Tue, 21 Jan 2025 14:14:45 +0100 Subject: [PATCH] introduce transformators parameter --- R/barplot.R | 5 ++++- R/boxplot.R | 5 ++++- R/forestplot.R | 5 ++++- R/km.R | 5 ++++- R/pca.R | 5 ++++- R/quality.R | 5 ++++- R/scatterplot.R | 5 ++++- R/volcanoplot.R | 5 ++++- man/sampleVarSpecServer.Rd | 2 +- man/tm_g_barplot.Rd | 6 +++++- man/tm_g_boxplot.Rd | 6 +++++- man/tm_g_forest_tte.Rd | 6 +++++- man/tm_g_km.Rd | 6 +++++- man/tm_g_pca.Rd | 6 +++++- man/tm_g_quality.Rd | 6 +++++- man/tm_g_scatterplot.Rd | 6 +++++- man/tm_g_volcanoplot.Rd | 6 +++++- 17 files changed, 73 insertions(+), 17 deletions(-) diff --git a/R/barplot.R b/R/barplot.R index 2bb67ac6..7098122c 100644 --- a/R/barplot.R +++ b/R/barplot.R @@ -6,6 +6,7 @@ #' analysis. #' #' @inheritParams module_arguments +#' @inheritParams teal::module #' #' @return Shiny module to be used in the teal app. #' @@ -35,7 +36,8 @@ tm_g_barplot <- function(label, ), pre_output = NULL, post_output = NULL, - .test = FALSE) { + .test = FALSE, + transformators = list()) { message("Initializing tm_g_barplot") assert_string(label) assert_string(mae_name) @@ -62,6 +64,7 @@ tm_g_barplot <- function(label, post_output = post_output, .test = .test ), + transformators = transformators, datanames = mae_name ) } diff --git a/R/boxplot.R b/R/boxplot.R index 894deb56..2a08fd66 100644 --- a/R/boxplot.R +++ b/R/boxplot.R @@ -6,6 +6,7 @@ #' analysis. #' #' @inheritParams module_arguments +#' @inheritParams teal::module #' #' @return Shiny module to be used in the teal app. #' @@ -36,7 +37,8 @@ tm_g_boxplot <- function(label, ), pre_output = NULL, post_output = NULL, - .test = FALSE) { + .test = FALSE, + transformators = list()) { message("Initializing tm_g_boxplot") assert_string(label) assert_string(mae_name) @@ -63,6 +65,7 @@ tm_g_boxplot <- function(label, post_output = post_output, .test = .test ), + transformators = transformators, datanames = mae_name ) } diff --git a/R/forestplot.R b/R/forestplot.R index 63f9f44c..db3bedc7 100644 --- a/R/forestplot.R +++ b/R/forestplot.R @@ -5,6 +5,7 @@ #' This module provides an interactive survival forest plot. #' #' @inheritParams module_arguments +#' @inheritParams teal::module #' #' @return Shiny module to be used in the teal app. #' @@ -56,7 +57,8 @@ tm_g_forest_tte <- function(label, post_output = NULL, plot_height = c(600L, 200L, 2000L), plot_width = c(1360L, 500L, 2000L), - .test = FALSE) { + .test = FALSE, + transformators = list()) { message("Initializing tm_g_forest_tte") assert_string(label) assert_string(adtte_name) @@ -90,6 +92,7 @@ tm_g_forest_tte <- function(label, post_output = post_output, .test = .test ), + transformators = transformators, datanames = c(adtte_name, mae_name) ) } diff --git a/R/km.R b/R/km.R index f88efcd0..ce9d2a94 100644 --- a/R/km.R +++ b/R/km.R @@ -6,6 +6,7 @@ #' `ADaM` structure. #' #' @inheritParams module_arguments +#' @inheritParams teal::module #' #' @return Shiny module to be used in the teal app. #' @@ -59,7 +60,8 @@ tm_g_km <- function(label, ), pre_output = NULL, post_output = NULL, - .test = FALSE) { + .test = FALSE, + transformators = list()) { message("Initializing tm_g_km") assert_string(label) assert_string(adtte_name) @@ -90,6 +92,7 @@ tm_g_km <- function(label, post_output = post_output, .test = .test ), + transformators = transformators, datanames = c(adtte_name, mae_name) ) } diff --git a/R/pca.R b/R/pca.R index 1e00db15..b5f50a6c 100644 --- a/R/pca.R +++ b/R/pca.R @@ -7,6 +7,7 @@ #' variables. #' #' @inheritParams module_arguments +#' @inheritParams teal::module #' #' @return Shiny module to be used in the teal app. #' @export @@ -30,7 +31,8 @@ tm_g_pca <- function(label, exclude_assays = character(), pre_output = NULL, post_output = NULL, - .test = FALSE) { + .test = FALSE, + transformators = list()) { message("Initializing tm_g_pca") assert_string(label) assert_string(mae_name) @@ -52,6 +54,7 @@ tm_g_pca <- function(label, post_output = post_output, .test = .test ), + transformators = transformators, datanames = mae_name ) } diff --git a/R/quality.R b/R/quality.R index 99a72189..8a8f09cc 100644 --- a/R/quality.R +++ b/R/quality.R @@ -60,6 +60,7 @@ heatmap_plot <- function(object, assay_name) { #' for RNA-seq gene expression quality control. #' #' @inheritParams module_arguments +#' @inheritParams teal::module #' #' @return Shiny module to be used in the teal app. #' @@ -84,7 +85,8 @@ tm_g_quality <- function(label, exclude_assays = character(), pre_output = NULL, post_output = NULL, - .test = FALSE) { + .test = FALSE, + transformators = list()) { assert_string(label) assert_string(mae_name) assert_character(exclude_assays, any.missing = FALSE) @@ -106,6 +108,7 @@ tm_g_quality <- function(label, post_output = post_output, .test = .test ), + transformators = transformators, datanames = mae_name ) } diff --git a/R/scatterplot.R b/R/scatterplot.R index fb0e8167..ee038837 100644 --- a/R/scatterplot.R +++ b/R/scatterplot.R @@ -6,6 +6,7 @@ #' analysis. #' #' @inheritParams module_arguments +#' @inheritParams teal::module #' #' @return Shiny module to be used in the teal app. #' @@ -35,7 +36,8 @@ tm_g_scatterplot <- function(label, ), pre_output = NULL, post_output = NULL, - .test = FALSE) { + .test = FALSE, + transformators = list()) { message("Initializing tm_g_scatterplot") assert_string(label) assert_string(mae_name) @@ -61,6 +63,7 @@ tm_g_scatterplot <- function(label, post_output = post_output, .test = .test ), + transformators = transformators, datanames = mae_name ) } diff --git a/R/volcanoplot.R b/R/volcanoplot.R index bcde96bc..6c115103 100644 --- a/R/volcanoplot.R +++ b/R/volcanoplot.R @@ -6,6 +6,7 @@ #' analysis. #' #' @inheritParams module_arguments +#' @inheritParams teal::module #' #' @return Shiny module to be used in the teal app. #' @@ -30,7 +31,8 @@ tm_g_volcanoplot <- function(label, exclude_assays = character(), pre_output = NULL, post_output = NULL, - .test = FALSE) { + .test = FALSE, + transformators = list()) { message("Initializing tm_g_volcanoplot") assert_string(label) assert_string(mae_name) @@ -53,6 +55,7 @@ tm_g_volcanoplot <- function(label, post_output = post_output, .test = .test ), + transformators = transformators, datanames = mae_name ) } diff --git a/man/sampleVarSpecServer.Rd b/man/sampleVarSpecServer.Rd index a5bbe24a..e218e58c 100644 --- a/man/sampleVarSpecServer.Rd +++ b/man/sampleVarSpecServer.Rd @@ -44,7 +44,7 @@ from.} \item{label_modal_title}{(\code{string})\cr title for the dialog that asks for the text input.} } \value{ -Reactive \code{\link[SummarizedExperiment:SummarizedExperiment-class]{SummarizedExperiment::SummarizedExperiment}} which can be used as +Reactive \code{\link[SummarizedExperiment:RangedSummarizedExperiment-class]{SummarizedExperiment::SummarizedExperiment}} which can be used as input for the relevant \code{hermes} functions. } \description{ diff --git a/man/tm_g_barplot.Rd b/man/tm_g_barplot.Rd index d807fc42..69850659 100644 --- a/man/tm_g_barplot.Rd +++ b/man/tm_g_barplot.Rd @@ -15,7 +15,8 @@ tm_g_barplot( matrixStats::colMaxs), pre_output = NULL, post_output = NULL, - .test = FALSE + .test = FALSE, + transformators = list() ) ui_g_barplot( @@ -63,6 +64,9 @@ elements can be useful).} \item{.test}{(\code{flag})\cr whether to display the internal structure of the plot for testing purposes.} +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} + \item{id}{(\code{string}) the shiny module id.} \item{data}{(\code{reactive})\cr diff --git a/man/tm_g_boxplot.Rd b/man/tm_g_boxplot.Rd index 026b5a3f..5ec32998 100644 --- a/man/tm_g_boxplot.Rd +++ b/man/tm_g_boxplot.Rd @@ -15,7 +15,8 @@ tm_g_boxplot( = matrixStats::colMaxs), pre_output = NULL, post_output = NULL, - .test = FALSE + .test = FALSE, + transformators = list() ) ui_g_boxplot( @@ -63,6 +64,9 @@ elements can be useful).} \item{.test}{(\code{flag})\cr whether to display the internal structure of the plot for testing purposes.} +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} + \item{id}{(\code{string}) the shiny module id.} \item{data}{(\code{reactive})\cr diff --git a/man/tm_g_forest_tte.Rd b/man/tm_g_forest_tte.Rd index 924c84fe..1e910ec1 100644 --- a/man/tm_g_forest_tte.Rd +++ b/man/tm_g_forest_tte.Rd @@ -20,7 +20,8 @@ tm_g_forest_tte( post_output = NULL, plot_height = c(600L, 200L, 2000L), plot_width = c(1360L, 500L, 2000L), - .test = FALSE + .test = FALSE, + transformators = list() ) ui_g_forest_tte( @@ -95,6 +96,9 @@ and maximum plot width.} \item{.test}{(\code{flag})\cr whether to display the internal structure of the plot for testing purposes.} +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} + \item{id}{(\code{string}) the shiny module id.} \item{data}{(\code{reactive})\cr diff --git a/man/tm_g_km.Rd b/man/tm_g_km.Rd index a45d2826..348de3c2 100644 --- a/man/tm_g_km.Rd +++ b/man/tm_g_km.Rd @@ -18,7 +18,8 @@ tm_g_km( matrixStats::colMaxs), pre_output = NULL, post_output = NULL, - .test = FALSE + .test = FALSE, + transformators = list() ) ui_g_km( @@ -85,6 +86,9 @@ elements can be useful).} \item{.test}{(\code{flag})\cr whether to display the internal structure of the plot for testing purposes.} +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} + \item{id}{(\code{string}) the shiny module id.} \item{data}{(\code{reactive})\cr diff --git a/man/tm_g_pca.Rd b/man/tm_g_pca.Rd index 01ed0ddc..1d11cc2d 100644 --- a/man/tm_g_pca.Rd +++ b/man/tm_g_pca.Rd @@ -13,7 +13,8 @@ tm_g_pca( exclude_assays = character(), pre_output = NULL, post_output = NULL, - .test = FALSE + .test = FALSE, + transformators = list() ) ui_g_pca(id, mae_name, pre_output, post_output, .test = FALSE) @@ -49,6 +50,9 @@ elements can be useful).} \item{.test}{(\code{flag})\cr whether to display the internal structure of the plot for testing purposes.} +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} + \item{id}{(\code{string}) the shiny module id.} \item{data}{(\code{reactive})\cr diff --git a/man/tm_g_quality.Rd b/man/tm_g_quality.Rd index b42fe09f..04d263de 100644 --- a/man/tm_g_quality.Rd +++ b/man/tm_g_quality.Rd @@ -13,7 +13,8 @@ tm_g_quality( exclude_assays = character(), pre_output = NULL, post_output = NULL, - .test = FALSE + .test = FALSE, + transformators = list() ) ui_g_quality(id, mae_name, pre_output, post_output, .test = FALSE) @@ -49,6 +50,9 @@ elements can be useful).} \item{.test}{(\code{flag})\cr whether to display the internal structure of the plot for testing purposes.} +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} + \item{id}{(\code{string}) the shiny module id.} \item{data}{(\code{reactive})\cr diff --git a/man/tm_g_scatterplot.Rd b/man/tm_g_scatterplot.Rd index f6cb038a..16f8a86f 100644 --- a/man/tm_g_scatterplot.Rd +++ b/man/tm_g_scatterplot.Rd @@ -15,7 +15,8 @@ tm_g_scatterplot( matrixStats::colMaxs), pre_output = NULL, post_output = NULL, - .test = FALSE + .test = FALSE, + transformators = list() ) ui_g_scatterplot( @@ -63,6 +64,9 @@ elements can be useful).} \item{.test}{(\code{flag})\cr whether to display the internal structure of the plot for testing purposes.} +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} + \item{id}{(\code{string}) the shiny module id.} \item{data}{(\code{reactive})\cr diff --git a/man/tm_g_volcanoplot.Rd b/man/tm_g_volcanoplot.Rd index 340b8863..84625ab4 100644 --- a/man/tm_g_volcanoplot.Rd +++ b/man/tm_g_volcanoplot.Rd @@ -13,7 +13,8 @@ tm_g_volcanoplot( exclude_assays = character(), pre_output = NULL, post_output = NULL, - .test = FALSE + .test = FALSE, + transformators = list() ) ui_g_volcanoplot(id, mae_name, pre_output, post_output, .test = FALSE) @@ -49,6 +50,9 @@ elements can be useful).} \item{.test}{(\code{flag})\cr whether to display the internal structure of the plot for testing purposes.} +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} + \item{id}{(\code{string}) the shiny module id.} \item{data}{(\code{reactive})\cr