Skip to content

Commit

Permalink
nf sizes.highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
vertesy committed Nov 25, 2024
1 parent d81bde2 commit 80fd6d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/Seurat.Utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -2446,7 +2446,7 @@ removeResidualSmallClusters <- function(
is.numeric(max.cells), max.cells > 0,
is.logical(plot.removed)
)

message("First, consider using RelabelSmallCategories() instead, to relabel small clusters.")

META <- obj@meta.data
all.cells <- rownames(META)
Expand Down
8 changes: 7 additions & 1 deletion R/Seurat.Utils.Visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -2215,6 +2215,8 @@ qUMAP <- function(
#' @param palette Color palette for generating cluster colors; Default: 'glasbey'.
#' @param highlight.clusters Specific clusters to be highlighted; optional; Default: NULL.
#' @param cells.highlight Specific cells to be highlighted; optional; Default: NULL.
#' @param cols.highlight Color for highlighted cells; Default: 'red'.
#' @param sizes.highlight Size of highlighted cells; Default: 1.
#' @param label Show cluster labels; Default: `TRUE`.
#' @param repel Repel labels to avoid overlap; Default: `TRUE`.
#' @param legend Show legend; Default: opposite of `label`.
Expand Down Expand Up @@ -2637,6 +2639,7 @@ multiFeaturePlot.A4 <- function(
#' @param nr.Col Number of columns in the plot grid. Default: 2.
#' @param nr.Row Number of rows in the plot grid. Default: 4.
#' @param cex Size of the text in the plot, calculated based on the number of rows and columns. Default: Calculated value.
#' @param sizes.highlight Size of highlighted cells; Default: 1.
#' @param subdir Logical flag indicating whether to create a subdirectory for the plots. Default: `TRUE`.
#' @param prefix Optional prefix for the plot file names. Default: `NULL`.
#' @param suffix Optional suffix for the plot file names. Default: `NULL`.
Expand Down Expand Up @@ -2669,6 +2672,7 @@ multiSingleClusterHighlightPlots.A4 <- function(
colors = c("grey", "red"),
nr.Col = 2, nr.Row = 4,
cex = round(0.1 / (nr.Col * nr.Row), digits = 2),
sizes.highlight = 1,
subdir = TRUE,
prefix = NULL, suffix = NULL,
background_col = "white",
Expand Down Expand Up @@ -2728,7 +2732,9 @@ multiSingleClusterHighlightPlots.A4 <- function(
plot.list[[j]] <- clUMAP(
ident = ident, obj = obj,
highlight.clusters = cl, label = FALSE, legend = FALSE, save.plot = FALSE,
plotname = plotname, cols = colors, h = h, w = w, ...
plotname = plotname, cols = colors,
sizes.highlight = sizes.highlight,
h = h, w = w, ...
)
} # for j

Expand Down

0 comments on commit 80fd6d6

Please sign in to comment.