We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83eceb8 commit 12b01a6Copy full SHA for 12b01a6
R/utils.R
@@ -435,9 +435,9 @@ map.CellOntology <- function(object = NULL,
435
force_update = force_update)
436
437
# prepare for seurat objects
438
- if(class(object) == "Seurat"){
+ if (inherits(object, "Seurat")){
439
data <- object@meta.data
440
- } else if(class(object) == "data.frame"){
+ } else if (inherits(object, "data.frame")){
441
data <- object
442
} else{
443
stop("Object should be either a data.frame or a Seurat object")
@@ -467,5 +467,4 @@ map.CellOntology <- function(object = NULL,
467
} else if(class(object) == "data.frame"){
468
return(data)
469
}
470
-
471
0 commit comments