Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
vertesy committed Nov 7, 2024
1 parent b43f890 commit 44c041b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion R/Seurat.Utils.Metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,13 @@ transferMetadata <- function(from, to,

# Plot umap _______________________________________________________
if (plotUMAP) {
x <- clUMAP(obj = to, ident = colnames_to[i], suffix = "transferred.ident", ...)
metaX <- getMetadataColumn(col = colnames_to[i], obj = to)

if(is.numeric(metaX) && nr.unique(metaX) > 10) {
x <- qUMAP(obj = to, feature = colnames_to[i], suffix = "transferred.ident", ...)
} else {
x <- clUMAP(obj = to, ident = colnames_to[i], suffix = "transferred.ident", ...)
}
print(x)
}
} # for
Expand Down
2 changes: 1 addition & 1 deletion R/Seurat.Utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -4809,7 +4809,7 @@ xsave <- function(
), whitespace = "_")

FNN <- paste0(dir, fnameBase, ".qs")
CMND <- paste0(substitute_deparse(obj), " <- xread('", FNN, "')")
CMND <- paste0(substitute(obj), " <- xread('", FNN, "')")
if (v) message(CMND)

if ("Seurat" %in% is(obj)) {
Expand Down

0 comments on commit 44c041b

Please sign in to comment.