Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1441 Introduce transformators parameter in modules #331

Merged
merged 8 commits into from
Jan 21, 2025
7 changes: 5 additions & 2 deletions R/tm_g_gh_boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#' @param alpha numeric vector to define transparency of plotted points.
#'
#' @inheritParams teal.widgets::standard_layout
#' @inheritParams teal::module
#'
#' @author Jeff Tomlinson (tomlinsj) jeffrey.tomlinson@roche.com
#' @author Balazs Toth (tothb2) toth.balazs@gene.com
Expand Down Expand Up @@ -168,7 +169,8 @@ tm_g_gh_boxplot <- function(label,
dot_size = c(2, 1, 12),
alpha = c(0.8, 0.0, 1.0),
pre_output = NULL,
post_output = NULL) {
post_output = NULL,
transformators = list()) {
message("Initializing tm_g_gh_boxplot")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
Expand Down Expand Up @@ -212,7 +214,8 @@ tm_g_gh_boxplot <- function(label,
module_args = args
),
ui = ui_g_boxplot,
ui_args = args
ui_args = args,
transformators = transformators
)
}

Expand Down
7 changes: 5 additions & 2 deletions R/tm_g_gh_correlationplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#' @description Scatter Plot Teal Module For Biomarker Analysis
#'
#' @inheritParams teal.widgets::standard_layout
#' @inheritParams teal::module
#' @param label menu item label of the module in the teal app.
#' @param dataname analysis data passed to the data argument of \code{\link[teal]{init}}. E.g. `ADaM` structured
#' laboratory data frame \code{ADLB}.
Expand Down Expand Up @@ -220,7 +221,8 @@ tm_g_gh_correlationplot <- function(label,
dot_size = c(1, 1, 12),
reg_text_size = c(3, 3, 10),
pre_output = NULL,
post_output = NULL) {
post_output = NULL,
transformators = list()) {
message("Initializing tm_g_gh_correlationplot")
checkmate::assert_class(xaxis_param, "choices_selected")
checkmate::assert_class(yaxis_param, "choices_selected")
Expand Down Expand Up @@ -264,7 +266,8 @@ tm_g_gh_correlationplot <- function(label,
module_args = args
),
ui = ui_g_correlationplot,
ui_args = args
ui_args = args,
transformators = transformators
)
}

Expand Down
7 changes: 5 additions & 2 deletions R/tm_g_gh_density_distribution_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#'
#' @inheritParams teal.widgets::standard_layout
#' @inheritParams tm_g_gh_scatterplot
#' @inheritParams teal::module
#'
#'
#' @author Nick Paszty (npaszty) paszty.nicholas@gene.com
Expand Down Expand Up @@ -129,7 +130,8 @@ tm_g_gh_density_distribution_plot <- function(label, # nolint
comb_line = TRUE,
rotate_xlab = FALSE,
pre_output = NULL,
post_output = NULL) {
post_output = NULL,
transformators = list()) {
message("Initializing tm_g_gh_density_distribution_plot")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
Expand Down Expand Up @@ -168,7 +170,8 @@ tm_g_gh_density_distribution_plot <- function(label, # nolint
module_args = args
),
ui = ui_g_density_distribution_plot,
ui_args = args
ui_args = args,
transformators = transformators
)
}

Expand Down
5 changes: 4 additions & 1 deletion R/tm_g_gh_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#' This teal module renders the UI and calls the function that creates a line plot.
#'
#' @inheritParams teal.widgets::standard_layout
#' @inheritParams teal::module
#' @param label menu item label of the module in the teal app.
#' @param dataname analysis data passed to the data argument of \code{\link[teal]{init}}. E.g. `ADaM` structured
#' laboratory data frame `ADLB`.
Expand Down Expand Up @@ -155,7 +156,8 @@ tm_g_gh_lineplot <- function(label,
count_threshold = 0,
table_font_size = c(12, 4, 20),
dot_size = c(2, 1, 12),
plot_relative_height_value = 1000) {
plot_relative_height_value = 1000,
transformators = list()) {
message("Initializing tm_g_gh_lineplot")
# Validate string inputs
checkmate::assert_string(label)
Expand Down Expand Up @@ -220,6 +222,7 @@ tm_g_gh_lineplot <- function(label,
),
ui = ui_lineplot,
ui_args = args,
transformators = transformators,
datanames = dataname
)
}
Expand Down
7 changes: 5 additions & 2 deletions R/tm_g_gh_scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#' instead.
#'
#' @inheritParams teal.widgets::standard_layout
#' @inheritParams teal::module
#' @param label menu item label of the module in the teal app.
#' @param dataname analysis data passed to the data argument of \code{\link[teal]{init}}. E.g. `ADaM` structured
#' laboratory data frame \code{ADLB}.
Expand Down Expand Up @@ -138,7 +139,8 @@ tm_g_gh_scatterplot <- function(label,
dot_size = c(1, 1, 12),
reg_text_size = c(3, 3, 10),
pre_output = NULL,
post_output = NULL) {
post_output = NULL,
transformators = list()) {
lifecycle::deprecate_soft(
when = "0.1.15",
what = "tm_g_gh_scatterplot()",
Expand Down Expand Up @@ -178,7 +180,8 @@ tm_g_gh_scatterplot <- function(label,
module_args = args
),
ui = ui_g_scatterplot,
ui_args = args
ui_args = args,
transformators = transformators
)
}

Expand Down
5 changes: 4 additions & 1 deletion R/tm_g_gh_spaghettiplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#' @param hline_vars_colors a character vector naming the colors for the additional horizontal lines.
#' @param hline_vars_labels a character vector naming the labels for the additional horizontal lines that will appear
#' in the legend.
#' @inheritParams teal::module
#' @inheritParams teal.widgets::standard_layout
#'
#' @author Wenyi Liu (luiw2) wenyi.liu@roche.com
Expand Down Expand Up @@ -188,7 +189,8 @@ tm_g_gh_spaghettiplot <- function(label,
hline_vars_colors = "green",
hline_vars_labels = hline_vars,
pre_output = NULL,
post_output = NULL) {
post_output = NULL,
transformators = list()) {
message("Initializing tm_g_gh_spaghettiplot")

# Validate string inputs
Expand Down Expand Up @@ -258,6 +260,7 @@ tm_g_gh_spaghettiplot <- function(label,
),
ui = g_ui_spaghettiplot,
ui_args = args,
transformators = transformators,
datanames = dataname
)
}
Expand Down
6 changes: 5 additions & 1 deletion man/tm_g_gh_boxplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion man/tm_g_gh_correlationplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion man/tm_g_gh_density_distribution_plot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion man/tm_g_gh_lineplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion man/tm_g_gh_scatterplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion man/tm_g_gh_spaghettiplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading