process_niche_de: Process the DE output of 'calculate_niche_de'

View source: R/differential_nichenet.R

process_niche_deR Documentation

Process the DE output of 'calculate_niche_de'

Description

process_niche_de Process the DE output of 'calculate_niche_de': define what the average and minimum logFC value is after comparing a celltype vs all the celltypes of the other niches.

Usage

process_niche_de(DE_table, niches, type, expression_pct)

Arguments

DE_table

Output of 'calculate_niche_de'

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"?

expression_pct

Percentage of cells of a cell type having a non-zero expression value for a gene such that a gene can be considered expressed by that cell type.

Value

A tibble containing processed DE information

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"))
)
DE_table = calculate_niche_de(seurat_obj, niches, "sender")
process_niche_de(DE_table, niches, "sender",expression_pct = 0.10)

## End(Not run)


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