make_lr_target_scatter_plot Plot Ligand-Receptor pseudobulk expression product values vs pseudobulk expression of correlated target genes supported by prior information.
Usage
make_lr_target_scatter_plot(prioritization_tables, ligand_oi, receptor_oi, sender_oi, receiver_oi, receiver_info, grouping_tbl, lr_target_prior_cor_filtered)Arguments
- prioritization_tables
Output of `generate_prioritization_tables` or sublist in the output of `multi_nichenet_analysis`
- ligand_oi
Character vector of name of the ligand of interest
- receptor_oi
Character vector of name of the receptor of interest
- sender_oi
Character vector with the names of the sender cell type of interest
- receiver_oi
Character vector with the names of the receiver cell type of interest
- receiver_info
`celltype_info` or `receiver_info` slot of the output of the `multi_nichenet_analysis` function
- grouping_tbl
`grouping_tbl` slot of the output of the `multi_nichenet_analysis` function
- lr_target_prior_cor_filtered
Data frame filtered from `lr_target_prior_cor` (= output of `multi_nichenet_analysis` or `lr_target_prior_cor_inference`). Filter should be done to keep onl LR–>Target links that are both supported by prior knowledge and correlation in terms of expression.
Examples
if (FALSE) { # \dontrun{
library(dplyr)
lr_network = readRDS(url("https://zenodo.org/record/3260758/files/lr_network.rds"))
lr_network = lr_network %>% dplyr::rename(ligand = from, receptor = to) %>% dplyr::distinct(ligand, receptor)
ligand_target_matrix = readRDS(url("https://zenodo.org/record/3260758/files/ligand_target_matrix.rds"))
sample_id = "tumor"
group_id = "pEMT"
celltype_id = "celltype"
batches = NA
contrasts_oi = c("'High-Low','Low-High'")
contrast_tbl = tibble(contrast = c("High-Low","Low-High"), group = c("High","Low"))
output = multi_nichenet_analysis(
sce = sce,
celltype_id = celltype_id,
sample_id = sample_id,
group_id = group_id,
batches = batches,
lr_network = lr_network,
ligand_target_matrix = ligand_target_matrix,
contrasts_oi = contrasts_oi,
contrast_tbl = contrast_tbl
)
ligand_oi ="IL24"
receptor_oi = "IL22RA1"
sender_oi = "CAF"
receiver_oi ="Malignant"
lr_target_prior_cor_filtered = output$lr_target_prior_cor %>% filter(scaled_prior_score > 0.50 & (pearson > 0.66 | spearman > 0.66))
lr_target_scatter_plot = make_lr_target_scatter_plot(output$prioritization_tables, ligand_oi, receptor_oi, sender_oi, receiver_oi, output$celltype_info, output$grouping_tbl, lr_target_prior_cor_filtered)
} # }