diff --git a/inst/HaDeX/server.R b/inst/HaDeX/server.R index 2ca9d29c..a3944437 100644 --- a/inst/HaDeX/server.R +++ b/inst/HaDeX/server.R @@ -130,6 +130,65 @@ server <- function(input, output, session) { ## + observe({ + + tryCatch({ + if(input[["deut_concentration"]] < 0) + updateNumericInput(session, + inputId = "deut_concentration", + value = 0) + }, error = function(e){ + updateNumericInput(session, + inputId = "deut_concentration", + value = 0) + }) + }) + + observe({ + + tryCatch({ + if(input[["deut_concentration"]] > 100) + updateNumericInput(session, + inputId = "deut_concentration", + value = 100) + }, + error = function(e){ + updateNumericInput(session, + inputId = "deut_concentration", + value = 100) + }) + + }) + + observe({ + + tryCatch({ + if(input[["sequence_length"]] < max_range()) + updateNumericInput(session, + inputId = "sequence_length", + value = max_range()) + }, + error = function(e){ + updateNumericInput(session, + inputId = "sequence_length", + value = max_range()) + }) + + }) + + observe({ + + tryCatch( + { if(input[["sequence_start_shift"]] < 0) + updateNumericInput(session, + inputId = "sequence_start_shift", + value = 1) }, + error = function(e) { + message("You cannot shift it to minus values!") + updateNumericInput(session, + inputId = "sequence_start_shift", + value = 1) }) + }) ## diff --git a/inst/HaDeX/ui.R b/inst/HaDeX/ui.R index b4fecd06..6f58a4c7 100644 --- a/inst/HaDeX/ui.R +++ b/inst/HaDeX/ui.R @@ -46,7 +46,7 @@ ui <- fluidPage(theme = "HaDeX_theme.css", inputId = "data_file", label = "Choose file:", multiple = FALSE, - accept = c(".csv", ".xslx", ".xsl"), + accept = c(".csv", ".xlsx", ".xls"), placeholder = "No file selected")), column(4, h5("File status:"),