process_info_to_ic: process_info_to_ic

View source: R/expression_processing.R

process_info_to_icR Documentation

process_info_to_ic

Description

process_info_to_ic Process cell type expression information into intercellular communication focused information. Only keep information of ligands for the sender cell type setting, and information of receptors for the receiver cell type.

Usage

process_info_to_ic(info_object, ic_type = "sender", lr_network)

Arguments

info_object

Output of 'get_avg_frac_exprs_abund'

ic_type

"sender" or "receiver": indicates whether we should keep ligands or receptors respectively.

lr_network

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

Value

List with expression information of ligands (sender case) or receptors (receiver case) - similar to output of 'get_avg_frac_exprs_abund'.

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)

## End(Not run)


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