diff --git a/R/server.R b/R/server.R index 5664db0..db4b527 100644 --- a/R/server.R +++ b/R/server.R @@ -2,15 +2,11 @@ #' @noRd server <- function(input, output) { ranked_data <- reactive({ - total_weight <- abs(input$cross_sample_weight) + - abs(input$mean_expression) + - abs(input$sd_expression) - + total_weight <- abs(input$cross_sample_weight) + abs(input$sd_expression) data <- data.table::copy(ubigen::genes) data[, score := (input$cross_sample_weight * get(input$cross_sample_metric) + - input$mean_expression * mean_expression_normalized + input$sd_expression * sd_expression_normalized) / total_weight] diff --git a/R/ui.R b/R/ui.R index d515993..e62217b 100644 --- a/R/ui.R +++ b/R/ui.R @@ -36,35 +36,18 @@ ui <- function() { min = -1.0, max = 1.0, step = 0.01, - value = 1.0 - ), - sliderInput( - "mean_expression", - verticalLayout( - strong("Mean expression"), - div(paste0( - "Average of the gene's expression across all ", - "samples." - )) - ), - min = -1.0, - max = 1.0, - step = 0.01, - value = 1.0 + value = 0.5 ), sliderInput( "sd_expression", verticalLayout( strong("Standard deviation"), - paste0( - "Standard deviation of the gene's expression ", - "across all samples." - ) + "Standard deviation of the gene's expression across all samples." ), min = -1.0, max = 1.0, step = 0.01, - value = -1.0 + value = -0.5 ) ), mainPanel(