Dashboards/ml/ui.R

69 lines
No EOL
2.8 KiB
R

library(shiny)
library(shinyjs)
library(shinydashboard)
#library("wesanderson") # ayyyy lmao hipster af
library(dplyr)
library(ggplot2)
library(grid) # for the info box
library(plotly)
library(shinycssloaders)
dashboardPage(skin="purple",
dashboardHeader(title="Score Selector"),
dashboardSidebar(
radioButtons("combined_model",
label="Graph Model",
choiceNames = c("Combined", "Gene"),
choiceValues = c("combined", "gene"),
selected="gene"
),
# checkboxInput("combined_model",
# "Combined Model",
# value=FALSE
# ),
#),
# radioButtons("combined_data",
# label="Data Type",
# choiceNames = c("Complete", "Actual"),
# choiceValues = c("complete", "actual"),
# selected="complete"
# ),
radioButtons("combined_training_genes",
label="Training Genes",
choiceNames = c("Five", "Six"),
choiceValues = c("5","6"),
selected = "5"
),
radioButtons("drug_dropdown",
label="Drug",
choices = drug,
selected="pyrazinamide"
),
radioButtons("split_dropdown",
label="Split",
choices = split_type,
selected="cd_7030"
),
radioButtons("score_dropdown",
label="Score",
choices = scores,
selected="MCC"
),
radioButtons("resample_dropdown",
label="Resampling",
choices = resample_types,
selected="none" # "none" is a value
)
),
dashboardBody(
useShinyjs(),
#plotlyOutput("plot", height = 800),
box(plotOutput("plot"), height="450", width="100%", title="Baseline Model (all features)"),
box(plotOutput("feature_plot"), height="450", width="100%", title="Feature Selection (no resampling)"),
# %>% withSpinner(color="#0dc5c1"), # uncomment if you want the spinner
#downloadButton("save", "Download Plot"),
#DT::dataTableOut("plotdata"),
verbatimTextOutput("debug")
)
)