get_mean_methylation_in_genomic_features: Calculate mean methylation value in a list of regions

Description Usage Arguments Value Examples

Description

Calculate mean methylation value in a list of regions

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 pick CpG sites

chromosome

a vector of chromosomes

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.

Examples

1
2
# There is no example
NULL

jokergoo/cotools documentation built on May 19, 2019, 6:24 p.m.