Transform mean and sd expression using log

This commit is contained in:
Elias Projahn 2022-06-06 15:48:24 +02:00
parent ba9fbdf0df
commit 0ee713a966
2 changed files with 5 additions and 1 deletions

View file

@ -11,7 +11,11 @@ server <- function(input, output, session) {
total_weight]
# Normalize scores to be between 0.0 and 1.0.
data[, score := (score - min(score)) / (max(score) - min(score))]
data[, score := (score - min(score, na.rm = TRUE)) /
(max(score, na.rm = TRUE) - min(score, na.rm = TRUE))]
# These are genes that are not expressed at all.
data[is.na(score), score := 0.0]
data.table::setorder(data, -score)
data[, rank := .I]