Skip to content

Commit

Permalink
Merge pull request #305 from lishensuo/develop21
Browse files Browse the repository at this point in the history
fig a bug when grouping sample
  • Loading branch information
lishensuo authored Jan 27, 2024
2 parents 515ade0 + 62b19ce commit 2611fdd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
22 changes: 15 additions & 7 deletions inst/shinyapp/modules/function/modules-z-group-sample.R
Original file line number Diff line number Diff line change
Expand Up @@ -281,17 +281,22 @@ group_samples_Server = function(input, output, session, database = "toil",
dplyr::filter(Sample %in% samples())
}
}
x_data$level1 = L1_x
x_data$cancer = clinical_phe[,2,drop=T][match(x_data$Sample, clinical_phe$Sample)]
x_data = x_data[,c("id","level1","level2","Sample","value","cancer")] %>%
dplyr::arrange(cancer, Sample)
x_data
# req(nrow(x_data)>0)
if(nrow(x_data)>0){
x_data$level1 = L1_x
x_data$cancer = clinical_phe[,2,drop=T][match(x_data$Sample, clinical_phe$Sample)]
x_data = x_data[,c("id","level1","level2","Sample","value","cancer")] %>%
dplyr::arrange(cancer, Sample)
x_data
} else {
NULL
}

})
# output$condi_dist = renderPrint({head(condi_data())})

output$condi_dist = renderPrint({
if(is.null(condi_data())) return("No item is chosen.")

if(is.null(condi_data())) return("No valid sammple for the identifier.")
if(class(condi_data()[,"value",drop=TRUE])=="numeric"){
summary(condi_data()[,"value",drop=TRUE])
} else {
Expand All @@ -301,6 +306,7 @@ group_samples_Server = function(input, output, session, database = "toil",


output$set_quantile.ui = renderUI({
req(!is.null(condi_data()))
choice_chrs = condi_data()$value
if(class(choice_chrs)!="character"){
materialSwitch(ns("set_quantile"),"Whether group by percentile?",value = TRUE)
Expand All @@ -311,6 +317,7 @@ group_samples_Server = function(input, output, session, database = "toil",
# 创建两分组

output$set_group1.ui = renderUI({
req(!is.null(condi_data()))
choice_chrs = condi_data()$value
fluidRow(
if(class(choice_chrs)=="character"){
Expand Down Expand Up @@ -339,6 +346,7 @@ group_samples_Server = function(input, output, session, database = "toil",
})

output$set_group2.ui = renderUI({
req(!is.null(condi_data()))
choice_chrs = condi_data()$value
fluidRow(
if(class(choice_chrs)=="character"){
Expand Down
2 changes: 1 addition & 1 deletion inst/shinyapp/server/modules.R
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ observeEvent(req(input$navbar=="CCLE: Comparison Analysis"),{


# # identifier help
observeEvent(req(input$navbar=="Id reference"),{
observeEvent(req(input$navbar=="ID Query"),{
callModule(server.modules_id_reference, "modules_id_reference")
}, once = TRUE)

Expand Down
2 changes: 1 addition & 1 deletion inst/shinyapp/ui/pancan-analysis-quick.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ui.page_pancan_quick <- function() {
navbarMenu(
title = "Quick TCGA/PCAWG/CCLE Analysis",
title = "Quick T·P·C Analysis",
icon = icon("buromobelexperte"),
# tabPanel(
# "Combo: Single Gene Analysis",
Expand Down
2 changes: 1 addition & 1 deletion inst/shinyapp/ui/pancan-analysis-tcga.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ui.page_pancan_tcga <- function() {
navbarMenu(
title = "Personalized TCGA/PCAWG/CCLE Analysis",
title = "Personalized T·P·C Analysis",
icon = icon("buromobelexperte"),
#### TCGA
tabPanel(
Expand Down

0 comments on commit 2611fdd

Please sign in to comment.