circle_plot {PopComm} | R Documentation |
Plot Circular Ligand-Receptor Interaction Network
Description
Plots a circular ligand-receptor (LR) interaction network with curved directed edges. Nodes are arranged in a circle, and edge widths and colors represent interaction strengths.
Usage
circle_plot(
filtered_lr,
edge_width = c("count", "cor"),
node_colors = NULL,
show_self_interactions = TRUE,
cutoff = 0
)
Arguments
filtered_lr |
A data frame of ligand-receptor pairs from prior analysis (e.g., output of |
edge_width |
Determines edge weights, either "cor" (correlation) or "count" (interaction count) (default: "count"). |
node_colors |
Named vector mapping cell types to colors. Example: c("Cardiac" = "#E41A1C", "Fibroblast" = "#377EB8"). If NULL, uses default palette. |
show_self_interactions |
Logical indicating whether to display self-interactions (logical, default: TRUE). |
cutoff |
Minimum edge weight to display (numeric, default: 0). |
Value
A recordedplot object representing the network plot.
Examples
# Plot Circular Cell-Cell Interaction Network
data(filtered_lr_eg)
p <- circle_plot(filtered_lr_eg, edge_width = "count", show_self_interactions = TRUE)
print(p)