Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: UpdateSymbolList incorrectly renames genes #8179

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ AddModuleScore <- function(
if (search) {
tryCatch(
expr = {
updated.features <- UpdateSymbolList(symbols = missing.features, ...)
updated.features <- UpdateSymbolList(object = object, symbols = missing.features, ...)
names(x = updated.features) <- missing.features
for (miss in names(x = updated.features)) {
index <- which(x == miss)
Expand Down Expand Up @@ -1726,6 +1726,7 @@ SetQuantile <- function(cutoff, data) {
#' }
#'
UpdateSymbolList <- function(
object,
symbols,
timeout = 10,
several.ok = FALSE,
Expand All @@ -1740,6 +1741,10 @@ UpdateSymbolList <- function(
verbose = verbose,
...
))

# avoid incorrect renaming
new.symbols <- new.symbols[!new.symbols %in% Features(object)]

if (length(x = new.symbols) < 1) {
warning("No updated symbols found", call. = FALSE, immediate. = TRUE)
} else {
Expand Down