diff --git a/R/plot.R b/R/plot.R index 6c2676a..18be5e9 100644 --- a/R/plot.R +++ b/R/plot.R @@ -568,7 +568,7 @@ plot_ccdist <- function(object, celltype_sender, celltype_receiver, color = NULL #' @param top_lrpairs Number of top lrpairs for plotting. Default is \code{20}. #' @param color Color for the cells in heatmap. #' @param border_color color of cell borders on heatmap, use NA if no border should be drawn. -#' @param type Set 'sig' to plot significant LR pairs or set 'number' to plot the number of spatial LR interactions. +#' @param type Set 'sig' to plot significant LRI pairs or set 'number' to plot the number of spatial LRI pairs. #' @param fontsize_number fontsize of the numbers displayed in cells. #' @param number_color color of the text. #' @param color_low For 'number' type, define the color for the lowest value. @@ -645,7 +645,7 @@ plot_cci_lrpairs <- function(object, celltype_sender, celltype_receiver, top_lrp plot_res[lrpair$ligand[i], lrpair$receptor[i]] <- "*" } pheatmap::pheatmap(lrpair_mat, cluster_cols = F, cluster_rows = F, color = heat_col, border_color = border_color, legend = F, display_numbers = plot_res, - fontsize_number = fontsize_number, number_color = number_color, main = "Significantly enriched LRI") + fontsize_number = fontsize_number, number_color = number_color, main = "Significantly enriched LRI pairs") } else { if (is.null(color_low)) { color_low <- "orange" @@ -659,7 +659,7 @@ plot_cci_lrpairs <- function(object, celltype_sender, celltype_receiver, top_lrp lrpair_mat <- lrpair_mat[, -1] heat_color <- grDevices::colorRampPalette(c(color_low, color_high))(max(as.matrix(lrpair_mat))-1) heat_color <- c("white", heat_color) - pheatmap::pheatmap(lrpair_mat, cluster_cols = F, cluster_rows = F, border_color = border_color, color = heat_color, main = "Number of spatial LRIs") + pheatmap::pheatmap(lrpair_mat, cluster_cols = F, cluster_rows = F, border_color = border_color, color = heat_color, main = "Number of spatial LRI pairs") } } diff --git a/img/plot_cci_lrpairs_num.png b/img/plot_cci_lrpairs_num.png new file mode 100644 index 0000000..50a411f Binary files /dev/null and b/img/plot_cci_lrpairs_num.png differ diff --git a/man/plot_cci_lrpairs.Rd b/man/plot_cci_lrpairs.Rd index 68c20cc..6fa29c8 100644 --- a/man/plot_cci_lrpairs.Rd +++ b/man/plot_cci_lrpairs.Rd @@ -31,7 +31,7 @@ plot_cci_lrpairs( \item{border_color}{color of cell borders on heatmap, use NA if no border should be drawn.} -\item{type}{Set 'sig' to plot significant LR pairs or set 'number' to plot the number of spatial LR interactions.} +\item{type}{Set 'sig' to plot significant LRI pairs or set 'number' to plot the number of spatial LRI pairs.} \item{fontsize_number}{fontsize of the numbers displayed in cells.}