Browse code

Seurat retrieve count matrix

yuan-yin-truly authored on 24/03/2022 21:43:40
Showing 1 changed files

... ...
@@ -225,7 +225,7 @@ seuratObject <- CreateSeuratObject(decontaminated.counts)
225 225
 Conversely, if you have a Seurat object containing raw count matrix and would like to run decontX, simply retrieve the count matrix, convert to SingleCellExperiment, and run on decontX.
226 226
 
227 227
 ```{r seuratIntegration2, eval=FALSE}
228
-counts <- seurat@assays$RNA@counts
228
+counts <- GetAssayData(object = seuratObject, slot = "counts")
229 229
 sce <- SingleCellExperiment(list(counts = counts))
230 230
 sce <- decontX(sce)
231 231
 ```