This commit is contained in:
Tanushree Tunstall 2022-09-22 00:05:59 +01:00
parent c896a04433
commit 5536a6df55
2 changed files with 15 additions and 7 deletions

View file

@ -32,7 +32,12 @@ split_type = c(
"cd_sl", "cd_sl",
"none" "none"
) )
split_choicenames=c(
"70:30",
"80:20",
"Scaling law",
"CV thresholds"
)
split_file = c( split_file = c(
"_70_30_complete", "_70_30_complete",
"_80_20_complete", "_80_20_complete",
@ -68,6 +73,7 @@ metadata_cols = c("n_training_size", "n_test_size", "n_trainingY_ratio", "n_test
# hardcoded list of drugs # hardcoded list of drugs
drug = c("ethambutol", "isoniazid", "pyrazinamide", "rifampicin", "streptomycin") drug = c("ethambutol", "isoniazid", "pyrazinamide", "rifampicin", "streptomycin")
drug_choicenames = c("EmbB-ethambutol", "KatG-isoniazid", "PncA-pyrazinamide", "RpoB-rifampicin", "GidB-streptomycin")
gene = c("embb", "katg", "pnca", "rpob", "gid") gene = c("embb", "katg", "pnca", "rpob", "gid")
combo = data.frame(drug, gene) combo = data.frame(drug, gene)
@ -406,4 +412,4 @@ if (interactive()){
) )
app <- shinyApp(ui, server) app <- shinyApp(ui, server)
runApp(app) runApp(app)
} }

12
ml/ui.R
View file

@ -8,10 +8,10 @@ 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="ML Results"),
dashboardSidebar( dashboardSidebar(
radioButtons("combined_model", radioButtons("combined_model",
label="Graph Model", label="Model Approach",
choiceNames = c("Combined", "Gene"), choiceNames = c("Combined", "Gene"),
choiceValues = c("combined", "gene"), choiceValues = c("combined", "gene"),
selected="gene" selected="gene"
@ -36,13 +36,15 @@ dashboardPage(skin="purple",
selected = "5" selected = "5"
), ),
radioButtons("drug_dropdown", radioButtons("drug_dropdown",
label="Drug", label="Target-Drug",
choiceNames = drug_choicenames,
choices = drug, choices = drug,
selected="pyrazinamide" selected="pyrazinamide"
), ),
radioButtons("split_dropdown", radioButtons("split_dropdown",
label="Split", label="Train:Test Split",
choices = split_type, choices = split_type,
choiceNames = split_choicenames,
selected="cd_7030" selected="cd_7030"
), ),
radioButtons("score_dropdown", radioButtons("score_dropdown",
@ -66,4 +68,4 @@ dashboardPage(skin="purple",
#DT::dataTableOut("plotdata"), #DT::dataTableOut("plotdata"),
verbatimTextOutput("debug") verbatimTextOutput("debug")
) )
) )