MethCP-class {MethCP} | R Documentation

## Class `MethCP`

### Description

A class for performing DMR (differentially methylated region) detection analysis using method `MethCP` on whole genome bisulfite sequencing data.

The constructor function for `MethCP` objects.

### Usage

    MethCP(
      test = NA_character_,
      group1 = NA,
      group2 = NA,
      chr,
      pos,
      pvals,
      effect.size
    )

    MethCP(
        test = NA_character_, group1 = NA, group2 = NA, chr, pos,
        pvals, effect.size)

### Arguments

`test` | a character string of the name of the per-cytosine statistcis.
`group1` | a character vector containing the sample names of the treatment group.
`group2` | a character vector containing the sample names of the control group.
`chr` | a character vector containing the cytosine chromosome infomation.
`pos` | a numeric vector containing the cytosine positions.
`pvals` | a numeric vector containing the `p`-values for each cytosine.
`effect.size` | a numeric vector containing the effect sizes for each cytosine.

### Details

If not specified by function `calcLociStatTimeCourse`, `calcLociStat`, the parameter `test` can be set to any user-specified string indicating the name of the test performed.

In the cases where the goal is not to compare between treatment and control groups, parameter `group1` and `group2` can be set to `NA`.

If generated by `calcLociStat`, parameter `stat` will be a `GRangesList` object where each element in the list contains statistics for each of the chromosome in the dataset.

### Value

A `MethCP` objects.

### Slots

`test`

  a character string of the name of the per-cytosine statistcis.

`group1`

  a character vector containing the sample names of the treatment group.

`group2`

  a character vector containing the sample names of the control group.

`stat`

  a `GRangesList` object containing the results of per-cytosine tests.

`segmentation`

  a `GRanges` object containing the segments and their infomation such as region-based statistics, coverages, etc.

### Examples

    obj <- MethCP(
        test = "myTest",
        group1 = paste0("Treatment", 1:3),
        group2 = paste0("Control", 1:3),
        chr = rep("Chr01", 5),
        pvals = c(0, 0.1, 0.9, NA, 0.02),
        pos = c(2, 5, 9, 10, 18),
        effect.size = c(1, -1, NA, 9, Inf))
    # MethCP will omit the NAs and infinite values.
    obj

[Package MethCP version 1.8.0 Index]