Skip to contents

Plot the networks stored in an experiment object

Usage

plot_joined_networks(
  e,
  correlation_list_names = c("male_agg", "female_non"),
  title = NULL,
  channels = "cfos",
  absolute_weight = TRUE,
  edge_colors = c(male_agg_pos = "#06537f", male_agg_neg = "#526c7a", female_non_pos =
    "#C70039", female_non_neg = "#71585f"),
  edge_color_labels = c(male_agg_pos = "Positive male", male_agg_neg = "Negative male",
    female_non_pos = "Positive female", female_non_neg = "Negative female"),
  height = 15,
  width = 15,
  region_legend = TRUE,
  degree_scale_limit = c(1, 10),
  correlation_edge_width_limit = c(0.8, 1),
  image_ext = ".png",
  print_plot = TRUE,
  graph_theme = NULL,
  transparent_edge_group1 = TRUE,
  transparent_edge_group2 = FALSE,
  label_size = 5,
  label_offset = 0.15,
  edge_thickness_range = c(1, 5),
  node_size_range = c(1, 8),
  anatomical.colors = NULL,
  save_plot = TRUE
)

Arguments

e

experiment object

correlation_list_names

(str vec) character vector of the two correlation lists used to include in a joined network, e.g., correlation_list_names = c("male_agg", "female_non")

title

(str, default = NULL) Title of network plot

channels

(str, default = c("cfos", "eyfp", "colabel"))

absolute_weight

(bool, default = TRUE) Whether to plot absolute weights. If TRUE, the edge_colors and edge_colors_label should not contain values for positive and negative correlations.

height

Height of the plot in inches.

width

width of the plot in inches.

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

correlation_edge_width_limit

Can also be a hexadecimal color code written as a string.

image_ext

(default = ".png") image extension to the plot as.

print_plot

(bool, default = TRUE) Whether to print the plot as an output. the experiment object output folder.

graph_theme

(default = NULL) Add a ggraph::theme() to the network graph. If NULL, the default is taken.

label_size

(default = 5) Default font size for network region labels.

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.

edge_color

(str, default = c(male_agg_pos = "Positive male", male_agg_neg = "Negative male", female_non_pos = "Positive female", female_non_neg = "Negative female")) Color of the network edges as a named vector.

Value

p_list A list the same length as the number of channels, with each element containing a plot handle for that channel.