changeFDR: Change the individual CpG FDR thresholding for a CpGannotated...

changeFDRR Documentation

Change the individual CpG FDR thresholding for a CpGannotated object.

Description

Takes a CpGannotated-class object and a specified FDR > 0 and < 1, and re-indexes the object in order to call DMRs at the specified rate.

Usage

changeFDR(annot, FDR)

Arguments

annot

A CpGannotated-class object, created by cpg.annotate or sequencing.annotate.

FDR

The desired individual CpG FDR, which will index the rate at which DMRs are called.

Details

The number of CpG sites called as significant by this function will set the post-smoothing threshold for DMR constituents in dmrcate.

Value

A re-indexed CpGannotated-class object.

Author(s)

Tim Peters <t.peters@garvan.org.au>

Examples

library(GenomicRanges)
stats <- rt(1000, 2)
fdrs <- p.adjust(2*pt(-abs(stats), 100), "BH")
annotated <- GRanges(rep("chr1", 1000), IRanges(1:1000, 1:1000), stat = stats,
                     diff = 0, ind.fdr = fdrs, is.sig = fdrs < 0.05)
names(annotated) <- paste0("CpG_", 1:1000)
myannotation <- new("CpGannotated", ranges=annotated)
changeFDR(myannotation, 0.1)

timpeters82/DMRcate-devel documentation built on April 26, 2024, 9:23 a.m.