dot_plot {PopComm} | R Documentation |
Create Ligand-Receptor Interaction Dot Plot
Description
Generates a dot plot to visualize ligand-receptor (LR) interaction. Dot sizes are scaled by the correlation coefficient and dot colors represent -log10(adjust.p). The function supports plotting the top interactions per sender-receiver pair or user-specified ligand-receptor pairs.
Usage
dot_plot(
filtered_lr,
top_n = 5,
axis = c("LR-SR", "SR-LR"),
type_scale = c("size", "radius"),
selected_LR = NULL
)
Arguments
filtered_lr |
A data frame containing ligand-receptor interaction data. |
top_n |
Integer specifying the number of top interactions to select per sender-receiver pair (numeric, default: 5). |
axis |
Character indicating the configuration of rows and columns in the plot. Options: "LR-SR" (default, rows = ligand-receptor pairs, columns = sender-receiver pairs) or "SR-LR". |
type_scale |
Character indicating the scaling method for the plot.
Options: "size" (default, uses |
selected_LR |
Optional character vector of ligand-receptor pair identifiers (e.g., c("TIMP1_CD63", "DSCAM_DCC")). If NULL, the top_n interactions per sender-receiver pair are used. |
Value
A ggplot object representing the dot plot.
Examples
# Plot LR Interaction Dot Plot
data(filtered_lr_eg)
p <- dot_plot(filtered_lr_eg, axis = "LR-SR", type_scale = "size")
print(p)