get_mean_methylation_in_genomic_features: Calculate mean methylation value in a list of genomic...

Description Usage Arguments Value Examples

Description

Calculate mean methylation value in a list of genomic features

Usage

1
2
3
get_mean_methylation_in_genomic_features(sample_id, gf_list, average = TRUE, p = 0.001,
    chromosome = paste0("chr", 1:22),
    filter_fun = function(s) length(s) >= 10 && any(diff(s) < 50))

Arguments

sample_id

a vector of sample IDs

gf_list

a list of genomic features in GRanges class

average

whether to calcualte average methylation in a interval? if not, the function will randomly sample CpG sites from the input regions.

p

if average is FALSE, the probability to randomly pick CpG sites

chromosome

a vector of chromosome names

filter_fun

filtering function on CpG sites in each intersection (e.g. exclude regions which contains too few CpGs). The object sent to this function is a vector of positions for CpGs that locate in the current region.

Value

A list of GRanges objects in which mean methylation matrix are attached. The variable can be sent to heatmap_diff_methylation_in_genomic_features to visualize.

= author Zuguang Gu <z.gu@dkfz.de>

Examples

1
2
# There is no example
NULL

eilslabs/epic documentation built on May 16, 2019, 1:24 a.m.