This function plots the distribution of expression levels for selected markers in an expression matrix. The user can specify a subset of markers to plot, or plot all markers by default. Additionally, the user can group histograms by a specified column in ev_meta.
Usage
plotDistribution(
obj,
plot_markers = "ALL",
matrix = "Raw_Score",
group_by = NULL,
group_colors = NULL
)
Arguments
- obj
An object of class
CygnusObject
containing the expression matrix and metadata.- plot_markers
A vector of marker names to plot. If set to "ALL", distributions for all markers will be plotted. Default is "ALL".
- matrix
Character string specifying the name of the matrix to use. Default is "Raw_Score".
- group_by
A character string specifying a column in
ev_meta
to group histograms by. Default isNULL
(no grouping).- group_colors
A named vector of colors for groups. Names should correspond to unique values in the group_by column. If not specified, defaults to the RColorBrewer Set2 palette.