methrix_pca {methrix} | R Documentation

## Principal Component Analysis

### Description

Principal Component Analysis

### Usage

    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

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

[Package methrix version 1.6.0 Index]