plotPCA: Plot PCA run data from its components.

Description Usage Arguments Value Examples

View source: R/plotPCA.R

Description

Plot PCA run data from its components.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plotPCA(
  inSCE,
  colorBy = "No Color",
  shape = "No Shape",
  pcX = "PC1",
  pcY = "PC2",
  reducedDimName = "PCA",
  runPCA = FALSE,
  useAssay = "logcounts"
)

Arguments

inSCE

Input SingleCellExperiment object.

colorBy

The variable to color clusters by

shape

Shape of the points

pcX

User choice for the first principal component

pcY

User choice for the second principal component

reducedDimName

a name to store the results of the dimension reduction coordinates obtained from this method. This is stored in the SingleCellExperiment object in the reducedDims slot. Required.

runPCA

Run PCA if the reducedDimName does not exist. the Default is FALSE.

useAssay

Indicate which assay to use. The default is "logcounts".

Value

A PCA plot

Examples

1
2
3
data("mouseBrainSubsetSCE")
plotPCA(mouseBrainSubsetSCE, colorBy = "level1class",
        reducedDimName = "PCA_counts")

singleCellTK documentation built on Nov. 8, 2020, 5:21 p.m.