From 5536a6df55f96b214c1df97d98aec9593741e00d Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Thu, 22 Sep 2022 00:05:59 +0100 Subject: [PATCH] arse --- ml/global.R | 10 ++++++++-- ml/ui.R | 12 +++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ml/global.R b/ml/global.R index e15c2b1..8bc0fb6 100644 --- a/ml/global.R +++ b/ml/global.R @@ -32,7 +32,12 @@ split_type = c( "cd_sl", "none" ) - +split_choicenames=c( + "70:30", + "80:20", + "Scaling law", + "CV thresholds" +) split_file = c( "_70_30_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 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") combo = data.frame(drug, gene) @@ -406,4 +412,4 @@ if (interactive()){ ) app <- shinyApp(ui, server) runApp(app) -} \ No newline at end of file +} diff --git a/ml/ui.R b/ml/ui.R index 927d0b9..91214b3 100644 --- a/ml/ui.R +++ b/ml/ui.R @@ -8,10 +8,10 @@ library(grid) # for the info box library(plotly) library(shinycssloaders) dashboardPage(skin="purple", - dashboardHeader(title="Score Selector"), + dashboardHeader(title="ML Results"), dashboardSidebar( radioButtons("combined_model", - label="Graph Model", + label="Model Approach", choiceNames = c("Combined", "Gene"), choiceValues = c("combined", "gene"), selected="gene" @@ -36,13 +36,15 @@ dashboardPage(skin="purple", selected = "5" ), radioButtons("drug_dropdown", - label="Drug", + label="Target-Drug", + choiceNames = drug_choicenames, choices = drug, selected="pyrazinamide" ), radioButtons("split_dropdown", - label="Split", + label="Train:Test Split", choices = split_type, + choiceNames = split_choicenames, selected="cd_7030" ), radioButtons("score_dropdown", @@ -66,4 +68,4 @@ dashboardPage(skin="purple", #DT::dataTableOut("plotdata"), verbatimTextOutput("debug") ) -) \ No newline at end of file +)