mirror of
https://github.com/johrpan/ubigen.git
synced 2025-10-26 19:57:24 +01:00
Use only one cross sample metric
This commit is contained in:
parent
20faaea93d
commit
d495af011a
2 changed files with 18 additions and 42 deletions
|
|
@ -2,18 +2,14 @@
|
||||||
#' @noRd
|
#' @noRd
|
||||||
server <- function(input, output) {
|
server <- function(input, output) {
|
||||||
ranked_data <- reactive({
|
ranked_data <- reactive({
|
||||||
total_weight <- abs(input$above_zero) +
|
total_weight <- abs(input$cross_sample_weight) +
|
||||||
abs(input$above_median) +
|
|
||||||
abs(input$above_95) +
|
|
||||||
abs(input$mean_expression) +
|
abs(input$mean_expression) +
|
||||||
abs(input$sd_expression)
|
abs(input$sd_expression)
|
||||||
|
|
||||||
data <- data.table::copy(ubigen::genes)
|
data <- data.table::copy(ubigen::genes)
|
||||||
|
|
||||||
data[, score :=
|
data[, score :=
|
||||||
(input$above_zero * above_zero +
|
(input$cross_sample_weight * get(input$cross_sample_metric) +
|
||||||
input$above_95 * above_95 +
|
|
||||||
input$above_median * above_median +
|
|
||||||
input$mean_expression * mean_expression_normalized +
|
input$mean_expression * mean_expression_normalized +
|
||||||
input$sd_expression * sd_expression_normalized) /
|
input$sd_expression * sd_expression_normalized) /
|
||||||
total_weight]
|
total_weight]
|
||||||
|
|
|
||||||
52
R/ui.R
52
R/ui.R
|
|
@ -14,49 +14,29 @@ ui <- function() {
|
||||||
sidebarPanel(
|
sidebarPanel(
|
||||||
width = 3,
|
width = 3,
|
||||||
h3("Features"),
|
h3("Features"),
|
||||||
sliderInput(
|
selectInput(
|
||||||
"above_zero",
|
"cross_sample_metric",
|
||||||
verticalLayout(
|
verticalLayout(
|
||||||
strong("Expressed"),
|
strong("Expression across samples"),
|
||||||
paste0(
|
paste0(
|
||||||
"Percentage of samples in which the gene is ",
|
"Proportion samples in which the gene is expressed above the ",
|
||||||
"expressed."
|
"selected threshold. Select a method and a weight for the ",
|
||||||
)
|
"final score."
|
||||||
|
)
|
||||||
),
|
),
|
||||||
min = -1.0,
|
list(
|
||||||
max = 1.0,
|
"Above 95th percentile" = "above_95",
|
||||||
step = 0.01,
|
"Above median" = "above_median",
|
||||||
value = 0.33
|
"Above zero" = "above_zero"
|
||||||
|
)
|
||||||
),
|
),
|
||||||
sliderInput(
|
sliderInput(
|
||||||
"above_median",
|
"cross_sample_weight",
|
||||||
verticalLayout(
|
label = NULL,
|
||||||
strong("Expressed above median"),
|
|
||||||
paste0(
|
|
||||||
"Percentage of samples that express the gene ",
|
|
||||||
"more than the median of expression within ",
|
|
||||||
"that sample."
|
|
||||||
)
|
|
||||||
),
|
|
||||||
min = -1.0,
|
min = -1.0,
|
||||||
max = 1.0,
|
max = 1.0,
|
||||||
step = 0.01,
|
step = 0.01,
|
||||||
value = 0.33
|
value = 1.0
|
||||||
),
|
|
||||||
sliderInput(
|
|
||||||
"above_95",
|
|
||||||
verticalLayout(
|
|
||||||
strong("Expressed above 95%"),
|
|
||||||
paste0(
|
|
||||||
"Percentage of samples that express the gene ",
|
|
||||||
"more than the 95. percentile of expression ",
|
|
||||||
"within that sample."
|
|
||||||
)
|
|
||||||
),
|
|
||||||
min = -1.0,
|
|
||||||
max = 1.0,
|
|
||||||
step = 0.01,
|
|
||||||
value = 0.33
|
|
||||||
),
|
),
|
||||||
sliderInput(
|
sliderInput(
|
||||||
"mean_expression",
|
"mean_expression",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue