methrix_pca: Principal Component Analysis

Description Usage Arguments Value Examples

View source: R/methrix_plot.R

Description

Principal Component Analysis

Usage

1
2
3
4
5
6
7
8
9
methrix_pca(
  m,
  var = "top",
  top_var = 1000,
  ranges = NULL,
  pheno = NULL,
  do_plot = TRUE,
  n_pc = 2
)

Arguments

m

Input methrix object

var

Choose between random CpG sites ('rand') or most variable CpGs ('top').

top_var

Number of variable CpGs to use. Default 1000 Set it to NULL to use all CpGs (which is not recommended due to memory requirements). This option is mutually exclusive with ranges.

ranges

genomic regions to be summarized. Could be a data.table with 3 columns (chr, start, end) or a GenomicRanges object

pheno

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

do_plot

Should a plot be generated?

n_pc

Default 2.

Value

PCA results

Examples

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

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