calculate_spatial_DE: Calculate differential expression between spatially different...

View source: R/differential_nichenet.R

calculate_spatial_DER Documentation

Calculate differential expression between spatially different subpopulations of the same cell type

Description

calculate_spatial_DE Calculate differential expression between spatially different subpopulations of the same cell type

Usage

calculate_spatial_DE(seurat_obj, spatial_info, assay_oi = "SCT")

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, ...

Value

A tibble with DE output

Examples

## 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)


saeyslab/nichenetr documentation built on March 26, 2024, 9:22 a.m.