From 5d8c103bd84ae7ac76329d2df62720a41d93f1b4 Mon Sep 17 00:00:00 2001 From: Witold Wolski Date: Fri, 26 Jan 2024 16:05:46 +0100 Subject: [PATCH] doc --- R/LFQDataPlotter.R | 12 +++++++----- man/LFQDataPlotter.Rd | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/R/LFQDataPlotter.R b/R/LFQDataPlotter.R index 4ff4a29ef..3ac4fc6c7 100644 --- a/R/LFQDataPlotter.R +++ b/R/LFQDataPlotter.R @@ -11,8 +11,9 @@ #' lfqdata <- LFQData$new( #' istar$data, #' istar$config) -#' #LFQDataPlotter$debug("pca_plotly") +#' #LFQDataPlotter$debug("boxplots") #' lfqplotter <- lfqdata$get_Plotter() +#' #' stopifnot(class(lfqplotter$heatmap()) == "pheatmap") #' stopifnot(class(lfqplotter$heatmap_cor()) == "pheatmap") #' stopifnot("ggplot" %in% class(lfqplotter$pca())) @@ -136,14 +137,15 @@ LFQDataPlotter <- R6::R6Class( #' @param facet enable facet wrap if hierarchy_depth less then hierarchy lenght. #' @return tibble with column boxplots containing ggplot objects boxplots = function(facet = TRUE){ - if (config$table$hierarchy_depth < length(config$table$hierarchy) && facet) { + config <- self$lfq$config + if (config$table$hierarchyDepth < length(config$table$hierarchy) && facet) { bb <- prolfqua::plot_hierarchies_boxplot_df( - self$lfq$data, self$lfq$config, + self$lfq$data, config, hierarchy = config$table$hierarchy_keys_depth(), - facet_grid_on = config$table$hierarchy_keys()[config$table$hierarchy_depth]) + facet_grid_on = config$table$hierarchy_keys()[config$table$hierarchyDepth + 1]) } else { - bb <- prolfqua::plot_hierarchies_boxplot_df(self$lfq$data, self$lfq$config, + bb <- prolfqua::plot_hierarchies_boxplot_df(self$lfq$data, config, hierarchy = config$table$hierarchy_keys_depth(), facet_grid_on = NULL) diff --git a/man/LFQDataPlotter.Rd b/man/LFQDataPlotter.Rd index 834f49d31..e795e9261 100644 --- a/man/LFQDataPlotter.Rd +++ b/man/LFQDataPlotter.Rd @@ -18,8 +18,9 @@ istar <- sim_lfq_data_peptide_config() lfqdata <- LFQData$new( istar$data, istar$config) -#LFQDataPlotter$debug("pca_plotly") +#LFQDataPlotter$debug("boxplots") lfqplotter <- lfqdata$get_Plotter() + stopifnot(class(lfqplotter$heatmap()) == "pheatmap") stopifnot(class(lfqplotter$heatmap_cor()) == "pheatmap") stopifnot("ggplot" \%in\% class(lfqplotter$pca()))