Plot positive correlations between gene loadings across W
factor matrix in liger or
feature loadings in reduction slot of Seurat object.
Any negative correlations are set to NA and NA values set to bottom color of color gradient.
Factor_Cor_Plot(
object,
colors_use = NULL,
label = FALSE,
label_threshold = 0.5,
label_size = 5,
plot_title = NULL,
plot_type = "full",
positive_only = FALSE,
x_lab_rotate = TRUE,
cluster = TRUE,
cluster_rect = FALSE,
cluster_rect_num = NULL,
cluster_rect_col = NULL
)
liger or Seurat object.
Color palette to use for correlation values.
Default is RColorBrewer::RdBu
if positive_only = FALSE
.
If positive_only = TRUE
the default is viridis
.
Users can also supply vector of 3 colors (low, mid, high).
logical, whether to add correlation values to plot result.
threshold for adding correlation values if label = TRUE
. Default
is 0.5.
size of correlation labels
Plot title.
Controls plotting full matrix, or just the upper or lower triangles. Accepted values are: "full" (default), "upper", or "lower".
logical, whether to limit the plotted values to only positive correlations (negative values set to 0); default is FALSE.
logical, whether to rotate the axes labels on the x-axis. Default is TRUE.
logical, whether to cluster the plot using hclust
(default TRUE). If FALSE
factors are listed in numerical order.
logical, whether to add rectangles around the clustered areas on plot, default is FALSE.
number of rectangles to add to the plot, default NULL.
color to use for rectangles, default MULL (will set color automatically).
A ggplot object
if (FALSE) {
Factor_Cor_Plot(object = obj)
}