getRegionScores: Calculated methylation significance in a set of regions.

View source: R/getRegionScores.R

getRegionScoresR Documentation

Calculated methylation significance in a set of regions.

Description

Returns p-values and Z-scores for CpGs in a set of regions, compared to a local null background distribution.

Usage

getRegionScores(ranks, regions,  chromDictObj)

Arguments

ranks

getPCRanks output data.frame, only necessary if chromDictObj=NULL

regions

A three-column dataframe containing a set of regions to test. Columns = chrom, start, end.

chromDictObj

chromDict() output object, recommended input instead of ranks.

Value

Returns a data.frame with significance scores for all input regions.

Examples

ranks <- getPCRanks(eigen, IDs = c("trt", "ctl"), PC = 1)
DMLs <- addRanks(ranks)

# data.frame of regions to test:
regions <- data.frame(chr=c("chr3", "chr3", "chr1"),
                      s=c(4920450, 3961576, 300000),
                      e=c(4923267, 3963805, 302900),
                      ID=c("Hypo-DMR", "partial Hyper-DMR", "random"))
                
getRegionScores(DMLs, regions)

PCBS documentation built on Sept. 11, 2024, 6:11 p.m.

Related to getRegionScores in PCBS...