View source: R/differential_nichenet.R
calculate_spatial_DE | R Documentation |
calculate_spatial_DE
Calculate differential expression between spatially different subpopulations of the same cell type
calculate_spatial_DE(seurat_obj, spatial_info, assay_oi = "SCT")
seurat_obj |
Seurat object |
spatial_info |
Tibble giving information about which celltypes should be compared to each other for defining spatial differential expression. Contains the columns "celltype_region_oi", "celltype_other_region", "niche", "celltype_type". |
assay_oi |
Assay for the DE analysis: RNA, SCT, ... |
A tibble with DE output
## Not run:
seurat_obj = readRDS(url("https://zenodo.org/record/5840787/files/seurat_obj_subset_integrated_zonation.rds"))
spatial_info = tibble(celltype_region_oi = c("LSECs_portal","Hepatocytes_portal","Stellate cells_portal"),
celltype_other_region = c("LSECs_central","Hepatocytes_central","Stellate cells_central")
) %>%
mutate(niche = "KC_niche", celltype_type = "sender")
calculate_spatial_DE(seurat_obj, spatial_info)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.