reduce_cpgs: Reduces a assay to a representative matrix

Description Usage Arguments Details Value Examples

View source: R/scMethrix_dimensionality.R

Description

Reduces a assay to a representative matrix

Usage

1
2
3
4
5
6
7
8
reduce_cpgs(
  scm,
  assay = "score",
  var = c("top", "rand"),
  top_var = 1000,
  na.rm = FALSE,
  verbose = FALSE
)

Arguments

scm

scMethrix; Input scMethrix object

assay

string; The assay to use. Default is 'score'

var

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

top_var

integer; Number of variable CpGs to use. Default 1000 Set it to NULL to use all CpGs (which is not recommended due to memory requirements).

na.rm

boolean; flag to remove NA values

verbose

boolean; flag to output messages or not

Details

For the purposes of dimensionality reduction, this function selects either random CpGs or those with the highest variability.

Value

matrix; the reduced form of the input assay

Examples

1
2
data('scMethrix_data')
reduce_cpgs(scMethrix_data)

CompEpigen/scMethrix documentation built on Nov. 6, 2021, 3:09 p.m.