get_region_summary {methrix} | R Documentation

## Extract and summarize methylation or coverage info by regions of interest

### Description

Extract and summarize methylation or coverage info by regions of interest

### Usage

    get_region_summary(
      m,
      regions = NULL,
      type = "M",
      how = "mean",
      overlap_type = "within",
      na_rm = TRUE,
      verbose = TRUE
    )

### Arguments

`m` | `methrix` object
`regions` | genomic regions to be summarized. Could be a data.table with 3 columns (chr, start, end) or a `GenomicRanges` object
`type` | matrix which needs to be summarized. Coule be ‘M', 'C'. Default ’M'
`how` | mathematical function by which regions should be summarized. Can be one of the following: mean, sum, max, min. Default 'mean'
`overlap_type` | defines the type of the overlap of the CpG sites with the target region. Default value is 'within'. For detailed description, see the `foverlaps` function of the `data.table` package.
`na_rm` | Remove NA's? Default `TRUE`
`verbose` | Default TRUE

### Details

Takes `methrix` object and summarizes regions

### Value

a coverage or methylation matrix

### Examples

    data('methrix_data')
    get_region_summary(m = methrix_data,
    regions = data.table(chr = 'chr21', start = 27867971, end =  27868103),
    type = 'M', how = 'mean')

[Package methrix version 1.0.05 Index]