thing
This commit is contained in:
parent
d627e88aeb
commit
88aaf56729
3 changed files with 250 additions and 144 deletions
96
ml/server.R
96
ml/server.R
|
@ -1,6 +1,5 @@
|
|||
library(shiny)
|
||||
|
||||
shinyServer(function(input, output) {
|
||||
shinyServer(function(input, output, session) {
|
||||
observeEvent({
|
||||
input$combined_model
|
||||
input$combined_data
|
||||
|
@ -20,21 +19,21 @@ shinyServer(function(input, output) {
|
|||
combined_training_genes = input$combined_training_genes
|
||||
|
||||
selected_gene = combo[combo$drug == selected_drug,'gene']
|
||||
if (combined_data == "FS"){
|
||||
updateRadioButtons(
|
||||
inputId="combined_training_genes",
|
||||
choiceNames = c("One", "Two"),
|
||||
choiceValues = c("1", "2"),
|
||||
selected = "2"
|
||||
)
|
||||
} else{
|
||||
updateRadioButtons(
|
||||
inputId="combined_training_genes",
|
||||
choiceNames = c("Five", "Six"),
|
||||
choiceValues = c("5","6"),
|
||||
selected = "5"
|
||||
)
|
||||
}
|
||||
# if (combined_data == "FS"){
|
||||
# updateRadioButtons(
|
||||
# inputId="combined_training_genes",
|
||||
# choiceNames = c("One", "Two"),
|
||||
# choiceValues = c("1", "2"),
|
||||
# selected = "2"
|
||||
# )
|
||||
# } else{
|
||||
# updateRadioButtons(
|
||||
# inputId="combined_training_genes",
|
||||
# choiceNames = c("Five", "Six"),
|
||||
# choiceValues = c("5","6"),
|
||||
# selected = "5"
|
||||
# )
|
||||
# }
|
||||
# hide stuff if selected
|
||||
if(combined_model == "combined") {
|
||||
#if(combined_model == TRUE) {
|
||||
|
@ -43,23 +42,44 @@ shinyServer(function(input, output) {
|
|||
#show("resample_dropdown")
|
||||
show("combined_data")
|
||||
show("combined_training_genes")
|
||||
#show("feature_plot")
|
||||
filedata = paste0(combined_training_genes,
|
||||
'genes_logo_skf_BT_',
|
||||
selected_gene,
|
||||
'_',
|
||||
combined_data
|
||||
)
|
||||
feature_data = paste0(as.character(as.numeric(combined_training_genes)-4), # lol
|
||||
'genes_logo_skf_BT_',
|
||||
selected_gene,
|
||||
'_FS'
|
||||
)
|
||||
|
||||
print(filedata)
|
||||
|
||||
print('doing COMBINED plot')
|
||||
output$plot <- renderPlot(makeplot(loaded_files[[filedata]],
|
||||
selection,
|
||||
"none", # always 'none' for combined plot
|
||||
gene = combo[drug==selected_drug,"gene"],
|
||||
combined_training_genes = combined_training_genes,
|
||||
display_combined = TRUE,
|
||||
output$plot <- renderPlot(
|
||||
makeplot(
|
||||
loaded_files[[filedata]],
|
||||
selection,
|
||||
resampler,
|
||||
gene = combo[drug==selected_drug,"gene"],
|
||||
combined_training_genes = combined_training_genes,
|
||||
display_combined = TRUE
|
||||
),height=450
|
||||
)
|
||||
print("doing FEATURE SELECTION plot corresponding to COMBINED plot")
|
||||
output$feature_plot <- renderPlot(
|
||||
makeplot(
|
||||
loaded_files[[feature_data]],
|
||||
selection,
|
||||
"none", # always 'none' for Feature Selection
|
||||
gene = combo[drug==selected_drug,"gene"],
|
||||
combined_training_genes = "NO DATA",
|
||||
display_combined = TRUE
|
||||
),height=450
|
||||
)
|
||||
|
||||
# e.g.
|
||||
# makeplot(loaded_files$`5genes_logo_skf_BT_pnca_actual`, "MCC", "none" , gene = 'foo', combined_training_genes = '1234', display_combined = TRUE)
|
||||
} else {
|
||||
|
@ -67,21 +87,39 @@ shinyServer(function(input, output) {
|
|||
#show("resample_dropdown")
|
||||
hide("combined_data")
|
||||
hide("combined_training_genes")
|
||||
filedata = paste0(combo[drug==selected_drug,"gene"],
|
||||
'_baselineC_',
|
||||
selected_split
|
||||
#hide("feature_plot")
|
||||
|
||||
filedata = paste0(
|
||||
combo[drug==selected_drug,"gene"],
|
||||
'_baselineC_',
|
||||
selected_split
|
||||
)
|
||||
|
||||
feature_data = paste0(
|
||||
combo[drug==selected_drug,"gene"],
|
||||
'_baselineC_',
|
||||
selected_split,
|
||||
"_FS"
|
||||
)
|
||||
|
||||
print(filedata)
|
||||
print("doing GENE plot")
|
||||
output$plot <- renderPlot(makeplot(loaded_files[[filedata]],
|
||||
selection,
|
||||
selection,
|
||||
resampler,
|
||||
gene = combo[drug==selected_drug,"gene"],
|
||||
display_combined = FALSE,
|
||||
display_combined = FALSE
|
||||
),height=450
|
||||
)
|
||||
print("doing FEATURE SELECTION plot corresponding to GENE plot")
|
||||
output$feature_plot <- renderPlot(makeplot(loaded_files[[feature_data]],
|
||||
selection,
|
||||
"none",
|
||||
gene = combo[drug==selected_drug,"gene"],
|
||||
display_combined = FALSE
|
||||
),height=450
|
||||
)
|
||||
|
||||
|
||||
}
|
||||
# 6genes_logo_skf_BT_gid_complete
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue