plot_SpaCCI_chordDiagram {SpaCCI}R Documentation

Plot SpaCCI Results on Chord Diagram

Description

This function generates a chord diagram to visualize cell-cell interactions based on ligand-receptor pairs. The interactions can be filtered by specific cell types, pathways, or interaction names.

Usage

plot_SpaCCI_chordDiagram(
  SpaCCI_Result_List,
  specific_celltypes = NULL,
  pathway_name = NULL,
  L_R_pair_name = NULL,
  color = NULL,
  alpha = 0.05
)

Arguments

SpaCCI_Result_List

A list containing the results from a SpaCCI "regional" or "global" analysis. This list should include pvalue_df, which are the outputs from run_SpaCCI(..., analysis_scale = "regional",...) or run_SpaCCI(..., analysis_scale = "global",...).

specific_celltypes

A character vector specifying the cell types to include in the plot, RECOMMEND using colnames of cell type proportion matrix to include all cell types. If NULL, cell types that involved in significant interactions are included.

pathway_name

A single character string specifying the pathway name to filter the interactions. If NULL, all pathways are included.

L_R_pair_name

A character vector specifying the ligand-receptor pair names to include in the plot. If NULL, all interactions are included.

color

A named vector of colors to use for the cell types. If NULL, a default color palette is used.

alpha

A numeric value specifying the significance threshold for adjusted P-values. Initially, set to 0.05.

Value

A chord diagram plot visualizing the significant cell-cell interactions.

Examples

library(SpaCCI)
library(dplyr)
library(circlize)
data(result_global)
celltypes <- c("beta" , "delta" , "ductal","macrophage",
                "activated_stellate", "quiescent_stellate")
# Run the result chordDiagram for global analysis
plot_SpaCCI_chordDiagram(SpaCCI_Result_List = result_global,
                         specific_celltypes = c(celltypes),
                         L_R_pair_name  = "AREG_EGFR")


[Package SpaCCI version 1.0.2 Index]