mirror of
https://github.com/johrpan/ubigen.git
synced 2025-10-26 11:47:24 +01:00
ranking: Exclude genes without data
This commit is contained in:
parent
a9643ca6dc
commit
76980908d7
1 changed files with 2 additions and 2 deletions
|
|
@ -45,8 +45,8 @@ rank_genes <- function(data = ubigen::gtex_all,
|
|||
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]
|
||||
# Exclude genes that are not expressed at all.
|
||||
data <- data[!is.na(score)]
|
||||
|
||||
setorder(data, -score)
|
||||
data[, rank := .I]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue