combine_sender_receiver_info_ic: combine_sender_receiver_info_ic

View source: R/expression_processing.R

combine_sender_receiver_info_icR Documentation

combine_sender_receiver_info_ic

Description

combine_sender_receiver_info_ic Link the ligand-expression information of the Sender cell type to the receptor-expression information of the Receiver cell type. Linking via prior knowledge ligand-receptor network.

Usage

combine_sender_receiver_info_ic(sender_info, receiver_info, senders_oi, receivers_oi, lr_network)

Arguments

sender_info

Output of 'process_info_to_ic' with 'ic_type = "sender"'

receiver_info

Output of 'process_info_to_ic' with 'ic_type = "receiver"'

senders_oi

Character vector indicating the names of the sender cell types of interest

receivers_oi

Character vector indicating the names of the receiver cell types of interest

lr_network

Prior knowledge Ligand-Receptor network (columns: ligand, receptor)

Value

List with data frames containing ligand-receptor sender-receiver combined expression information (see output of 'get_avg_frac_exprs_abund' and 'process_info_to_ic')

Examples

## Not run: 
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"
celltype_info = get_avg_frac_exprs_abund(sce = sce, sample_id = sample_id, celltype_id =  celltype_id, group_id = group_id)
receiver_info_ic = process_info_to_ic(info_object = celltype_info, ic_type = "receiver", lr_network = lr_network)
sender_info_ic = process_info_to_ic(info_object = celltype_info, ic_type = "sender", lr_network = lr_network)
senders_oi = SummarizedExperiment::colData(sce)[,celltype_id] %>% unique()
receivers_oi = SummarizedExperiment::colData(sce)[,celltype_id] %>% unique()
sender_receiver_info = combine_sender_receiver_info_ic(sender_info = sender_info_ic,receiver_info = receiver_info_ic,senders_oi = senders_oi,receivers_oi = receivers_oi,lr_network = lr_network)
  

## End(Not run)


saeyslab/multinichenetr documentation built on Jan. 15, 2025, 7:55 p.m.