plotPCA: Plot PCA run data from its components.

View source: R/plotPCA.R

plotPCAR Documentation

Plot PCA run data from its components.

Description

Plot PCA run data from its components.

Usage

plotPCA(
  inSCE,
  colorBy = NULL,
  shape = NULL,
  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

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

compbiomed/singleCellTK documentation built on Oct. 27, 2024, 3:26 a.m.