getContinuousRegion: Get continuous chromosome region by merging nearby or...

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

View source: R/methyAnalysis.R

Description

Get continuous chromosome region by merging nearby or overlapping regions

Usage

1
getContinuousRegion(detectResult, scoreColumns = NULL, scoreFuns = c(mean=mean), maxGap = 2000, minGap = 100)

Arguments

detectResult

A GRanges object (with "status" column) or a data.frame with "CHROMOSOME", "POSITION" and "status" columns

scoreColumns

The numeric score columns to be summarized in DMR

scoreFuns

A named vector of summarizing functions. The vector names will be used in the output columns

maxGap

The maximum gap allowed between two nearby probes to be considered within a same DMR

minGap

If two nearby DMRs have a gap less than or equal to the minGap, they will be merged as a single DMR

Details

The "status" column in the "detectRsult" parameter is required, which is a logical vector indicating the interested probes.

Value

A GRanges object of DMR

Author(s)

Pan Du

See Also

identifySigDMR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
	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 simply using fdr.adjusted p.value cutoff 0.05 to define DMR
	## "status" column is required for getContinuousRegion function.
	values(allResult)$status <- values(allResult)$p.adjust < 0.05
	dmrInfo <- getContinuousRegion(allResult)
	

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