View source: R/differential_nichenet.R
process_spatial_de | R Documentation |
process_spatial_de
Process the spatialDE output
process_spatial_de(DE_table, type, lr_network, expression_pct, specificity_score = "lfc")
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. |
A tibble of processed spatial DE information
## Not run:
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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.