Learn R Programming

DMRcate (version 1.8.6)

extractRanges: Create GRanges object from dmrcate output.

Description

Takes a dmrcate.output object and produces the corresponding GRanges object.

Usage

extractRanges(dmrcoutput, genome = c("hg19", "hg38", "mm10"))

Arguments

dmrcoutput
An object of class dmrcate.output.
genome
Reference genome for annotating DMRs with promoter overlaps. Can be one of "hg19", "hg38" or "mm10"

Value

A GRanges object.

Examples

Run this code
## Not run: 
# data(dmrcatedata)
# myMs <- logit2(myBetas)
# myMs.noSNPs <- rmSNPandCH(myMs, dist=2, mafcut=0.05)
# patient <- factor(sub("-.*", "", colnames(myMs)))
# type <- factor(sub(".*-", "", colnames(myMs)))
# design <- model.matrix(~patient + type) 
# myannotation <- cpg.annotate("array", myMs.noSNPs, analysis.type="differential",
#     design=design, coef=39)
# dmrcoutput <- dmrcate(myannotation, lambda=1000, C=2)
# results.ranges <- extractRanges(dmrcoutput, genome = "hg19")
# ## End(Not run)

Run the code above in your browser using DataLab