View source: R/plot_all_networks.R
| plot_network_core | R Documentation |
Generates publication-quality gene regulatory network plots from adjacency matrices.
plot_network_core(
adj_matrix,
mode = "undirected",
layout_fun = igraph::layout_nicely,
node_id_col = "gene",
size_var = "degree",
color_var = "degree",
size_range = c(1, 5),
color_palette = c("steelblue", "white", "orangered"),
label_size = 2,
edge_color = "#ADD8E6",
edge_alpha = 0.6,
edge_size = 0.3,
curvature = 0,
edge_linetype = "solid",
legend_position = "right"
)
adj_matrix |
Square adjacency matrix (rows/columns = gene names). |
mode |
Network type: "undirected" (default) or "directed". |
layout_fun |
Igraph layout function (default = igraph::layout_nicely; currently informational). |
node_id_col |
Column name for node IDs (default = "gene"). |
size_var |
Node attribute for size mapping (default = "degree"). |
color_var |
Node attribute for color mapping (default = "degree"). |
size_range |
Numeric vector (length 2) for node size range (default = c(1,5)). |
color_palette |
Color gradient for nodes (default = c("steelblue", "white", "orangered")). |
label_size |
Font size for node labels (default = 2). |
edge_color |
Edge color (default = "#ADD8E6"). |
edge_alpha |
Edge transparency (default = 0.6). |
edge_size |
Edge thickness (default = 0.3). |
curvature |
Edge curvature (0 = straight, default = 0). |
edge_linetype |
Edge line type ("solid" (default) or "dashed"). |
legend_position |
Legend position ("right" (default), "bottom", "none"). |
ggplot object (network plot) or NULL if no edges exist.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.