calculate_niche_de: Calculate differential expression of cell types in one niche...

View source: R/differential_nichenet.R

calculate_niche_deR Documentation

Calculate differential expression of cell types in one niche versus all other niches of interest.

Description

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.

Usage

calculate_niche_de(seurat_obj, niches, type, assay_oi = "SCT")

Arguments

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.

Value

A tibble containing the DE results of the niches versus each other.

Examples

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


saeyslab/nichenetr documentation built on April 27, 2024, 9:24 p.m.