Plot heatpmap of correlation between marker genes and cell types
Source:R/plot.R
plot_st_cor_heatmap.RdPlot heatpmap of correlation between the expression of marker genes and the predicted score of cell types among all spatial cells or spots.
Usage
plot_st_cor_heatmap(
object,
marker_genes,
celltypes,
color_low = NULL,
color_mid = NULL,
color_high = NULL,
scale = "none",
if_show_top = T,
top_direction = "row",
border_color = NA
)Arguments
- object
SpaTalk object generated from
dec_celltype.- marker_genes
A character containing the known marker genes to plot, provide at least two marker genes of interest.
- celltypes
A character containing name of cell type in the
sc_celltype. Default is to plot all cell types.- color_low
Color for the lowest value.
- color_mid
Color for the middle value for using
scale_color_gradient2. Default isNULL.- color_high
Color for the highest value.
- scale
Character indicating if the values should be centered and scaled in either the row direction or the column direction, or none. Corresponding values are 'row', 'column' and 'none'.
- if_show_top
Whether to plot a symbol to the highest value across rows or columns. Default is
TRUE.- top_direction
Direction to identify the highest value, select
'row'or'column'.- border_color
Color of the cell border. Default is
'NA'.