annotateDMRInfo {methyAnalysis} | R Documentation

## Annotate the DMR (Differentially Methylated Region)

### Description

Annotate the DMR (Differentially Methylated Region) information

### Usage

    annotateDMRInfo(DMRInfo, annotationDatabase, CpGInfo = NULL, flankRange = 500, promoterRange = 2000, EntrezDB = "org.Hs.eg.db", as.GRanges = TRUE)

### Arguments

`DMRInfo` | A GRanges object or a list of GRanges objects (sigDMRInfo and sigDataInfo), which is the return of `identifySigDMR`
`annotationDatabase` | Annotation database: a TxDb package, TxDb object or GRanges object.
`CpGInfo` | A Bed file or GRanges object, which keeps the CpG-island information
`flankRange` | The flank range to be added to the input GRanges object
`promoterRange` | Define the size of promoter range at the upstream of TSS. User can also directly provide the GRanges object
`EntrezDB` | The Entrez database for mapping from Entrez ID to gene symbols
`as.GRanges` | Whether return a GRanges object or a data.frame

### Details

This function is to annotate the DMRs to the gene promoters or bodies. The annotation information is attached as additional columns of the GRanges object values.

### Value

Return a GRanges object or list of GRanges when the as.GRanges is TRUE. Or else it returns a data.frame or a list of data.frame objects (sigDMRInfo and sigDataInfo). The annotation information is attached as additional columns of the GRanges object values or the data.frame.

### Author(s)

Pan Du

### See Also

See Also `annotateGRanges`

### Examples

    	data(exampleMethyGenoSet)
    	## get sample type information
    	sampleType <- colData(exampleMethyGenoSet)$SampleType

    	## Do differential test
    	allResult <- detectDMR.slideWin(exampleMethyGenoSet, sampleType=sampleType, testMethod='ttest')

    	## Identify the DMR (Differentially Methylated Region) by setting proper parameters.
    	## Here we just use default ones
    	allDMRInfo <- identifySigDMR(allResult)

    	## Annotate significant DMR info
    	if (require(TxDb.Hsapiens.UCSC.hg19.knownGene)) {
    		DMRInfo.ann <- annotateDMRInfo(allDMRInfo, 'TxDb.Hsapiens.UCSC.hg19.knownGene')
    	}

[Package methyAnalysis version 1.30.0 Index]