View source: R/differential_nichenet.R
calculate_niche_de | R Documentation |
calculate_niche_de
Calculate differential expression of cell types in one niche versus all other niches of interest. This is possible for sender cell types and receiver cell types.
calculate_niche_de(seurat_obj, niches, type, assay_oi = "SCT")
seurat_obj |
Seurat object |
niches |
a list of lists/niches giving the name, senders and receiver celltypes for each nice. Sender and receiver cell types should be part of Idents(seurat_obj). |
type |
For what type of cellype is the DE analysis: "sender" or "receiver"? |
assay_oi |
Which assay need to be used for DE calculation via 'FindMarkers'. Default SCT, alternatives: RNA. |
A tibble containing the DE results of the niches versus each other.
## Not run:
seurat_obj = readRDS(url("https://zenodo.org/record/5840787/files/seurat_obj_subset_integrated_zonation.rds"))
niches = list(
"KC_niche" = list(
"sender" = c("LSECs_portal","Hepatocytes_portal","Stellate cells_portal"),
"receiver" = c("KCs")),
"MoMac2_niche" = list(
"sender" = c("Cholangiocytes","Fibroblast 2"),
"receiver" = c("MoMac2")),
"MoMac1_niche" = list(
"sender" = c("Capsule fibroblasts","Mesothelial cells"),
"receiver" = c("MoMac1"))
)
calculate_niche_de(seurat_obj, niches, "sender")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.