diff --git a/inst/shinyapp/PGdata.R b/inst/shinyapp/PGdata.R index 47afb2a2..0426c4ce 100644 --- a/inst/shinyapp/PGdata.R +++ b/inst/shinyapp/PGdata.R @@ -74,7 +74,7 @@ profile_vec_list$drug <- profile_vec_list$drug[!profile_vec_list$drug %in% c("OP ## clean OP* rm(list = ls()[grepl("OP", ls())]) -## some preprocess for Drugs-omics pairs analysis +## some preprocess for Drug-Omics Correlation Analysis tmp <- list() tmp$omic_sel <- c("exp", "meth", "protein", "cnv") diff --git a/inst/shinyapp/modules/07_PharmacoGenomics/DrugOmicPair.R b/inst/shinyapp/modules/07_PharmacoGenomics/DrugOmicPair.R index 29e28c32..d612cf06 100644 --- a/inst/shinyapp/modules/07_PharmacoGenomics/DrugOmicPair.R +++ b/inst/shinyapp/modules/07_PharmacoGenomics/DrugOmicPair.R @@ -17,7 +17,7 @@ uiDrugOmicPair <- function(id){ # Select omics ---- column(4, selectizeInput( - ns("select_specific_omic"), "Molecule Selection:", choices = NULL, + ns("select_specific_omic"), "Molecule selection:", choices = NULL, options = list( placeholder = 'Please select a molecular feature', onInitialize = I('function() { this.setValue(""); }'), selected = "ABCC3" @@ -27,7 +27,7 @@ uiDrugOmicPair <- function(id){ # Select drugs ---- column(4, selectizeInput( - ns("select_specific_drug"), "Drug Selection:", choices = NULL, + ns("select_specific_drug"), "Drug selection:", choices = NULL, options = list( placeholder = 'Please select a drug', onInitialize = I('function() { this.setValue(""); }'), selected = "YM-155" @@ -66,7 +66,7 @@ serverDrugOmicPair <- function(input, output, session){ "mutation_site" = omics_search[omics_search$type %in% "mutation_site",]$omics, "fusion" = omics_search[omics_search$type %in% "fusion",]$omics) updateSelectizeInput(session = session, inputId = 'select_specific_omic', - label = 'Molecule Selection:', choices = omics_search_sel$omics, server = TRUE, + label = 'Molecule selection:', choices = omics_search_sel$omics, server = TRUE, options = list(placeholder = 'Please select a molecular feature', onInitialize = I('function() { this.setValue(""); }')), selected = "ABCC3" ) @@ -74,7 +74,7 @@ serverDrugOmicPair <- function(input, output, session){ ## Drugs ---- updateSelectizeInput(session = session, inputId = 'select_specific_drug', - label = 'Drug Selection:', choices = drugs_search$drugs, server = TRUE, + label = 'Drug selection:', choices = drugs_search$drugs, server = TRUE, options = list(placeholder = 'Please select a drug', onInitialize = I('function() { this.setValue(""); }')), selected = "YM-155" ) diff --git a/inst/shinyapp/modules/07_PharmacoGenomics/FeatureAcrossType.R b/inst/shinyapp/modules/07_PharmacoGenomics/FeatureAcrossType.R index 73c34e36..27768dd6 100644 --- a/inst/shinyapp/modules/07_PharmacoGenomics/FeatureAcrossType.R +++ b/inst/shinyapp/modules/07_PharmacoGenomics/FeatureAcrossType.R @@ -19,7 +19,7 @@ uiFeatureAcrossType <- function(id){ # Select specific feature ---- column(4, selectizeInput( - ns("select_specific_feature"), "Features Selection:", choices = NULL, + ns("select_specific_feature"), "Feature selection:", choices = NULL, options = list( placeholder = 'Please select a feature', onInitialize = I('function() { this.setValue(""); }'), selected = "LAPATINIB" @@ -27,11 +27,11 @@ uiFeatureAcrossType <- function(id){ # DOPselectDrugsUI("DOPselectDrugs"), ), # Select trait to profile ---- - column(4, - selectInput(inputId = ns("select_trait"), - "Please select the trait type:", - choices = c("Cell_Type_Source"), selected = "Cell_Type_Source" - )), + # column(4, + # selectInput(inputId = ns("select_trait"), + # "Please select the trait type:", + # choices = c("Cell_Type_Source"), selected = "Cell_Type_Source" + # )) ), # Plot results ---- wellPanel( @@ -63,7 +63,7 @@ serverFeatureAcrossType <- function(input, output, session){ "mutation_site" = omics_search[omics_search$type %in% "mutation_site",]$omics, "fusion" = omics_search[omics_search$type %in% "fusion",]$omics) updateSelectizeInput(session = session, inputId = 'select_specific_feature', - label = 'Features Selection:', choices = features_search_sel$features, server = TRUE, + label = 'Feature Selection:', choices = features_search_sel$features, server = TRUE, options = list(placeholder = 'Please select a feature', onInitialize = I('function() { this.setValue(""); }')), selected = "ABCC3" ) diff --git a/inst/shinyapp/modules/07_PharmacoGenomics/FeatureDatabaseSig_singlethread.R b/inst/shinyapp/modules/07_PharmacoGenomics/FeatureDatabaseSig_singlethread.R index 87e996a4..f9431d67 100644 --- a/inst/shinyapp/modules/07_PharmacoGenomics/FeatureDatabaseSig_singlethread.R +++ b/inst/shinyapp/modules/07_PharmacoGenomics/FeatureDatabaseSig_singlethread.R @@ -20,7 +20,7 @@ uiFeatureDatabaseSig <- function(id){ # Select specific feature ---- column(3, selectizeInput( - ns("select_specific_feature"), "Features Selection:", choices = NULL, + ns("select_specific_feature"), "Feature Selection:", choices = NULL, options = list( placeholder = 'Please select a feature', onInitialize = I('function() { this.setValue(""); }'), selected = "" @@ -87,7 +87,7 @@ serverFeatureDatabaseSig <- function(input, output, session){ "mutation_site" = omics_search[omics_search$type %in% "mutation_site",]$omics, "fusion" = omics_search[omics_search$type %in% "fusion",]$omics) updateSelectizeInput(session = session, inputId = 'select_specific_feature', - label = 'Features Selection:', choices = features_search_sel$features, server = TRUE, + label = 'Feature Selection:', choices = features_search_sel$features, server = TRUE, options = list(placeholder = 'Please select a feature', onInitialize = I('function() { this.setValue(""); }')), selected = "" ) diff --git a/inst/shinyapp/modules/07_PharmacoGenomics/ProfileDrugSens.R b/inst/shinyapp/modules/07_PharmacoGenomics/ProfileDrugSens.R index 5a90f862..05948280 100644 --- a/inst/shinyapp/modules/07_PharmacoGenomics/ProfileDrugSens.R +++ b/inst/shinyapp/modules/07_PharmacoGenomics/ProfileDrugSens.R @@ -14,20 +14,19 @@ uiProfileDrugSens <- function(id){ mainPanel( column(6, radioButtons(inputId = ns("Select_profile_type"), - strong("Visualization Types"), + strong("Visualization Type:"), choices = list("TSNE" = "TSNE", "MAD&MEDIAN" = "MAD"), selected = "TSNE")), column(6, selectizeInput( - ns("select_specific_drug"), "Drugs Selection", choices = NULL, + ns("select_specific_drug"), "Drug Selection:", choices = NULL, options = list( placeholder = 'You can highlight targeted drug', onInitialize = I('function() { this.setValue(""); }'), selected = "" )) ), column(12, - plotly::plotlyOutput(ns("p_drug_sens")), - # p("You can interact with the above ggplotly-based plot", align = "center")) + plotly::plotlyOutput(ns("p_drug_sens")) ) ) )) @@ -47,7 +46,7 @@ serverProfileDrugSens <- function(input, output, session){ "Prism" = drugs_search2[drugs_search2$type %in% "Prism",]$drugs ) updateSelectizeInput(session = session, inputId = 'select_specific_drug', - label = 'Drugs Selection', choices = drugs_search3$drugs, server = TRUE, + label = 'Drug Selection:', choices = drugs_search3$drugs, server = TRUE, options = list(placeholder = 'You can highlight targeted drug', onInitialize = I('function() { this.setValue(""); }')), selected = "" ) diff --git a/inst/shinyapp/server/modules.R b/inst/shinyapp/server/modules.R index 4c47ab2c..b4893b90 100644 --- a/inst/shinyapp/server/modules.R +++ b/inst/shinyapp/server/modules.R @@ -1,3 +1,6 @@ +html_spin = tagList(spin_1(), br(), + h2("Loading independent modules (Only needed for the first time)")) + # # quick module observeEvent(req(input$navbar=="TCGA (GTEx): Molecular comparison"),{ callModule(server.modules_1_tcga_01, "modules_1_tcga_01") @@ -23,9 +26,9 @@ observeEvent(req(input$navbar=="TCGA: Dimension reduction"),{ callModule(server.modules_1_tcga_11, "modules_1_tcga_11") }, once = TRUE) -observeEvent(req(input$navbar=="TCGA: Pathway cross analysis"),{ - callModule(server.modules_1_tcga_12, "modules_1_tcga_12") -}, once = TRUE) +# observeEvent(req(input$navbar=="TCGA: Pathway cross analysis"),{ +# callModule(server.modules_1_tcga_12, "modules_1_tcga_12") +# }, once = TRUE) observeEvent(req(input$navbar=="PCAWG: Molecular comparison"),{ callModule(server.modules_2_pcawg_01, "modules_2_pcawg_01") @@ -50,7 +53,7 @@ observeEvent(req(input$navbar=="CCLE: Molecular correlation"),{ }, once = TRUE) observeEvent(req(input$navbar=="CCLE: Drug analysis"),{ - waiter <- waiter::Waiter$new(color = "grey", fadeout = TRUE) + waiter <- waiter::Waiter$new(color = "grey", fadeout = TRUE, html = html_spin) waiter$show() callModule(server.modules_3_ccle_03, "modules_3_ccle_03") callModule(server.modules_3_ccle_04, "modules_3_ccle_04") @@ -60,8 +63,7 @@ observeEvent(req(input$navbar=="CCLE: Drug analysis"),{ ## TPC -html_spin = tagList(spin_1(), br(), - h2("Loading (Only needed for the first time)")) + # TCGA pancan observeEvent(req(input$navbar=="TCGA: Correlation Analysis"),{ waiter <- waiter::Waiter$new(color = "grey", fadeout = TRUE, html = html_spin) @@ -147,7 +149,7 @@ observeEvent(req(input$navbar=="CCLE: Comparison Analysis"),{ # # identifier help observeEvent(req(input$navbar=="TPC ID Query"),{ - waiter <- waiter::Waiter$new(color = "grey", fadeout = TRUE) + waiter <- waiter::Waiter$new(color = "grey", fadeout = TRUE, html = html_spin) waiter$show() callModule(server.modules_id_reference, "modules_id_reference") on.exit(waiter$hide()) @@ -174,14 +176,14 @@ observeEvent(req(input$navbar=="The Repository Dataset"),{ # PharmacoGenomics observeEvent(req(input$navbar %in% c( - "Drugs-omics pairs Analysis", - "Profiles Display: Features across different types", - "Profiles Display: Profile of drug sensitivity", - "Features database significant analysis", + "Drug-Omics Correlation Analysis", + "Feature Abundance Profile in Databases", + "Dimension Reduction Profile of Cell Drug Sensitivity", + "Feature Scaling Association Analysis", "Statistics and Annotations" )),{ - waiter <- waiter::Waiter$new(color = "grey", fadeout = TRUE) + waiter <- waiter::Waiter$new(color = "grey", fadeout = TRUE, html = html_spin) waiter$show() message("Preprocessing drug omics data...") source(system.file("shinyapp/PGdata.R", package = "UCSCXenaShiny")) diff --git a/inst/shinyapp/ui/PharmacoGenomics.R b/inst/shinyapp/ui/PharmacoGenomics.R index 6e10e340..82fa0c0d 100644 --- a/inst/shinyapp/ui/PharmacoGenomics.R +++ b/inst/shinyapp/ui/PharmacoGenomics.R @@ -1,24 +1,24 @@ ui.page_PharmacoGenomics <- function() { navbarMenu( - title = "PharmacoGenomics Analysis", + title = "PharmacoGenomics", icon = icon("buromobelexperte"), - ## Drugs-omics pairs analysis ---- + ## Drug-Omics Correlation Analysis ---- tabPanel( - "Drugs-omics pairs Analysis", + "Drug-Omics Correlation Analysis", uiDrugOmicPair("DrugOmicPair") ), ## Profiles Display ---- tabPanel( - "Profiles Display: Features across different types", + "Feature Abundance Profile in Databases", uiFeatureAcrossType("FeatureAcrossType") ), tabPanel( - "Profiles Display: Profile of drug sensitivity", + "Dimension Reduction Profile of Cell Drug Sensitivity", uiProfileDrugSens("ProfileDrugSens") ), ## Features database significant analysis ---- tabPanel( - "Scaling features associations analysis", + "Feature Scaling Association Analysis", uiFeatureDatabaseSig("FeatureDatabaseSig") ), ## Statistics and Annotations ---- diff --git a/inst/shinyapp/ui/home.R b/inst/shinyapp/ui/home.R index f9fed98f..a8efaef4 100644 --- a/inst/shinyapp/ui/home.R +++ b/inst/shinyapp/ui/home.R @@ -166,7 +166,7 @@ ui.page_home <- function() { column(12, #offset = 1, tags$ul( tags$li("2024-06-25: Design gene and pathway cross-omics analysis",style = "font-size: 20px;"), - tags$li("2024-02-14: Incorporate the PharmacoGenomics analysis modules",style = "font-size: 20px;"), + tags$li("2024-02-14: Incorporate the PharmacoGenomics modules",style = "font-size: 20px;"), tags$li("2024-01-21: Adjust homepge with slick gallery to show basic page help.",style = "font-size: 20px;"), tags$li("2024-01-16: Introduce MSigDB genesets for molecule batch analysis.",style = "font-size: 20px;"), tags$li("2023-12-20: Add download modules that support data requisition.",style = "font-size: 20px;"), diff --git a/inst/shinyapp/ui/link2advanced.R b/inst/shinyapp/ui/link2advanced.R index cb199da0..ab28b452 100644 --- a/inst/shinyapp/ui/link2advanced.R +++ b/inst/shinyapp/ui/link2advanced.R @@ -9,7 +9,7 @@ ui.link2advanced <- function() { # tabPanel(a("Personalized T·P·C Pipelines", # href="https://lishensuo.github.io/UCSCXenaShiny_Book/", # target="_blank")), - # tabPanel(a("PharmacoGenomics Analysis", + # tabPanel(a("PharmacoGenomics", # href="https://lishensuo.github.io/UCSCXenaShiny_Book/", # target="_blank")), )