Skip to contents

Plots a scatter plot of the indicated dimensional reduction results.

Usage

reducedDimPlot(
  TapestriExperiment,
  alt.exp = "alleleFrequency",
  dim.reduction,
  dim.x = 1,
  dim.y = 2,
  group.label = NULL
)

Arguments

TapestriExperiment

TapestriExperiment object

alt.exp

Character, altExp to use, NULL uses top-level/main experiment. Default "alleleFrequency".

dim.reduction

Character, dimension reduction to plot, either "PCA" or "UMAP".

dim.x

Numeric, index of dimensional reduction data to plot on X axis. Default 1.

dim.y

Numeric, index of dimensional reduction data to plot on Y axis. Default 2.

group.label

Character, colData column for grouping samples by color. Default NULL.

Value

ggplot2 object, scatter plot

Examples

tap.object <- newTapestriExperimentExample() # example TapestriExperiment object
#>  Moving gRNA probe  to `altExp` slot "grnaCounts".
#>  Moving barcode probe  to `altExp` slot "barcodeCounts".
#>  Moving chrY probe(s) probe_231, probe_232, probe_233, probe_234, probe_235, probe_236, probe_237, probe_238, probe_239, and probe_240 to `altExp` slot "chrYCounts".
tap.object <- runPCA(tap.object, alt.exp = "alleleFrequency")
reducedDimPlot(tap.object, dim.reduction = "pca")