Description Usage Arguments Details Value Examples
View source: R/plotBatchVariance.R
Visualize the percent variation in the data that is explained by batch and condition, individually, and that explained by combining both annotations. Plotting only the variation explained by batch is supported but not recommended, because this can be confounded by potential condition.
1 2 3 4 5 6 7 8 9 |
inSCE |
SingleCellExperiment inherited object. |
useAssay |
A single character. The name of the assay that stores the
value to plot. For |
useReddim |
A single character. The name of the dimension reduced
matrix that stores the value to plot. Default |
useAltExp |
A single character. The name of the alternative experiment
that stores an assay of the value to plot. Default |
batch |
A single character. The name of batch annotation column in
|
condition |
A single character. The name of an additional condition
annotation column in |
title |
A single character. The title text on the top. Default
|
When condition and batch both are causing some variation, if the difference between full variation and condition variation is close to batch variation, this might imply that batches are causing some effect; if the difference is much less than batch variation, then the batches are likely to be confounded by the conditions.
A ggplot object of a boxplot of variation explained by batch, condition, and batch+condition.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
if(requireNamespace("bladderbatch", quietly = TRUE)) {
library(bladderbatch)
data(bladderdata)
dat <- as(as(bladderEset, "SummarizedExperiment"),
"SingleCellExperiment")
plotBatchVariance(dat,
useAssay="exprs",
batch="batch",
condition = "cancer")
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.