thing
This commit is contained in:
parent
d627e88aeb
commit
88aaf56729
3 changed files with 250 additions and 144 deletions
286
ml/global.R
286
ml/global.R
|
@ -40,6 +40,12 @@ split_file = c(
|
||||||
"_none_complete"
|
"_none_complete"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
split_file_FS = c(
|
||||||
|
"_70_30_complete",
|
||||||
|
"_80_20_complete",
|
||||||
|
"_sl_complete"
|
||||||
|
)
|
||||||
|
|
||||||
# necessary because the names will be wrong otherwise
|
# necessary because the names will be wrong otherwise
|
||||||
split_map = data.frame(
|
split_map = data.frame(
|
||||||
files=c(
|
files=c(
|
||||||
|
@ -82,6 +88,23 @@ for (x in gene) {
|
||||||
try({loaded_files[[load_name]] = read.csv(filename)})
|
try({loaded_files[[load_name]] = read.csv(filename)})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
# Loader for per-gene Feature Selection CSVs
|
||||||
|
for (x in gene) {
|
||||||
|
#x=tolower(x)
|
||||||
|
for (split in split_file_FS){
|
||||||
|
filedata = paste0(x, split)
|
||||||
|
filename = paste0(data_dir,'LSHTM_ML/output/genes/',x,split,'_FS.csv')
|
||||||
|
|
||||||
|
#print(c(filename))
|
||||||
|
#load_name=paste0(combo[gene==x,"drug"],'_',split_map['splits'][split_map['files']==split])
|
||||||
|
load_name=paste0(x,'_baselineC_',split_map['splits'][split_map['files']==split], '_FS')
|
||||||
|
print(load_name)
|
||||||
|
# try() on its own is fine here because we don't need to do anything if it fails
|
||||||
|
try({loaded_files[[load_name]] = read.csv(filename)})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Funky loader for combined data
|
# Funky loader for combined data
|
||||||
for (x in gene) {
|
for (x in gene) {
|
||||||
for (ac in c('_actual','_complete', '_FS')){
|
for (ac in c('_actual','_complete', '_FS')){
|
||||||
|
@ -104,7 +127,9 @@ for (x in gene) {
|
||||||
|
|
||||||
scores=c("F1", "ROC_AUC", "JCC", "MCC", "Accuracy", "Recall", "Precision")
|
scores=c("F1", "ROC_AUC", "JCC", "MCC", "Accuracy", "Recall", "Precision")
|
||||||
|
|
||||||
resample_types <<- unique(thing$resampling)
|
#resample_types <<- unique(thing$resampling)
|
||||||
|
resample_types = c("none", "Random Oversampling", "Over+Under", "Random Undersampling", "SMOTE")
|
||||||
|
|
||||||
|
|
||||||
makeplot = function(x, # the DataFrame to plot
|
makeplot = function(x, # the DataFrame to plot
|
||||||
selection, # scoring method e.g. 'MCC'
|
selection, # scoring method e.g. 'MCC'
|
||||||
|
@ -152,21 +177,24 @@ makeplot = function(x, # the DataFrame to plot
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
ggplot(data=plot_data, aes_string(x="Model_name",
|
ggplot(
|
||||||
y=selection,
|
data=plot_data, aes_string(
|
||||||
fill="source_data",
|
x="Model_name",
|
||||||
group=selection) ) +
|
y=selection,
|
||||||
geom_bar(stat="identity"
|
fill="source_data" #,
|
||||||
, width = 0.75
|
#group=selection
|
||||||
, position=position_dodge2(padding=0.1, preserve='total', reverse=TRUE)
|
)
|
||||||
|
) +
|
||||||
|
geom_bar(
|
||||||
|
stat="identity"
|
||||||
|
, width = 0.75
|
||||||
|
, position=position_dodge2(padding=0.1, preserve='total', reverse=TRUE)
|
||||||
) +
|
) +
|
||||||
coord_cartesian(ylim = c(y_coord_min, 1)) +
|
coord_cartesian(ylim = c(y_coord_min, 1)) +
|
||||||
annotation_custom(grob) +
|
annotation_custom(grob) +
|
||||||
# doesn't work with plotly but looks nice :-(
|
|
||||||
geom_label(aes_string(label=selection),
|
geom_label(aes_string(label=selection),
|
||||||
position=position_dodge(width = -0.75),
|
position=position_dodge(width = -0.75),
|
||||||
#position=position_dodge2(padding=0.1),
|
#vjust = 1.5,
|
||||||
vjust = 1.5,
|
|
||||||
alpha=0.75,
|
alpha=0.75,
|
||||||
fill="white"
|
fill="white"
|
||||||
|
|
||||||
|
@ -174,107 +202,15 @@ makeplot = function(x, # the DataFrame to plot
|
||||||
scale_color_manual(values = colour_range) +
|
scale_color_manual(values = colour_range) +
|
||||||
scale_fill_manual(values = colour_range) +
|
scale_fill_manual(values = colour_range) +
|
||||||
|
|
||||||
|
|
||||||
# add little numbers for the BT bars only
|
# add little numbers for the BT bars only
|
||||||
labs(x="",y=paste(selection,"Score")) +
|
labs(x="",y=paste(selection,"Score")) +
|
||||||
theme(
|
theme(
|
||||||
axis.text.x = element_text(angle = 90),
|
axis.text.x = element_text(angle = 90),
|
||||||
)
|
)
|
||||||
# ggplotly()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (interactive()){
|
if (interactive()){
|
||||||
server=shinyServer(function(input, output) {
|
|
||||||
observeEvent({
|
|
||||||
input$combined_model
|
|
||||||
input$combined_data
|
|
||||||
input$combined_training_genes
|
|
||||||
input$score_dropdown
|
|
||||||
input$resample_dropdown
|
|
||||||
input$drug_dropdown
|
|
||||||
input$split_dropdown
|
|
||||||
|
|
||||||
},{
|
|
||||||
combined_model = input$combined_model
|
|
||||||
selection = input$score_dropdown
|
|
||||||
resampler = input$resample_dropdown
|
|
||||||
selected_drug = input$drug_dropdown
|
|
||||||
selected_split = input$split_dropdown
|
|
||||||
combined_data = input$combined_data
|
|
||||||
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"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
# hide stuff if selected
|
|
||||||
if(combined_model == "combined") {
|
|
||||||
#if(combined_model == TRUE) {
|
|
||||||
|
|
||||||
hide("split_dropdown")
|
|
||||||
#show("resample_dropdown")
|
|
||||||
show("combined_data")
|
|
||||||
show("combined_training_genes")
|
|
||||||
filedata = paste0(combined_training_genes,
|
|
||||||
'genes_logo_skf_BT_',
|
|
||||||
selected_gene,
|
|
||||||
'_',
|
|
||||||
combined_data
|
|
||||||
)
|
|
||||||
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,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
# e.g.
|
|
||||||
# makeplot(loaded_files$`5genes_logo_skf_BT_pnca_actual`, "MCC", "none" , gene = 'foo', combined_training_genes = '1234', display_combined = TRUE)
|
|
||||||
} else {
|
|
||||||
show("split_dropdown")
|
|
||||||
#show("resample_dropdown")
|
|
||||||
hide("combined_data")
|
|
||||||
hide("combined_training_genes")
|
|
||||||
filedata = paste0(combo[drug==selected_drug,"gene"],
|
|
||||||
'_baselineC_',
|
|
||||||
selected_split
|
|
||||||
)
|
|
||||||
print(filedata)
|
|
||||||
print("doing GENE plot")
|
|
||||||
output$plot <- renderPlot(makeplot(loaded_files[[filedata]],
|
|
||||||
selection,
|
|
||||||
resampler,
|
|
||||||
gene = combo[drug==selected_drug,"gene"],
|
|
||||||
display_combined = FALSE,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
# 6genes_logo_skf_BT_gid_complete
|
|
||||||
|
|
||||||
# filedata example for combined: 6genes_logo_skf_BT_embb_actual
|
|
||||||
# 6genes_logo_skf_BT_embb_combined
|
|
||||||
})
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
ui=dashboardPage(skin="purple",
|
ui=dashboardPage(skin="purple",
|
||||||
dashboardHeader(title="Score Selector"),
|
dashboardHeader(title="Score Selector"),
|
||||||
dashboardSidebar(
|
dashboardSidebar(
|
||||||
|
@ -293,14 +229,14 @@ if (interactive()){
|
||||||
|
|
||||||
radioButtons("combined_data",
|
radioButtons("combined_data",
|
||||||
label="Data Type",
|
label="Data Type",
|
||||||
choiceNames = c("Complete", "Actual", "Feature Selection"),
|
choiceNames = c("Complete", "Actual"),
|
||||||
choiceValues = c("complete", "actual", "FS"),
|
choiceValues = c("complete", "actual"),
|
||||||
selected="complete"
|
selected="complete"
|
||||||
),
|
),
|
||||||
radioButtons("combined_training_genes",
|
radioButtons("combined_training_genes",
|
||||||
label="Training Genes",
|
label="Training Genes",
|
||||||
choiceNames = c("One", "Two", "Five", "Six"),
|
choiceNames = c("Five", "Six"),
|
||||||
choiceValues = c("1", "2", "5","6"),
|
choiceValues = c("5","6"),
|
||||||
selected = "5"
|
selected = "5"
|
||||||
),
|
),
|
||||||
radioButtons("drug_dropdown",
|
radioButtons("drug_dropdown",
|
||||||
|
@ -327,13 +263,145 @@ if (interactive()){
|
||||||
dashboardBody(
|
dashboardBody(
|
||||||
useShinyjs(),
|
useShinyjs(),
|
||||||
#plotlyOutput("plot", height = 800),
|
#plotlyOutput("plot", height = 800),
|
||||||
plotOutput("plot", height = 800),
|
box(plotOutput("plot"), width="100%"),
|
||||||
|
box(plotOutput("feature_plot"), width="100%", title="Feature Selection"),
|
||||||
# %>% withSpinner(color="#0dc5c1"), # uncomment if you want the spinner
|
# %>% withSpinner(color="#0dc5c1"), # uncomment if you want the spinner
|
||||||
#downloadButton("save", "Download Plot"),
|
#downloadButton("save", "Download Plot"),
|
||||||
#DT::dataTableOut("plotdata"),
|
#DT::dataTableOut("plotdata"),
|
||||||
verbatimTextOutput("debug")
|
verbatimTextOutput("debug")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
server=shinyServer(function(input, output, session) {
|
||||||
|
observeEvent({
|
||||||
|
input$combined_model
|
||||||
|
input$combined_data
|
||||||
|
input$combined_training_genes
|
||||||
|
input$score_dropdown
|
||||||
|
input$resample_dropdown
|
||||||
|
input$drug_dropdown
|
||||||
|
input$split_dropdown
|
||||||
|
|
||||||
|
},{
|
||||||
|
combined_model = input$combined_model
|
||||||
|
selection = input$score_dropdown
|
||||||
|
resampler = input$resample_dropdown
|
||||||
|
selected_drug = input$drug_dropdown
|
||||||
|
selected_split = input$split_dropdown
|
||||||
|
combined_data = input$combined_data
|
||||||
|
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"
|
||||||
|
# )
|
||||||
|
# }
|
||||||
|
# hide stuff if selected
|
||||||
|
if(combined_model == "combined") {
|
||||||
|
#if(combined_model == TRUE) {
|
||||||
|
|
||||||
|
hide("split_dropdown")
|
||||||
|
#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,
|
||||||
|
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 {
|
||||||
|
show("split_dropdown")
|
||||||
|
#show("resample_dropdown")
|
||||||
|
hide("combined_data")
|
||||||
|
hide("combined_training_genes")
|
||||||
|
#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,
|
||||||
|
resampler,
|
||||||
|
gene = combo[drug==selected_drug,"gene"],
|
||||||
|
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
|
||||||
|
|
||||||
|
# filedata example for combined: 6genes_logo_skf_BT_embb_actual
|
||||||
|
# 6genes_logo_skf_BT_embb_combined
|
||||||
|
})
|
||||||
|
}
|
||||||
|
)
|
||||||
app <- shinyApp(ui, server)
|
app <- shinyApp(ui, server)
|
||||||
runApp(app)
|
runApp(app)
|
||||||
}
|
}
|
96
ml/server.R
96
ml/server.R
|
@ -1,6 +1,5 @@
|
||||||
library(shiny)
|
library(shiny)
|
||||||
|
shinyServer(function(input, output, session) {
|
||||||
shinyServer(function(input, output) {
|
|
||||||
observeEvent({
|
observeEvent({
|
||||||
input$combined_model
|
input$combined_model
|
||||||
input$combined_data
|
input$combined_data
|
||||||
|
@ -20,21 +19,21 @@ shinyServer(function(input, output) {
|
||||||
combined_training_genes = input$combined_training_genes
|
combined_training_genes = input$combined_training_genes
|
||||||
|
|
||||||
selected_gene = combo[combo$drug == selected_drug,'gene']
|
selected_gene = combo[combo$drug == selected_drug,'gene']
|
||||||
if (combined_data == "FS"){
|
# if (combined_data == "FS"){
|
||||||
updateRadioButtons(
|
# updateRadioButtons(
|
||||||
inputId="combined_training_genes",
|
# inputId="combined_training_genes",
|
||||||
choiceNames = c("One", "Two"),
|
# choiceNames = c("One", "Two"),
|
||||||
choiceValues = c("1", "2"),
|
# choiceValues = c("1", "2"),
|
||||||
selected = "2"
|
# selected = "2"
|
||||||
)
|
# )
|
||||||
} else{
|
# } else{
|
||||||
updateRadioButtons(
|
# updateRadioButtons(
|
||||||
inputId="combined_training_genes",
|
# inputId="combined_training_genes",
|
||||||
choiceNames = c("Five", "Six"),
|
# choiceNames = c("Five", "Six"),
|
||||||
choiceValues = c("5","6"),
|
# choiceValues = c("5","6"),
|
||||||
selected = "5"
|
# selected = "5"
|
||||||
)
|
# )
|
||||||
}
|
# }
|
||||||
# hide stuff if selected
|
# hide stuff if selected
|
||||||
if(combined_model == "combined") {
|
if(combined_model == "combined") {
|
||||||
#if(combined_model == TRUE) {
|
#if(combined_model == TRUE) {
|
||||||
|
@ -43,23 +42,44 @@ shinyServer(function(input, output) {
|
||||||
#show("resample_dropdown")
|
#show("resample_dropdown")
|
||||||
show("combined_data")
|
show("combined_data")
|
||||||
show("combined_training_genes")
|
show("combined_training_genes")
|
||||||
|
#show("feature_plot")
|
||||||
filedata = paste0(combined_training_genes,
|
filedata = paste0(combined_training_genes,
|
||||||
'genes_logo_skf_BT_',
|
'genes_logo_skf_BT_',
|
||||||
selected_gene,
|
selected_gene,
|
||||||
'_',
|
'_',
|
||||||
combined_data
|
combined_data
|
||||||
)
|
)
|
||||||
|
feature_data = paste0(as.character(as.numeric(combined_training_genes)-4), # lol
|
||||||
|
'genes_logo_skf_BT_',
|
||||||
|
selected_gene,
|
||||||
|
'_FS'
|
||||||
|
)
|
||||||
|
|
||||||
print(filedata)
|
print(filedata)
|
||||||
|
|
||||||
print('doing COMBINED plot')
|
print('doing COMBINED plot')
|
||||||
output$plot <- renderPlot(makeplot(loaded_files[[filedata]],
|
output$plot <- renderPlot(
|
||||||
selection,
|
makeplot(
|
||||||
"none", # always 'none' for combined plot
|
loaded_files[[filedata]],
|
||||||
gene = combo[drug==selected_drug,"gene"],
|
selection,
|
||||||
combined_training_genes = combined_training_genes,
|
resampler,
|
||||||
display_combined = TRUE,
|
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.
|
# e.g.
|
||||||
# makeplot(loaded_files$`5genes_logo_skf_BT_pnca_actual`, "MCC", "none" , gene = 'foo', combined_training_genes = '1234', display_combined = TRUE)
|
# makeplot(loaded_files$`5genes_logo_skf_BT_pnca_actual`, "MCC", "none" , gene = 'foo', combined_training_genes = '1234', display_combined = TRUE)
|
||||||
} else {
|
} else {
|
||||||
|
@ -67,21 +87,39 @@ shinyServer(function(input, output) {
|
||||||
#show("resample_dropdown")
|
#show("resample_dropdown")
|
||||||
hide("combined_data")
|
hide("combined_data")
|
||||||
hide("combined_training_genes")
|
hide("combined_training_genes")
|
||||||
filedata = paste0(combo[drug==selected_drug,"gene"],
|
#hide("feature_plot")
|
||||||
'_baselineC_',
|
|
||||||
selected_split
|
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(filedata)
|
||||||
print("doing GENE plot")
|
print("doing GENE plot")
|
||||||
output$plot <- renderPlot(makeplot(loaded_files[[filedata]],
|
output$plot <- renderPlot(makeplot(loaded_files[[filedata]],
|
||||||
selection,
|
selection,
|
||||||
resampler,
|
resampler,
|
||||||
gene = combo[drug==selected_drug,"gene"],
|
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
|
# 6genes_logo_skf_BT_gid_complete
|
||||||
|
|
||||||
|
|
12
ml/ui.R
12
ml/ui.R
|
@ -7,7 +7,6 @@ library(ggplot2)
|
||||||
library(grid) # for the info box
|
library(grid) # for the info box
|
||||||
library(plotly)
|
library(plotly)
|
||||||
library(shinycssloaders)
|
library(shinycssloaders)
|
||||||
|
|
||||||
dashboardPage(skin="purple",
|
dashboardPage(skin="purple",
|
||||||
dashboardHeader(title="Score Selector"),
|
dashboardHeader(title="Score Selector"),
|
||||||
dashboardSidebar(
|
dashboardSidebar(
|
||||||
|
@ -26,14 +25,14 @@ dashboardPage(skin="purple",
|
||||||
|
|
||||||
radioButtons("combined_data",
|
radioButtons("combined_data",
|
||||||
label="Data Type",
|
label="Data Type",
|
||||||
choiceNames = c("Complete", "Actual", "Feature Selection"),
|
choiceNames = c("Complete", "Actual"),
|
||||||
choiceValues = c("complete", "actual", "FS"),
|
choiceValues = c("complete", "actual"),
|
||||||
selected="complete"
|
selected="complete"
|
||||||
),
|
),
|
||||||
radioButtons("combined_training_genes",
|
radioButtons("combined_training_genes",
|
||||||
label="Training Genes",
|
label="Training Genes",
|
||||||
choiceNames = c("One", "Two", "Five", "Six"),
|
choiceNames = c("Five", "Six"),
|
||||||
choiceValues = c("1", "2", "5","6"),
|
choiceValues = c("5","6"),
|
||||||
selected = "5"
|
selected = "5"
|
||||||
),
|
),
|
||||||
radioButtons("drug_dropdown",
|
radioButtons("drug_dropdown",
|
||||||
|
@ -60,7 +59,8 @@ dashboardPage(skin="purple",
|
||||||
dashboardBody(
|
dashboardBody(
|
||||||
useShinyjs(),
|
useShinyjs(),
|
||||||
#plotlyOutput("plot", height = 800),
|
#plotlyOutput("plot", height = 800),
|
||||||
plotOutput("plot", height = 800),
|
box(plotOutput("plot"), width="100%"),
|
||||||
|
box(plotOutput("feature_plot"), width="100%", title="Feature Selection"),
|
||||||
# %>% withSpinner(color="#0dc5c1"), # uncomment if you want the spinner
|
# %>% withSpinner(color="#0dc5c1"), # uncomment if you want the spinner
|
||||||
#downloadButton("save", "Download Plot"),
|
#downloadButton("save", "Download Plot"),
|
||||||
#DT::dataTableOut("plotdata"),
|
#DT::dataTableOut("plotdata"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue