plot_pca: Plot PCA results

Description Usage Arguments Value Examples

View source: R/methrix_plot.R

Description

Plot PCA results

Usage

1
2
3
4
5
6
7
8
9
plot_pca(
  pca_res,
  m = NULL,
  col_anno = NULL,
  shape_anno = NULL,
  pc_x = "PC1",
  pc_y = "PC2",
  show_labels = FALSE
)

Arguments

pca_res

Results from methrix_pca

m

optinal methrix object. Default NULL

col_anno

Column name of colData(m). Default NULL. Will be used as a factor to color different groups. Required methrix object

shape_anno

Column name of colData(m). Default NULL. Will be used as a factor to shape different groups. Required methrix object

pc_x

Default 'PC1'

pc_y

Default 'PC2'

show_labels

Default FLASE

Value

ggplot2 object

Examples

1
2
3
data('methrix_data')
mpc = methrix_pca(methrix_data, do_plot = FALSE)
plot_pca(mpc)

methrix documentation built on Feb. 13, 2021, 2 a.m.