plot_pca {methrix}R Documentation

Plot PCA results

Description

Plot PCA results

Usage

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

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

[Package methrix version 1.1.0 Index]