Skip to content

Commit

Permalink
Add one-time warning about new split vln
Browse files Browse the repository at this point in the history
  • Loading branch information
timoast committed Apr 7, 2020
1 parent e3ccfa4 commit b09122f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions R/visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,20 @@ VlnPlot <- function(
split.plot = FALSE,
combine = TRUE
) {
if (
!is.null(x = split.by) &
getOption(x = 'Seurat.warn.vlnplot.split', default = TRUE)
) {
warning(
"The default behaviour of split.by has changed.\n",
"Separate violin plots are now plotted side-by-side.\n",
"To restore the old behaviour of a single split violin,\n",
"set split.plot = TRUE",
call. = FALSE,
immediate. = TRUE
)
options(Seurat.warn.vlnplot.split = FALSE)
}
return(ExIPlot(
object = object,
type = ifelse(test = split.plot, yes = 'splitViolin', no = 'violin'),
Expand Down
1 change: 1 addition & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ NULL
seurat_default_options <- list(
Seurat.memsafe = FALSE,
Seurat.warn.umap.uwot = TRUE,
Seurat.warn.vlnplot.split = TRUE,
Seurat.checkdots = "warn",
Seurat.limma.wilcox.msg = TRUE
)
Expand Down

0 comments on commit b09122f

Please sign in to comment.