getContinuousRegion {methyAnalysis} | R Documentation

## Get continuous chromosome region by merging nearby or overlapping regions

### Description

Get continuous chromosome region by merging nearby or overlapping regions

### Usage

    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

    	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)

[Package methyAnalysis version 1.26.0 Index]