annotateDMRInfo: Annotate the DMR (Differentially Methylated Region)

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/methyAnalysis.R

Description

Annotate the DMR (Differentially Methylated Region) information

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
	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')
	}

methyAnalysis documentation built on Nov. 8, 2020, 8:09 p.m.