R/plotBatchVariance.R
plotBatchVariance.Rd
Visualize the percent variation in the data that is explained by batch and condition if it is given.
plotBatchVariance(inSCE, useAssay = "logcounts", batch, condition = NULL)
Input SCtkExperiment object. Required
Indicate which assay to use for PCA. Default is "logcounts"
The column in the annotation data that corresponds to batch. Required
The column in the annotation data that corresponds to condition. Optional
A boxplot of variation explained by batch, condition, and batch+condition (if applicable).
if(requireNamespace("bladderbatch", quietly = TRUE)) {
library(bladderbatch)
data(bladderdata)
dat <- as(as(bladderEset, "SummarizedExperiment"), "SCtkExperiment")
plotBatchVariance(dat, useAssay="exprs", batch="batch", condition = "cancer")
}
#> Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please use `guide = "none"` instead.