Processing differential expression output of the receiver cell types
Source:R/differential_nichenet.R
process_receiver_target_de.Rdprocess_receiver_target_de Processing differential expression output of the receiver cell types – used before ligand-activity and ligand-target inference.
Usage
process_receiver_target_de(DE_receiver_targets, niches, expression_pct, specificity_score = "min_lfc")Arguments
- DE_receiver_targets
Output of `calculate_niche_de` with `type = receiver`
- 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).
- 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.
- specificity_score
Defines which score will be used to prioritze ligand-receptor pairs and consider their differential expression. Default and recommended: "min_lfc". "min_lfc" looks at the minimal logFC of the ligand/receptor between the celltype of interest and all the other celltypes. Alternatives: "mean_lfc", "min_score", and "mean_score". Mean uses the average/mean instead of minimum. score is the product of the logFC and the ratio of fraction of expressing cells.
Value
A tibble containing the processed DE information of the receiver cell types – used before ligand-activity and ligand-target inference.
Examples
if (FALSE) { # \dontrun{
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_receiver <- calculate_niche_de(seurat_obj, niches, "receiver")
expression_pct <- 0.10
DE_receiver_processed <- process_receiver_target_de(DE_receiver_targets = DE_receiver, niches = niches, expression_pct = expression_pct)
} # }