diff --git a/R/cluster_logfc.R b/R/cluster_logfc.R index db38b52..84853ae 100644 --- a/R/cluster_logfc.R +++ b/R/cluster_logfc.R @@ -16,7 +16,8 @@ if (is.factor(cluster.ids)==F) { cluster.ids <- as.factor(cluster.ids) } -if (!class(expr.mat)=="dgCMatrix") { +if (!inherits(expr.mat, "dgCMatrix")) { +#if (!class(expr.mat)=="dgCMatrix") { expr.mat <- Matrix(expr.mat,sparse=TRUE) } diff --git a/R/wmw_gsea.R b/R/wmw_gsea.R index 0d7b513..2ca8f14 100644 --- a/R/wmw_gsea.R +++ b/R/wmw_gsea.R @@ -18,7 +18,8 @@ wmw_gsea <- function(expr.mat,cluster.cells,log.fc.cluster,gene.sets) { -if (!class(expr.mat)=="matrix") { +if (!inherits(expr.mat, "matrix")) { +#if (!class(expr.mat)=="matrix") { expr.mat <- as.matrix(expr.mat) }