File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -434,7 +434,6 @@ map.CellOntology <- function(object = NULL,
434434 dict <- get_CellOntology_dictionary(branch = branch ,
435435 force_update = force_update )
436436
437- # prepare for seurat objects
438437 if (inherits(object , " Seurat" )){
439438 data <- object @ meta.data
440439 } else if (inherits(object , " data.frame" )){
@@ -461,10 +460,10 @@ map.CellOntology <- function(object = NULL,
461460 rownames(data ) <- data $ Row.names
462461 data $ Row.names <- NULL
463462
464- if (class (object ) == " Seurat" ){
463+ if (inherits (object , " Seurat" ) ){
465464 object <- AddMetaData(object , metadata = data )
466465 return (object )
467- } else if (class (object ) == " data.frame" ){
466+ } else if (inherits (object , " data.frame" ) ){
468467 return (data )
469468 }
470469}
You can’t perform that action at this time.
0 commit comments