get_matrix: Extract methylation or coverage matrices

View source: R/methrix_operations.R

get_matrixR Documentation

Extract methylation or coverage matrices

Description

Extract methylation or coverage matrices

Usage

get_matrix(m, type = "M", add_loci = FALSE, in_granges = FALSE)

Arguments

m

methrix object

type

can be M or C. Default 'M'

add_loci

Default FALSE. If TRUE adds CpG position info to the matrix and returns as a data.table

in_granges

Do you want the outcome in GRanges?

Details

Takes methrix object and returns user specified methylation or coverage matrix

Value

Coverage or Methylation matrix

Examples

data('methrix_data')
#Get methylation matrix
get_matrix(m = methrix_data, type = 'M')
#Get methylation matrix along with loci
get_matrix(m = methrix_data, type = 'M', add_loci = TRUE)
#' #Get methylation data as a GRanges object
get_matrix(m = methrix_data, type = 'M', add_loci = TRUE, in_granges=TRUE)

CompEpigen/methrix documentation built on Sept. 23, 2023, 7:14 p.m.