combine_sender_receiver_de Combine Muscat differential expression output for senders and receivers by linkgin ligands to receptors based on the prior knowledge ligand-receptor network.
Arguments
- sender_de
Differential expression analysis output for the sender cell types. `de_output_tidy` slot of the output of `perform_muscat_de_analysis`.
- receiver_de
Differential expression analysis output for the receiver cell types. `de_output_tidy` slot of the output of `perform_muscat_de_analysis`.
- senders_oi
Default NULL: all celltypes will be considered as senders. If you want to select specific senders_oi: you can add this here as character vector.
- receivers_oi
Default NULL: all celltypes will be considered as receivers. If you want to select specific receivers_oi: you can add this here as character vector.
- lr_network
Prior knowledge Ligand-Receptor network (columns: ligand, receptor)
Value
Data frame combining Muscat DE output for sender and receiver linked to each other through joining by the ligand-receptor network.
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)
sample_id = "tumor"
group_id = "pEMT"
celltype_id = "celltype"
batches = NA
contrasts_oi = c("'High-Low','Low-High'")
senders_oi = SummarizedExperiment::colData(sce)[,celltype_id] %>% unique()
receivers_oi = SummarizedExperiment::colData(sce)[,celltype_id] %>% unique()
celltype_de = perform_muscat_de_analysis(
sce = sce,
sample_id = sample_id,
celltype_id = celltype_id,
group_id = group_id,
batches = batches,
contrasts = contrasts_oi)
sender_receiver_de = combine_sender_receiver_de(
sender_de = celltype_de$de_output_tidy,
receiver_de = celltype_de$de_output_tidy,
senders_oi = senders_oi,
receivers_oi = receivers_oi,
lr_network = lr_network)
} # }