Plot normalized cell counts
plot_normalized_counts.Rd
Plot the cell counts normalized by volume for a given channel
Usage
plot_normalized_counts(
e,
channels = c("cfos", "eyfp", "colabel"),
by = c("sex", "group"),
values = list(c("female", "non"), c("female", "agg"), c("female", "control"),
c("male", "agg"), c("male", "control")),
colors = c("white", "lightblue", "black", "red", "green"),
ontology = "allen",
title = NULL,
unit_label = bquote(`Cell counts `("cells/mm"^3)),
anatomical.order = c("Isocortex", "OLF", "HPF", "CTXsp", "CNU", "TH", "HY", "MB",
"HB", "CB"),
height = 7,
width = 20,
region_label_angle = 50,
label_text_size = 8,
print_plot = TRUE,
save_plot = TRUE,
flip_axis = FALSE,
reverse_colors = FALSE,
legend.justification = c(0, 0),
legend.position = "inside",
legend.position.inside = c(0.05, 0.6),
legend.direction = "vertical",
limits = c(0, 1e+05),
facet_background_color = NULL,
strip_background_color = "lightblue",
image_ext = ".pdf"
)
Arguments
- e
experiment object
- channels
(str, default = c("cfos", "eyfp", "colabel"))
- by
(str) Attribute names to group by, e.g. c("sex", "group")
- values
(list) A list with a length the number of groups desired for plotting. Each element of the list is a vector in the order of the the respective values for the attributes entered for the
by
parameter to generate a specific analysis group. Each vector should be unique to generate a uniquely colored bar. e.g.values = c("female", "AD").- colors
(str, default = c("white", "lightblue")) Hexadecimal codes corresponding to the groups (respectively) to plot. The length of this vector should be the length of the list.
- ontology
(str, default = "allen") Region ontology to use. options = "allen" or "unified"
- title
(str, default = NULL) An optional title for the plot
- unit_label
(str, default = bquote('Cell counts '('cells/mm'^3))) Default unit label for the graphs
- anatomical.order
(default = c("Isocortex", "OLF", "HPF", "CTXsp", "CNU","TH", "HY", "MB", "HB", "CB")) Default way to group subregions into super regions order
- height
height of the plot in inches.
- width
width of the plot in inches.
- region_label_angle
(int, default = 50) Angle of the region label.
- label_text_size
(int, default = 8) Size of the text element for the region labels.
- print_plot
(bool, default = TRUE) Whether to display the plot (in addition to saving the plot)
- save_plot
(bool, default = TRUE) Save into the figures subdirectory of the experiment object output folder.
- flip_axis
plot cell counts on x-axis rather than y-axis.
- reverse_colors
(bool, default = FALSE) Whether to reverse the color order. This may depend on the order in which you entered the
colors
parameter- legend.justification
(default = c(0, 0))
- legend.position
(default = "inside")
- legend.position.inside
(default = c(0.05, 0.6))
- legend.direction
(c("vertical", "horizontal"))
- limits
(c(0,100000)) Range of the normalized cell counts.
- facet_background_color
(default = NULL) Set to a hexadecimal string, e.g."#FFFFFF", when you want to shade the background of the graph. Defaults to no background when NULL.
- strip_background_color
(default = "lightblue") Color of background srip delineating major anatomical parent regions. Set to color name or to hexadecimal code.
- image_ext
(default = ".png") image extension to the plot as.