process_spatial_de Process the spatialDE output
Arguments
- DE_table
Output of `calculate_spatial_DE`
- type
For what type of cellype is the DE analysis: "sender" or "receiver"?
- lr_network
Ligand-Receptor Network in tibble format: ligand, receptor as columns
- 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.
Examples
if (FALSE) { # \dontrun{
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")
DE_table <- calculate_spatial_DE(seurat_obj, spatial_info)
processed_spatialDE <- process_spatial_de(DE_table, type = "sender", lr_network, expression_pct = 0.10, specificity_score = "lfc")
} # }