get_matrix {methrix} | R 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)

[Package methrix version 1.6.0 Index]