get_matrix: Extract methylation or coverage matrices

Description Usage Arguments Details Value Examples

View source: R/methrix_operations.R

Description

Extract methylation or coverage matrices

Usage

1
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

1
2
3
4
5
6
7
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)

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