From 5953e09c09bedc1be7074a31b42f38c94607d9b9 Mon Sep 17 00:00:00 2001 From: Joshua Sodicoff <44811472+jsodicoff@users.noreply.github.com> Date: Fri, 10 Jan 2020 15:45:13 -0500 Subject: [PATCH] Updated references to Seurat slots I was trying to use this function and noticed that Seurat has updated the way their object slots work, meaning that clusterLouvainJaccard no longer worked. --- R/deprecated.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/deprecated.R b/R/deprecated.R index 2402a03f..cfbbf68c 100644 --- a/R/deprecated.R +++ b/R/deprecated.R @@ -169,9 +169,9 @@ clusterLouvainJaccard = function(object, resolution = 0.1, k.param=30, n.iter = ) } temp.seurat = CreateSeuratObject(t(Reduce(rbind,object@scale.data))) - temp.seurat@scale.data = t(Reduce(rbind,object@scale.data)) - rownames(object@H.norm)=colnames(temp.seurat@scale.data) - temp.seurat@dr$NMF=new(Class="dim.reduction",cell.embeddings=object@H.norm,key="NMF") + temp.seurat@assays[["scale.data"]] = t(Reduce(rbind,object@scale.data)) + rownames(object@H.norm)=colnames(temp.seurat@assays[["scale.data"]]) + temp.seurat@reductions[["NMF"]]=new(Class="dim.reduction",cell.embeddings=object@H.norm,key="NMF") temp.seurat <- FindClusters(object = temp.seurat, reduction.type = "NMF", dims.use = 1:ncol(object@H.norm),force.recalc=T, save.SNN = T,resolution=resolution,k.param=k.param, @@ -368,4 +368,4 @@ scaleNotCenter_sparse<-function (object, cells = NULL) newLiger <- function(raw.data, make.sparse = T, take.gene.union = F) { print('This function has been deprecated and will soon be removed. Please use createLiger instead.') return(createLiger(raw.data, make.sparse = make.sparse, take.gene.union = take.gene.union)) -} \ No newline at end of file +}