.ggcluster_enrich | R Documentation |
This function generates a KEGG cluster plot, showing pathways and their relationships across different clusters with customizable aesthetics.
.ggcluster_enrich(
data,
color_low = "pink",
color_high = "red",
size_range = c(0.8, 4),
curve_color = "grey70",
curve_size = 0.5,
vertical_line_color = "darkcyan",
vertical_line_size = 1.5,
dot_line_color = "grey70",
dot_line_size = 0.3,
dot_line_type = "dotted",
vline_color = "grey80",
vline_type = "dashed",
label_font_size = 3,
label_font_face = "bold",
pathway_font_size = 2.5,
pathway_font_face = "italic",
legend_position = "right",
x_pathway_offset = 0.3,
label_x_size = 6,
plot_margins = c(5, 200, 10, 250)
)
data |
A data frame containing KEGG cluster data. Must include columns: 'Term', 'Level2', 'group', 'Padj', 'Significant', and 'Annotated'. |
color_low |
Color for the lowest value in the gradient (default: "pink"). |
color_high |
Color for the highest value in the gradient (default: "red"). |
size_range |
A numeric vector of length 2 to control the size range of points (default: c(0.8, 4)). |
curve_color |
Color for the connecting curves between Level2 and Terms (default: "grey70"). |
curve_size |
Line width for the connecting curves (default: 0.5). |
vertical_line_color |
Color for the vertical lines between Level2 labels and Terms (default: "darkcyan"). |
vertical_line_size |
Width of vertical lines between Level2 and Terms (default: 1.5). |
dot_line_color |
Color for dotted lines connecting clusters to pathways (default: "grey70"). |
dot_line_size |
Line width for the dotted lines (default: 0.3). |
dot_line_type |
Line type for the dotted lines (default: "dotted"). |
vline_color |
Color for vertical lines separating clusters (default: "grey80"). |
vline_type |
Line type for vertical lines separating clusters (default: "dashed"). |
label_font_size |
Font size for the Level2 labels (default: 3). |
label_font_face |
Font face for the Level2 labels (default: "bold"). |
pathway_font_size |
Font size for pathway labels (default: 2.5). |
pathway_font_face |
Font face for pathway labels (default: "italic"). |
legend_position |
Position of the legend (default: "right"). |
x_pathway_offset |
Offset to control the x-axis positioning of pathways (default: 0.3). |
label_x_size |
Font size for the x labels (default: 6). |
plot_margins |
Numeric vector of length 4 to control plot margins (default: c(5, 200, 10, 250)). |
data <- data.frame(
Term = c("Peroxisome", "PPAR signaling pathway", "Fatty acid elongation"),
Level2 = c("Transport and catabolism", "Endocrine system", "Lipid metabolism"),
group = c("Cluster1", "Cluster1", "Cluster1"),
Padj = c(0.015, 0.24, 0.23),
Significant = c(7, 5, 3),
Annotated = c(87, 89, 29)
)
.ggcluster_enrich(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.