Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
multitalk committed Jun 9, 2022
1 parent d47572e commit 34dc8ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"
Expand All @@ -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")
}
}

Expand Down
Binary file added img/plot_cci_lrpairs_num.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion man/plot_cci_lrpairs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 34dc8ba

Please sign in to comment.