plotBatchVariance: Plot the percent of the variation that is explained by batch...

View source: R/plotBatchVariance.R

plotBatchVarianceR Documentation

Plot the percent of the variation that is explained by batch and condition in the data

Description

Visualize the percent variation in the data that is explained by batch and condition if it is given.

Usage

plotBatchVariance(inSCE, useAssay = "logcounts", batch, condition = NULL)

Arguments

inSCE

Input SCtkExperiment object. Required

useAssay

Indicate which assay to use for PCA. Default is "logcounts"

batch

The column in the annotation data that corresponds to batch. Required

condition

The column in the annotation data that corresponds to condition. Optional

Value

A boxplot of variation explained by batch, condition, and batch+condition (if applicable).

Examples

if(requireNamespace("bladderbatch", quietly = TRUE)) {
  library(bladderbatch)
  data(bladderdata)
  dat <- as(as(bladderEset, "SummarizedExperiment"), "SCtkExperiment")
  plotBatchVariance(dat, useAssay="exprs", batch="batch", condition = "cancer")
}


mmkhan19/singleCellTK documentation built on March 22, 2022, 7:43 a.m.