plot_pca: Make a PCA plot describing the samples' clustering.

View source: R/dimension_reduction.R

plot_pcaR Documentation

Make a PCA plot describing the samples' clustering.

Description

Make a PCA plot describing the samples' clustering.

Usage

plot_pca(
  data,
  design = NULL,
  plot_colors = NULL,
  plot_title = TRUE,
  plot_size = 5,
  plot_alpha = NULL,
  plot_labels = FALSE,
  size_column = NULL,
  pc_method = "fast_svd",
  x_pc = 1,
  y_pc = 2,
  max_overlaps = 20,
  num_pc = NULL,
  expt_names = NULL,
  label_chars = 10,
  cond_column = "condition",
  batch_column = "batch",
  ...
)

Arguments

data

an expt set of samples.

design

a design matrix and.

plot_colors

a color scheme.

plot_title

a title for the plot.

plot_size

size for the glyphs on the plot.

plot_alpha

Add an alpha channel to the dots?

plot_labels

add labels? Also, what type? FALSE, "default", or "fancy".

size_column

use an experimental factor to size the glyphs of the plot

pc_method

how to extract the components? (svd

x_pc

Component to put on the x axis.

y_pc

Component to put on the y axis.

max_overlaps

Passed to ggrepel.

num_pc

How many components to calculate, default to the number of rows in the metadata.

expt_names

Column or character list of preferred sample names.

label_chars

Maximum number of characters before abbreviating sample names.

cond_column

Column containing the color information.

batch_column

Column containing the shape information.

...

Arguments passed through to the pca implementations and plotter.

Value

a list containing the following (this is currently wrong)

  1. pca = the result of fast.svd()

  2. plot = ggplot2 pca_plot describing the principle component analysis of the samples.

  3. table = a table of the PCA plot data

  4. res = a table of the PCA res data

  5. variance = a table of the PCA plot variance

See Also

[corpcor] [Rtsne] [uwot] [fastICA] [pcaMethods] [plot_pcs()]

Examples

## Not run: 
 pca_plot <- plot_pca(expt = expt)
 pca_plot

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.