From d8160c7602770e890e1ca9b8530af9625b6bade4 Mon Sep 17 00:00:00 2001 From: wikiselev Date: Mon, 23 Apr 2018 13:28:43 +0100 Subject: [PATCH] fix sparsity issue --- R/CoreMethods.R | 8 ++++---- data/yan.rda | Bin inst/CITATION | 0 inst/NEWS | 0 inst/scmap.png | Bin man/ann.Rd | 0 man/getSankey.Rd | 0 man/setFeatures.Rd | 0 man/yan.Rd | 0 vignettes/scmap.Rmd | 0 10 files changed, 4 insertions(+), 4 deletions(-) mode change 100755 => 100644 R/CoreMethods.R mode change 100755 => 100644 data/yan.rda mode change 100755 => 100644 inst/CITATION mode change 100755 => 100644 inst/NEWS mode change 100755 => 100644 inst/scmap.png mode change 100755 => 100644 man/ann.Rd mode change 100755 => 100644 man/getSankey.Rd mode change 100755 => 100644 man/setFeatures.Rd mode change 100755 => 100644 man/yan.Rd mode change 100755 => 100644 vignettes/scmap.Rmd diff --git a/R/CoreMethods.R b/R/CoreMethods.R old mode 100755 new mode 100644 index aaf8000..ef5bdf6 --- a/R/CoreMethods.R +++ b/R/CoreMethods.R @@ -133,7 +133,7 @@ indexCluster.SingleCellExperiment <- function(object, cluster_col) { } tmp <- object[rowData(object)$scmap_features, ] gene <- cell_class <- exprs <- NULL - exprs_mat <- logcounts(tmp) + exprs_mat <- as.matrix(logcounts(tmp)) rownames(exprs_mat) <- as.data.frame(rowData(tmp))$feature_symbol colnames(exprs_mat) <- as.data.frame(colData(tmp))[[cluster_col]] @@ -203,7 +203,7 @@ indexCell.SingleCellExperiment <- function(object, M, k) { } tmp <- object[rowData(object)$scmap_features, ] - exprs_mat <- logcounts(tmp) + exprs_mat <- as.matrix(logcounts(tmp)) rownames(exprs_mat) <- as.data.frame(rowData(tmp))$feature_symbol features <- rownames(exprs_mat) @@ -299,7 +299,7 @@ scmapCluster.SingleCellExperiment <- function(projection, index_list, threshold) } # get expression values of the projection dataset - proj_exprs <- logcounts(tmp) + proj_exprs <- as.matrix(logcounts(tmp)) rownames(proj_exprs) <- rowData(tmp)$feature_symbol # prepare projection dataset @@ -402,7 +402,7 @@ scmapCell.SingleCellExperiment <- function(projection, index_list, w) { subcentroids <- index$subcentroids subclusters <- index$subclusters - proj_exprs <- logcounts(projection) + proj_exprs <- as.matrix(logcounts(projection)) rownames(proj_exprs) <- rowData(projection)$feature_symbol dists <- dists_subcentroids(proj_exprs, subcentroids) diff --git a/data/yan.rda b/data/yan.rda old mode 100755 new mode 100644 diff --git a/inst/CITATION b/inst/CITATION old mode 100755 new mode 100644 diff --git a/inst/NEWS b/inst/NEWS old mode 100755 new mode 100644 diff --git a/inst/scmap.png b/inst/scmap.png old mode 100755 new mode 100644 diff --git a/man/ann.Rd b/man/ann.Rd old mode 100755 new mode 100644 diff --git a/man/getSankey.Rd b/man/getSankey.Rd old mode 100755 new mode 100644 diff --git a/man/setFeatures.Rd b/man/setFeatures.Rd old mode 100755 new mode 100644 diff --git a/man/yan.Rd b/man/yan.Rd old mode 100755 new mode 100644 diff --git a/vignettes/scmap.Rmd b/vignettes/scmap.Rmd old mode 100755 new mode 100644