Calculate differential expression between spatially different subpopulations of the same cell type
Source:R/differential_nichenet.R
calculate_spatial_DE.Rdcalculate_spatial_DE Calculate differential expression between spatially different subpopulations of the same cell type
Arguments
- 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, ...
Examples
if (FALSE) { # \dontrun{
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)
} # }