analyseReadsInsideRegionsForCondition {DMRcaller} | R Documentation

## Analyse reads inside regions for condition

### Description

This function extracts from the methylation data the total number of reads, the number of methylated reads and the number of cytosines in the specific context from a region (e.g. DMRs)

### Usage

    analyseReadsInsideRegionsForCondition(regions, methylationData, context,
      label = "", cores = 1)

### Arguments

`regions` | a `GRanges` object with a list of regions on the genome; e.g. could be a list of DMRs
`methylationData` | the methylation data in one condition (see `methylationDataList`).
`context` | the context in which to extract the reads (`"CG"`, `"CHG"` or `"CHH"`).
`label` | a string to be added to the columns to identify the condition
`cores` | the number of cores used to compute the DMRs.

### Value

a `GRanges` object with additional four metadata columns

sumReadsM

  the number of methylated reads

sumReadsN

  the total number of reads

proportion

  the proportion methylated reads

cytosinesCount

  the number of cytosines in the regions

### Author(s)

Nicolae Radu Zabet

### See Also

`filterDMRs`, `computeDMRs`, `DMRsNoiseFilterCG`, and `mergeDMRsIteratively`

### Examples

    # load the methylation data
    data(methylationDataList)

    #load the DMRs in CG context. These DMRs were computed with minGap = 200.
    data(DMRsNoiseFilterCG)

    #retrive the number of reads in CHH context in WT
    DMRsNoiseFilterCGreadsCHH <- analyseReadsInsideRegionsForCondition(
                                 DMRsNoiseFilterCG[1:10],
                                 methylationDataList[["WT"]], context = "CHH",
                                 label = "WT")

[Package DMRcaller version 1.24.0 Index]