Learn R Programming

karyotapR (version 1.0.1)

reducedDimPlot: Scatter plot for dimensional reduction results

Description

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
)

Value

ggplot2 object, scatter plot

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.

Examples

Run this code
tap.object <- newTapestriExperimentExample() # example TapestriExperiment object
tap.object <- runPCA(tap.object, alt.exp = "alleleFrequency")
reducedDimPlot(tap.object, dim.reduction = "pca")

Run the code above in your browser using DataLab