Skip to content

Commit

Permalink
Merge pull request #311 from lishensuo/develop25
Browse files Browse the repository at this point in the history
fix general analysis bugs
  • Loading branch information
lishensuo authored Feb 26, 2024
2 parents 7cea773 + 68ef912 commit 8cccd3f
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 57 deletions.
2 changes: 1 addition & 1 deletion inst/shinyapp/modules/modules-z-download-1-pancan.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ ui.modules_download_pancan = function(id){
br(),br(),br(),br(),
dataTableOutput(ns("L3s_x_data")),
br(),
h3("3. Download results"),
h3("4. Download results"),
fluidRow(
column(3, downloadButton(ns("save_csv"), "Download table(.csv)")),
column(3, offset = 2, downloadButton(ns("save_rda"), "Download table(.rda)"))
Expand Down
4 changes: 4 additions & 0 deletions inst/shinyapp/modules/quick/modules-pancan-1-search.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ server.modules_pancan_dist <- function(input, output, session) {
selected = profile_choices()$default
)
})

observeEvent(input$Mode, {
updateTabsetPanel(inputId = "Mode_params", selected = input$Mode)
})

opt_pancan = callModule(mol_origin_Server, "mol_origin2quick", database = "toil")

Expand Down
20 changes: 10 additions & 10 deletions inst/shinyapp/modules/quick/modules-pancan-10-mut.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ ui.modules_pancan_mut = function(id){
ns = ns,
condition = "input.toggleBtn % 2 == 1",
mol_origin_UI(ns("mol_origin2quick"), database = "toil")
),
), br(),
virtualSelectInput(
inputId = ns("mut_Gene"),
label = "Grouping by gene mutation",
choices = NULL,
width = "100%",
search = TRUE,
allowNewOption = TRUE,
dropboxWidth = "200%"
), br(),
shinyWidgets::prettyRadioButtons(
inputId = ns("profile"), label = "Select affected genomic profile:",
choiceValues = c("mRNA", "transcript", "methylation", "miRNA"),
Expand All @@ -27,15 +36,6 @@ ui.modules_pancan_mut = function(id){
allowNewOption = TRUE,
dropboxWidth = "200%"
),
virtualSelectInput(
inputId = ns("mut_Gene"),
label = "Grouping by gene mutation",
choices = NULL,
width = "100%",
search = TRUE,
allowNewOption = TRUE,
dropboxWidth = "200%"
),
shinyWidgets::prettyRadioButtons(
inputId = ns("Mode"), label = "Select analysis cancer(s):",
choiceValues = c("Pan-cancer", "Single-cancer"),
Expand Down
11 changes: 8 additions & 3 deletions inst/shinyapp/modules/quick/modules-pancan-5-unicox.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ ui.modules_pancan_unicox <- function(id) {
dropboxWidth = "200%"
),
),
),
column(
3,
wellPanel(
h4("2. Parameters", align = "center"),
selectInput(inputId = ns("measure"), label = "Select Measure for plot", choices = c("OS", "PFI", "DSS", "DFI"), selected = "OS"),
Expand Down Expand Up @@ -68,14 +71,16 @@ ui.modules_pancan_unicox <- function(id) {
color = "primary",
block = TRUE,
size = "sm"
))
)
)
),
column(9,
column(6,
fluidRow(
column(6, offset = 3,
column(8, offset = 2,
plotOutput(ns("unicox_gene_tree"), height = "600px")
)
),
# plotOutput(ns("unicox_gene_tree"), height = "600px"),
hr(),
h5("NOTEs:"),
p("1. We define gene in certain cancer type as risky (log(Hazard Ratio) > 0) or protective (log(Hazard Ratio) < 0) or NS (No statistical significance, P value > 0.05)"),
Expand Down
17 changes: 10 additions & 7 deletions inst/shinyapp/modules/quick/modules-pancan-9-pw-cor.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ ui.modules_pw_cor = function(id){
dropboxWidth = "200%"
),
),
),
column(
3,
wellPanel(
h4("2. Parameters", align = "center"),
selectInput(inputId = ns("use_all"), label = "Use All Cancer Types", choices = c("TRUE", "FALSE"), selected = "FALSE"),
Expand Down Expand Up @@ -99,15 +102,15 @@ ui.modules_pw_cor = function(id){
block = TRUE,
size = "sm"
)
)

)
),
column(
9,
fluidRow(
column(6, offset = 3,
plotOutput(ns("pw_plot"), height = "600px",width = "600px"))
),
6,
# fluidRow(
# column(6, offset = 3,
# plotOutput(ns("pw_plot"), height = "600px",width = "600px"))
# ),
plotOutput(ns("pw_plot"), height = "600px"),
hr(),
h5("NOTEs:"),
p("1. 500 common pathway genesets from 3 resources(50 HALLMARK, 186 KEGG, 264 IOBR) were collected."),
Expand Down
7 changes: 5 additions & 2 deletions inst/shinyapp/modules/quick/modules-pcawg-1-search.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ ui.modules_pcawg_dist <- function(id) {
placement = "right", options = list(container = "body")
),
),
),
column(
3,
wellPanel(
h4("2. Parameters", align = "center"),
materialSwitch(ns("pdist_mode"), "Show violin plot", inline = FALSE),
Expand Down Expand Up @@ -82,10 +85,10 @@ ui.modules_pcawg_dist <- function(id) {
block = TRUE,
size = "sm"
)
)
),
),
column(
9,
6,
plotOutput(ns("gene_pancan_dist"), height = "500px"),
hr(),
h5("NOTEs:"),
Expand Down
54 changes: 29 additions & 25 deletions inst/shinyapp/modules/quick/modules-pcawg-2-unicox.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ ui.modules_pcawg_unicox <- function(id) {
dropboxWidth = "200%"
),
),
),
column(
3,
wellPanel(
h4("2. Parameters", align = "center"),
# selectInput(inputId = ns("measure"), label = "Select Measure for plot", choices = c("OS", "PFI", "DSS", "DFI"), selected = "OS"),
Expand All @@ -52,35 +55,36 @@ ui.modules_pcawg_unicox <- function(id) {
color = "primary",
block = TRUE,
size = "sm"
)),
wellPanel(
h4("3. Download", align = "center"),
numericInput(inputId = ns("height"), label = "Height", value = 8),
numericInput(inputId = ns("width"), label = "Width", value = 6),
prettyRadioButtons(
inputId = ns("device"),
label = "Choose plot format",
choices = c("pdf", "png"),
selected = "pdf",
inline = TRUE,
icon = icon("check"),
animation = "jelly",
fill = TRUE
),
tags$hr(style = "border:none; border-top:2px solid #5E81AC;"),
downloadBttn(
outputId = ns("download"),
style = "gradient",
color = "primary",
block = TRUE,
size = "sm"
)
)
),
wellPanel(
h4("3. Download", align = "center"),
numericInput(inputId = ns("height"), label = "Height", value = 8),
numericInput(inputId = ns("width"), label = "Width", value = 6),
prettyRadioButtons(
inputId = ns("device"),
label = "Choose plot format",
choices = c("pdf", "png"),
selected = "pdf",
inline = TRUE,
icon = icon("check"),
animation = "jelly",
fill = TRUE
),
tags$hr(style = "border:none; border-top:2px solid #5E81AC;"),
downloadBttn(
outputId = ns("download"),
style = "gradient",
color = "primary",
block = TRUE,
size = "sm"
)
)
),
column(
9,
6,
fluidRow(
column(6, offset = 3,
column(8, offset = 2,
plotOutput(ns("unicox_gene_tree"), height = "600px")
)
),
Expand Down
2 changes: 1 addition & 1 deletion inst/shinyapp/server/repository.R
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ observeEvent(input$show_R_code, {

# ref: https://stackoverflow.com/questions/38706965/is-there-any-way-for-an-actionbutton-to-navigate-to-another-tab-within-a-r-shi
observeEvent(input$analyze_data, {
updateNavbarPage(session = session, inputId = "navbar", selected = "General Analysis")
updateNavbarPage(session = session, inputId = "navbar", selected = "General Dataset Analysis")
})

# Show alert info when select rows from table -----------------------------
Expand Down
18 changes: 10 additions & 8 deletions inst/shinyapp/ui/pancan-analysis-quick.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,19 @@ ui.page_pancan_quick <- function() {
"TCGA: Association Between Molecular Profile and Gene Mutation",
ui.modules_pancan_mut("modules_pancan_mut")
),
tabPanel(
"TCGA: Molecular Profile Cox Analysis",
ui.modules_pancan_unicox("modules_pancan_unicox")
),
tabPanel(
"TCGA: Molecular Profile Log-rank Analysis",
ui.modules_sur_plot("modules_sur_plot")
),
tabPanel(
"TCGA: Molecular Profile Cox Analysis",
ui.modules_pancan_unicox("modules_pancan_unicox")
),
tabPanel(
"TCGA: Dimension Reduction Distribution",
ui.modules_dim_dist("modules_dim_dist")
),

tabPanel(
"PCAWG: Molecular Profile Distribution Across Cancer Types (Tumor VS Normal)",
ui.modules_pcawg_dist("modules_pcawg_dist")
Expand All @@ -62,14 +63,15 @@ ui.page_pancan_quick <- function() {
"PCAWG: Molecule-Molecule Correlation",
ui.modules_pcawg_gene_cor("modules_pcawg_gene_cor")
),
tabPanel(
"PCAWG: Molecular Profile Cox Analysis",
ui.modules_pcawg_unicox("modules_pcawg_unicox")
),
tabPanel(
"PCAWG: Molecular Profile Log-rank Analysis",
ui.modules_pcawg_sur_plot("modules_pcawg_sur_plot")
),
tabPanel(
"PCAWG: Molecular Profile Cox Analysis",
ui.modules_pcawg_unicox("modules_pcawg_unicox")
),

tabPanel(
"CCLE: Molecular Profile Distribution Across Cancer Primary Sites",
ui.modules_ccle_dist("modules_ccle_dist")
Expand Down

0 comments on commit 8cccd3f

Please sign in to comment.