Plot the networks stored in an experiment object
Source:R/analysis_plotting_functions.R
plot_networks.Rd
Plot the networks stored in an experiment object
Usage
plot_networks(
e,
network_name = "AD",
title = NULL,
channels = c("cfos", "eyfp", "colabel"),
edge_color = "firebrick",
height = 15,
width = 15,
edge_type = "arc",
region_legend = TRUE,
degree_scale_limit = c(1, 10),
anatomical.colors = NULL,
correlation_edge_width_limit = c(0.8, 1),
image_ext = ".png",
print_plot = FALSE,
graph_theme = NULL,
label_size = 5,
edge_thickness_range = c(1, 5),
node_size_range = c(1, 8),
label_offset = 0.15,
save_plot = TRUE
)
Arguments
- e
experiment object
- network_name
(str, default = "AD")
- title
(str, default = NULL) Title of network plot
- channels
(str, default = c("cfos", "eyfp", "colabel"))
- edge_color
(str, default = "firebrick") Color of the network edges.
- height
Height of the plot in inches.
- width
width of the plot in inches.
- edge_type
(default = "arc") "arc" or "diagonal".
- region_legend
(default = TRUE) Boolean determining whether or not to show the region legend categorizing subregions into their largest parent region. Only works well if the Allen ontology is used for the dataset.
- degree_scale_limit
(vec, default = c(1,10)) Scale limit for degree size
- anatomical.colors
(vector, default = NULL) NULL defaults to viridis. A named vector of hexadecimal codes for the anatomical super regions. e.g. anatomical.colors = c(Isocortex = "#5571a9", OLF = "#64bdc4", HPF = "#d2875b", CTXsp = "#87a3db", CNU = "#466496", TH = "#7e72af", HY = "#8e7960", MB = "#d796c8", HB = "#646464")
- correlation_edge_width_limit
(default = c(0.8,1))
- image_ext
(default = ".png") image extension to the plot as.
- print_plot
(bool, default = FALSE) Whether to print the plot as an output. the experiment object output folder.
- graph_theme
(default = NULL) Add a
ggraph::theme_graph()
to the network graph. If NULL, the default is taken.- label_size
(default = 5) Default font size for network region labels.
- edge_thickness_range
(default = c(1,5)) Thickness range of the edges.
- node_size_range
(default = c(1,8)) Node size range. Can also be a hexadecimal color code written as a string.
- label_offset
(default = 0.15) Distance of label from nodes.
- save_plot
(bool, default = TRUE) Save into the figures subdirectory of the the experiment object output folder.