BatchCCEDA: Exploratory data analysis plots

Description Usage Arguments Details Value Author(s) Examples

View source: R/eda.R

Description

BatchCCEDA creates a number of plots to determine the number of PCs to use for PCA/clustering and whether or not cell cycle scores and batch effects should be addressed. Runs and plots an ElbowPlot to determine PCs for later use. Runs and plots PCA for cell cycle genes to show their impact.

Usage

1
2
BatchCCEDA(scrna, outdir = ".", npcs = 50, vars = NULL,
  skip.sct = NULL)

Arguments

scrna

Seurat object.

outdir

Path to output directory for plots.

npcs

Number of PCs to use for PCA and ElbowPlot.

vars

Character vector indicating meta.data columns to be investigated for batch effects and variance contributions.

skip.sct

Boolean indicating whether to skip SCTransform call. Useful for integrated objects.

Details

Supplying vars will plot a PCA from the variable genes for each variable. It will also calculate and create a density plot of the variance explained by each variable across all genes using plotExplanatoryVariables.

Value

A Seurat object with a PCA for cell cycle genes stored with reduction.name = "cc".

Author(s)

Jared Andrews

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(Seurat)
## Not run: 
pbmc_small <- RunQC(pbmc_small)
pbmc_small <- NormScoreCC(pbmc_small)

# Skip SCT normalization - should only be done if object has been integrated.
pbmc_small <- BatchCCEDA(pbmc_small, skip.sct = TRUE)

# Can explore other variables as well.
pbmc_small <- BatchCCEDA(pbmc_small, skip.sct = TRUE, vars = "group")

## End(Not run)

j-andrews7/EZscRNA documentation built on Feb. 24, 2020, 10:37 a.m.