Skip to content

Use other deconvolution methods

Shao, Xin edited this page Feb 14, 2023 · 3 revisions

create SpaTalk obj and use dec_celltype

Please install the corresponding R/python packages before running

  • Use RCTD
obj <- dec_celltype(obj, ..., method = 2)
  • Use Seurat
obj <- dec_celltype(obj, ..., method = 3)
  • Use SPOTlight
obj <- dec_celltype(obj, ..., method = 4)
  • Use deconvSeq
obj <- dec_celltype(obj, ..., method = 5)
  • Use stereoscope
# create a stereoscope environment with anaconda3
# define the path of anaconda3, default is "~/anaconda3"
obj <- dec_celltype(obj, ..., method = 6, env = "stereoscope ", anaconda_path = "~/anaconda3")
  • Use cell2location
# create a cell2location environment with anaconda3
obj <- dec_celltype(obj, ..., method = 7, env = "cell2location")
  • Use the result of other methods directly

❗️❗️❗️ Please check the colnamesand rownames of result first!

# rownames of result
all(rownames(result) == colnames(obj@data$rawdata))
# if not true, then run
rownames(result) <- colnames(obj@data$rawdata)

# colnames of result
all(colnames (result) %in% sc_celltype)
# if not true, then please make them same!

then run

# result must be a matrix
obj <- dec_celltype(obj, ..., dec_result = result)