subset_methrix: Subsets 'methrix' object based on given conditions.

Description Usage Arguments Details Value Examples

View source: R/methrix_operations.R

Description

Subsets methrix object based on given conditions.

Usage

1
2
3
4
5
6
7
subset_methrix(
  m,
  regions = NULL,
  contigs = NULL,
  samples = NULL,
  overlap_type = "within"
)

Arguments

m

methrix object

regions

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

contigs

chromosome names to subset by

samples

sample names to subset by

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.

Details

Takes methrix object and filters CpGs based on coverage statistics

Value

An object of class methrix

Examples

1
2
3
data('methrix_data')
#Subset to chromosome 1
subset_methrix(methrix_data, contigs = 'chr21')

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