make_circos_one_group: make_circos_one_group

View source: R/plotting.R

make_circos_one_groupR Documentation

make_circos_one_group

Description

make_circos_one_group Make a circos plot with top prioritized ligand-receptor interactions for one group of interest.

Usage

make_circos_one_group(prioritized_tbl_oi, colors_sender, colors_receiver)

Arguments

prioritized_tbl_oi

Subset of 'prioritization_tables$group_prioritization_tbl': the ligand-receptor interactions shown in this subset will be visualized: recommended to consider the top n LR interactions of a group of interest, based on the prioritization_score (eg n = 50; see vignettes for examples).

colors_sender

Named vector of colors associated to each sender cell type. Vector = color, names = sender names. If sender and receiver cell types are the same, recommended that this vector is the same as 'colors_receiver'.

colors_receiver

Named vector of colors associated to each receiver cell type. Vector = color, names = sender names. Vector = color, names = sender names. If sender and receiver cell types are the same, recommended that this vector is the same as 'colors_receiver'.

Value

a list with a circos plot for one group of interest, and a legend showing the color corresponding to each sender/receiver cell type.

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)
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
     
     )


## End(Not run)

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