From 697bcb907d77227df5436e7501db764751762609 Mon Sep 17 00:00:00 2001 From: leopoldguyot Date: Wed, 21 Aug 2024 18:34:10 +0200 Subject: [PATCH] [FEAT] - change table names --- R/importQFeatures.R | 10 +++++----- R/interface_module_box_read_table.R | 6 +----- R/interface_module_qc_metrics.R | 21 ++++++++++----------- R/utils_global.R | 2 -- man/importQFeatures.Rd | 8 ++++---- 5 files changed, 20 insertions(+), 27 deletions(-) diff --git a/R/importQFeatures.R b/R/importQFeatures.R index d764554..abbf401 100644 --- a/R/importQFeatures.R +++ b/R/importQFeatures.R @@ -7,8 +7,8 @@ #' \item The first section (Import) of the app allow to convert tables to a QFeatures object. #' \item The second section (Pre-processing) of the app allow to perform some optional pre-processing steps. #' } -#' @param sample_table A dataframe that contains the sample table. -#' @param input_table A dataframe that contains the input table. +#' @param colData A dataframe that contains the sample table. +#' @param assayData A dataframe that contains the input table. #' #' @return Return the "importQFeatures" shiny app object. #' @export @@ -19,14 +19,14 @@ #' #' data("sampleTable") #' data("inputTable") -#' app <- importQFeatures(sample_table = sampleTable, input_table = inputTable) +#' app <- importQFeatures(colData = sampleTable, assayData = inputTable) #' #' if (interactive()) { #' shiny::runApp(app) #' } #' -importQFeatures <- function(sample_table = NULL, input_table = NULL) { +importQFeatures <- function(colData = NULL, assayData = NULL) { ui <- build_ui() - server <- build_server(sample_table, input_table) + server <- build_server(colData, assayData) shinyApp(ui = ui, server = server) } diff --git a/R/interface_module_box_read_table.R b/R/interface_module_box_read_table.R index 285784b..e33d3f0 100644 --- a/R/interface_module_box_read_table.R +++ b/R/interface_module_box_read_table.R @@ -13,11 +13,7 @@ box_read_table_ui <- function(id) { tagList( box( - title = paste( - upper_first(id), - "Table", - sep = " " - ), + title = if (id == "input") "assayData" else "colData", status = "primary", width = 12, solidHeader = TRUE, diff --git a/R/interface_module_qc_metrics.R b/R/interface_module_qc_metrics.R index 54e450a..21e9480 100644 --- a/R/interface_module_qc_metrics.R +++ b/R/interface_module_qc_metrics.R @@ -16,7 +16,7 @@ interface_module_qc_metrics <- function(id, type) { box( title = "PCA", status = "primary", - width = if (type == "features") 8 else 12, + width = 8, solidHeader = FALSE, collapsible = TRUE, fluidRow( @@ -48,16 +48,15 @@ interface_module_qc_metrics <- function(id, type) { ) ) ), - if (type == "features") { - box( - title = "Single Feature Visualisation", - status = "primary", - width = 4, - solidHeader = FALSE, - collapsible = TRUE, - interface_module_viz_box(NS(id, "viz_box")) - ) - } + + box( + title = "Single Feature Visualisation", + status = "primary", + width = 4, + solidHeader = FALSE, + collapsible = TRUE, + interface_module_viz_box(NS(id, "viz_box")) + ) ) ) } diff --git a/R/utils_global.R b/R/utils_global.R index 50bb9c7..864d56f 100644 --- a/R/utils_global.R +++ b/R/utils_global.R @@ -627,8 +627,6 @@ features_boxplot <- function(assays_df) { #' unique_feature_boxplot <- function(assays_df, feature) { - print(head(assays_df)) - print(feature) plot <- ggplot(assays_df[assays_df$feature_type == feature, , drop = FALSE], aes(x = sample_type, y = intensity, colour = sample_type)) + geom_boxplot() diff --git a/man/importQFeatures.Rd b/man/importQFeatures.Rd index 4397c85..15788b8 100644 --- a/man/importQFeatures.Rd +++ b/man/importQFeatures.Rd @@ -4,12 +4,12 @@ \alias{importQFeatures} \title{A shiny app to import QFeatures objects, some optional pre-processing steps.} \usage{ -importQFeatures(sample_table = NULL, input_table = NULL) +importQFeatures(colData = NULL, assayData = NULL) } \arguments{ -\item{sample_table}{A dataframe that contains the sample table.} +\item{colData}{A dataframe that contains the sample table.} -\item{input_table}{A dataframe that contains the input table.} +\item{assayData}{A dataframe that contains the input table.} } \value{ Return the "importQFeatures" shiny app object. @@ -28,7 +28,7 @@ library(QFeaturesGUI) data("sampleTable") data("inputTable") -app <- importQFeatures(sample_table = sampleTable, input_table = inputTable) +app <- importQFeatures(colData = sampleTable, assayData = inputTable) if (interactive()) { shiny::runApp(app)