library(shiny)
library(shinyjs)
library(dplyr)
library(DWHtools2)
library(plotly)
library(DT)
#options(java.parameters = "-Xmx4g")
options(shiny.sanitize.errors = FALSE)
# Define UI for application that draws a histogram
shinyUI(fluidPage(
shinyjs::useShinyjs(),
# Application title
titlePanel("MultiWAS: Interactive characterization of cohorts"),
# Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
div(id = 'loading-content',
em(id = 'waiting', '...Loading...')
),
hidden(
div(
id = 'patients_selection',
tags$h3(id = 'controls_title1', 'Patients selection'),
uiOutput('controls_cases'),
#uiOutput('control_type'),
radioButtons(inputId = 'control_type',label = "Type of controls", choices= list(`Automatic matching`='match', `Cohort` = "cohort" )),
uiOutput('controls_trigger'),
textOutput('controls_none'),
uiOutput('match_save'),
uiOutput('match_save_title'),
tags$hr(id='line1')
),
div(
id = 'files_upload',
tags$h3('Data upload'),
fileInput('patients_csv', 'Choose File for Patients (CSV)'),
fileInput('concepts_csv', 'Choose File for UMLS concepts (CSV)'),
fileInput('cim_csv', 'Choose File for ICD codes (CSV)'),
fileInput('bio_csv', 'Choose File for Labtest results (CSV)')
),
div(id = 'analysis_parameters',
tags$h3(id = 'controls_title2','Analysis parameters'),
checkboxGroupInput('sources', label='data sources', choices = list('free_text','bio','icd'), selected = c('free_text','bio','icd')),
radioButtons('boot',label = "Bootstrap results", choices= list(`No`="FALSE", `Yes` = "TRUE" )),
actionButton(
inputId = "submit_loc",
label = "Submit"),
sliderInput("plot_height", "Plot Height", 200, 1200, 900),
tags$hr(id='line2'),
tags$h3(id = 'controls_title4','Export'),
downloadButton("report", "Report \n(.html)"),
downloadButton("result_data", "Result data \n(.RData)")
)
),
width = 2
),
# Show a plot of the generated distribution
mainPanel(
uiOutput("panels")
# tabsetPanel(
# tabPanel("Billing codes (ICD10)", uiOutput('cimtab'), fluidRow(column(12,DT::dataTableOutput('table_cim')))),
# tabPanel("Biological test results", uiOutput('biotab'), fluidRow(column(12,DT::dataTableOutput('table_bio')))),
# tabPanel("UMLS concepts from free text reports", uiOutput('conceptstab'), fluidRow(column(12,DT::dataTableOutput('table_concepts')))),
# tabPanel("Patients Description", DT::dataTableOutput('table_patients'))
# )
)
)
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.