correlated_regions_by_window: Correlated regions in a specified region

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/correlated_regions.R

Description

Correlated regions in a specified region

Usage

1
2
correlated_regions_by_window(site, meth, expr, chr, cov = NULL, cov_cutoff = 3, min_dp = 4,
    cor_method = "spearman", window_size = 5, window_step = window_size, subgroup = NULL, max_width = 10000)

Arguments

site

position of CpG sites in this region, should be sorted

meth

methylation matrix corresponding to site

expr

expression for the associated gene

chr

chromosome name, used to construct the GRanges object

cov

CpG coverage matrix. CpG coverage is important when meth is the raw methylation which means CpG sites with extremely low coverage will be removed when calculating correlations

cov_cutoff

cutoff for CpG coverage when using raw methylation rate, used for raw methylation. Note when the CpG coverage is too low, the raw methylation rate is not reliable. Raw methylation rate for those CpGs with coverage less this this cutoff is set to NA will be further filtered by min_gp.

min_dp

minimal number of non-NA values for calculating correlations. When meth is the raw methylation, values for which CpG coverage is too low will be replaced with NA, We only use non-NA values to calculate correlations. If the number of data points for calculating correlation is less than min_dp, the CpG window is just excluded.

cor_method

method for calcualting correlations, pass to cor.

window_size

how many CpG sites in a window

window_step

step of the sliding window, measured in number of CpG sites

subgroup

subgroup information. If provided, ANOVA test and group mean are applied on each correlated region.

max_width

maximum width of a window

Details

cov and cov_cutoff should be set when the methylation is unsmoothed, because for the unsmoothed data, the methylation rate is not reliable when the CpG coverage is low.

Value

a GRanges object

Author(s)

Zuguang Gu <z.gu@dkfz.de>

See Also

correlated_regions

Examples

1
2
# There is no example
NULL

jokergoo/epik documentation built on Sept. 28, 2019, 9:20 a.m.