Skip to content

Commit

Permalink
优化文字标签
Browse files Browse the repository at this point in the history
  • Loading branch information
ShixiangWang committed Jul 19, 2024
1 parent ebb49b7 commit e2f9cfb
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 39 deletions.
2 changes: 1 addition & 1 deletion inst/shinyapp/PGdata.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
8 changes: 4 additions & 4 deletions inst/shinyapp/modules/07_PharmacoGenomics/DrugOmicPair.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -66,15 +66,15 @@ 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"
)
})

## 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"
)
Expand Down
14 changes: 7 additions & 7 deletions inst/shinyapp/modules/07_PharmacoGenomics/FeatureAcrossType.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ 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"
))
# 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(
Expand Down Expand Up @@ -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"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down Expand Up @@ -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 = ""
)
Expand Down
9 changes: 4 additions & 5 deletions inst/shinyapp/modules/07_PharmacoGenomics/ProfileDrugSens.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
)
)
))
Expand All @@ -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 = ""
)
Expand Down
26 changes: 14 additions & 12 deletions inst/shinyapp/server/modules.R
Original file line number Diff line number Diff line change
@@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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)
Expand Down Expand Up @@ -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())
Expand All @@ -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"))
Expand Down
12 changes: 6 additions & 6 deletions inst/shinyapp/ui/PharmacoGenomics.R
Original file line number Diff line number Diff line change
@@ -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 ----
Expand Down
2 changes: 1 addition & 1 deletion inst/shinyapp/ui/home.R
Original file line number Diff line number Diff line change
Expand Up @@ -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;"),
Expand Down
2 changes: 1 addition & 1 deletion inst/shinyapp/ui/link2advanced.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
)
Expand Down

0 comments on commit e2f9cfb

Please sign in to comment.