Skip to contents

Plot correlation heatmaps

Usage

plot_correlation_heatmaps(
  e,
  correlation_list_name,
  channels = c("cfos", "eyfp", "colabel"),
  colors = c("#be0000", "#00782e", "#f09b08"),
  sig_color = "yellow",
  sig_nudge_y = -0.7,
  sig_size = 7,
  ontology = "allen",
  anatomical.order = c("Isocortex", "OLF", "HPF", "CTXsp", "CNU", "TH", "HY", "MB",
    "HB", "CB"),
  print_plot = TRUE,
  save_plot = TRUE,
  image_ext = ".png",
  plot_title = NULL,
  height = 10,
  width = 10,
  theme.hm = ggplot2::theme(axis.text.x = element_text(hjust = 1, vjust = 0.5, angle =
    90, size = 8), axis.text.y = element_text(vjust = 0.5, size = 8), plot.title =
    element_text(hjust = 0.5, size = 36), axis.title = element_text(size = 18),
    legend.text = element_text(size = 22), legend.key.height = unit(100, "points"),
    legend.title = element_text(size = 22), panel.spacing = unit(0.2, "lines"),
    strip.text.x = element_text(angle = 0, hjust = 0.5, vjust = 0.5, size = 10),
    strip.text.y = element_text(angle = 270,      hjust = 0.5, vjust = 0.5, size = 10),
    strip.placement = "outside", strip.background = element_rect(color = "black", fill =
    "lightblue"))
)

Arguments

e

experiment object. Must contain a named correlation_list object generated by get_correlations()

correlation_list_name

(str) The name of the correlation object generated by get_correlations()

channels

(str, default = c("cfos", "eyfp", "colabel")) Must exist in the channels attribute of the correlation_list.

colors

(str, default = c("#be0000", "#00782e", "#f09b08")) Hexadecimal code for the colors corresponding channels parameter. Color values can also be input compatible with ggplot2 plotting functions.

sig_color

(str, default = "yellow") Color of the significance symbol in R

sig_nudge_y

(default = -0.7) Relative amount to nudge the significance symbols in the y direction to center over each square.

sig_size

(default = 7) Point size for significance symbol.

ontology

(str, default = "allen") Region ontology to use. options = "allen" or "unified"

anatomical.order

(default = c("Isocortex", "OLF", "HPF", "CTXsp", "CNU","TH", "HY", "MB", "HB", "CB")) Default way to group subregions into super regions order

print_plot

(bool, default = TRUE) Print the plot as graphics windows.

save_plot

(bool, default = TRUE) Save into the figures subdirectory of the the experiment object output folder.

image_ext

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

plot_title

(str, default = NULL) If NULL, the correlation_list_name will used as the title with underscores removed.

height

(int) Height of the plot in inches.

width

(int) Width of the plot in inches.

theme.hm

Option to use custom ggplot2 theme if the user wants. See default values as example.

Value

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

Examples

plot_correlation_heatmaps(e, correlation_list_name = "female_AD")
#> Error in plot_correlation_heatmaps(e, correlation_list_name = "female_AD"): object 'e' not found