Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/methyAnalysis.R
Get continuous chromosome region by merging nearby or overlapping regions
1 | getContinuousRegion(detectResult, scoreColumns = NULL, scoreFuns = c(mean=mean), maxGap = 2000, minGap = 100)
|
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 |
The "status" column in the "detectRsult" parameter is required, which is a logical vector indicating the interested probes.
A GRanges object of DMR
Pan Du
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.