Visualizes a gene regulatory or protein–protein interaction network for a given cell type and differential expression group. Nodes are sized and colored by degree, and key hub genes are optionally annotated with their barplots of log fold-changes across sexes.
plot_network(g, cell_type, DEG_type, result_categories)A `ggplot` object representing the visualized network.
An `igraph` object representing the gene or protein interaction network.
Character string. The cell type label used in the plot title.
Character string. The differential expression category to visualize (e.g., `"sex-dimorphic"`).
A `data.frame` or tibble containing at least the columns: `"DEG_Type"`, `"Gene_Symbols"`, `"Male_avg_logFC"`, and `"Female_avg_logFC"`.