dmrff.annotate: dmrff.annotate

View source: R/annotate.r

dmrff.annotateR Documentation

dmrff.annotate

Description

Annotate a set of regions with feature annotations.

Usage

dmrff.annotate(regions, annotation)

Arguments

regions

Data frame listing the regions to annotate. Must have columns "chr", "start" and "end" to specify genomic regions.

annotation

Data frame listing the features that will be used to annotate the genomic regions. Must have columns "chr" and "pos" to identify genomic locations.

Details

For example, the regions could be differentially methylated regions and the features could be CpG sites.

Value

A data frame list all features contained in the regions along with the regions they belong to.

Examples


methylation <- ... ## methylation matrix
ewas <- data.frame(chr=..., ## chromosome of each CpG site
                   pos=..., ## chromosomal position of each CpG site
                   symbol=..., ## symbol of gene linked to each CpG site
                   ..., ## other CpG site annotations
                   estimate=..., ## EWAS effect estimate
                   se=...,       ## EWAS standard error of the estimate 
                   p.value=...)  ## EWAS p-value
                
dmrs <- with(ewas, dmrff(estimate, se, p.value, methylation, chr, pos))
dmrs <- dmrs[which(dmrs$p.adjust < 0.05),]
dmrs <- dmrff.annotate(dmrs, annotation)


perishky/dmrff documentation built on Jan. 4, 2024, 10:23 p.m.