Closed ycl6 closed 2 years ago
I don't really want to automagically remove features so will probably just add an informative error message, something like this:
library("scater")
counts <- matrix(rpois(100, 5), ncol = 10)
counts[1:5, ] <- 0
sce <- SingleCellExperiment(assays = list(counts = counts))
sce <- logNormCounts(sce)
plotDots(sce, features=1:10, scale = TRUE)
#> Error in .heatmap_scale(ave, center = center, scale = scale, color = color, : Cannot include non-expressed genes when scale=TRUE.
Hi @Alanocallaghan That's a good idea, users will know they have to make the necessary changes to their inputs.
I count this as fixed now, feel free to reopen if not though
When using
scale = TRUE
inplotDots()
, including genes that are not expressed in any of the cells will cause an error in.heatmap_scale()
.Maybe adding additional checks in
plotDots()
to remove such genes ifscale = TRUE
?