region_filter: Filter matrices by region

View source: R/methrix_operations.R

region_filterR Documentation

Filter matrices by region

Description

Filter matrices by region

Usage

region_filter(m, regions, type = "within")

Arguments

m

methrix object

regions

genomic regions to filter-out. Could be a data.table with 3 columns (chr, start, end) or a GenomicRanges object

type

defines the type of the overlap of the CpG sites with the target regions. Default value is 'within'. For detailed description, see the foverlaps function of the data.table package.

Details

Takes methrix object and filters CpGs based on supplied regions in data.table or GRanges format

Value

An object of class methrix

Examples

data('methrix_data')
region_filter(m = methrix_data,
regions = data.table(chr = 'chr21', start = 27867971, end =  27868103))

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