plotDimensionalReduction: Plot Dimensional Reduction

Description Usage Arguments Value Note Author(s) See Also Examples

Description

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
plotTSNE(object, ...)

plotUMAP(object, ...)

## S4 method for signature 'SingleCellExperiment'
plotTSNE(object, interestingGroups = "ident",
  color = NULL, pointsAsNumbers = FALSE,
  pointSize = getOption("pointSize", 0.75),
  pointAlpha = getOption("pointAlpha", 0.75), label = TRUE,
  labelSize = getOption("labelSize", 6L), dark = FALSE, grid = FALSE,
  legend = TRUE, aspectRatio = 1L, title = NULL)

## S4 method for signature 'seurat'
plotTSNE(object, interestingGroups = "ident",
  color = NULL, pointsAsNumbers = FALSE,
  pointSize = getOption("pointSize", 0.75),
  pointAlpha = getOption("pointAlpha", 0.75), label = TRUE,
  labelSize = getOption("labelSize", 6L), dark = FALSE, grid = FALSE,
  legend = TRUE, aspectRatio = 1L, title = NULL)

## S4 method for signature 'SingleCellExperiment'
plotUMAP(object, interestingGroups = "ident",
  color = NULL, pointsAsNumbers = FALSE,
  pointSize = getOption("pointSize", 0.75),
  pointAlpha = getOption("pointAlpha", 0.75), label = TRUE,
  labelSize = getOption("labelSize", 6L), dark = FALSE, grid = FALSE,
  legend = TRUE, aspectRatio = 1L, title = NULL)

## S4 method for signature 'seurat'
plotUMAP(object, interestingGroups = "ident",
  color = NULL, pointsAsNumbers = FALSE,
  pointSize = getOption("pointSize", 0.75),
  pointAlpha = getOption("pointAlpha", 0.75), label = TRUE,
  labelSize = getOption("labelSize", 6L), dark = FALSE, grid = FALSE,
  legend = TRUE, aspectRatio = 1L, title = NULL)

## S4 method for signature 'SingleCellExperiment'
plotPCA(object, interestingGroups = "ident",
  color = NULL, pointsAsNumbers = FALSE,
  pointSize = getOption("pointSize", 0.75),
  pointAlpha = getOption("pointAlpha", 0.75), label = TRUE,
  labelSize = getOption("labelSize", 6L), dark = FALSE, grid = FALSE,
  legend = TRUE, aspectRatio = 1L, title = NULL)

## S4 method for signature 'seurat'
plotPCA(object, interestingGroups = "ident",
  color = NULL, pointsAsNumbers = FALSE,
  pointSize = getOption("pointSize", 0.75),
  pointAlpha = getOption("pointAlpha", 0.75), label = TRUE,
  labelSize = getOption("labelSize", 6L), dark = FALSE, grid = FALSE,
  legend = TRUE, aspectRatio = 1L, title = NULL)

Arguments

object

Object.

...

Additional arguments.

interestingGroups

Character vector of interesting groups. Must be formatted in camel case and intersect with sampleData() colnames.

color

Desired ggplot color scale. Must supply discrete values. When set to NULL, the default ggplot2 color palette will be used. If manual color definitions are desired, we recommend using ggplot2::scale_color_manual().

pointsAsNumbers

Plot the points as numbers (TRUE) or dots (FALSE).

pointSize

Cell point size.

pointAlpha

Alpha transparency level. Useful when there many cells in the dataset, and some cells can be masked.

label

Overlay a cluster identitiy label on the plot.

labelSize

Size of the text label.

dark

Plot against a dark background using basejump::theme_midnight().

grid

Show major grid lines but hide axis lines.

legend

Include plot legend.

aspectRatio

Aspect ratio.

title

Plot title.

Value

ggplot.

Note

plotUMAP() requires the Python dependency umap-learn. We recommend installing this with conda: conda install -c conda-forge umap-learn.

Author(s)

Michael Steinbaugh, Rory Kirchner

See Also

Other Clustering Functions: cellTypesPerCluster, knownMarkersDetected, plotCellTypesPerCluster, plotFeatureTSNE, plotKnownMarkersDetected, plotPCElbow, sanitizeMarkers, topMarkers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# seurat ====
object <- seurat_small

# t-SNE
plotTSNE(object)
plotTSNE(object, pointsAsNumbers = TRUE)
plotTSNE(object, dark = TRUE)

# UMAP
plotUMAP(object)

# PCA
plotPCA(object)

roryk/bcbioSinglecell documentation built on May 27, 2019, 10:44 p.m.