diffmean {TCGAbiolinks} | R Documentation

## Calculate diffmean methylation between two groups

### Description

Calculate diffmean methylation of probes between two groups removing lines that has NA values.

### Usage

    diffmean(data, groupCol = NULL, group1 = NULL, group2 = NULL,
      save = FALSE)

### Arguments

`data` | SummarizedExperiment object obtained from TCGAPrepare
`groupCol` | Columns in colData(data) that defines the groups.
`group1` | Name of group1 to be used in the analysis
`group2` | Name of group2 to be used in the analysis
`save` | Save histogram of diffmean

### Value

Saves in the rowRages(data) the columns: mean.group1, mean.group2 diffmean.group1.group2; Where group1 and group2 are the names of the groups.

### Examples

    nrows <- 200; ncols <- 20
    counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
    rowRanges <- GenomicRanges::GRanges(rep(c("chr1", "chr2"), c(50, 150)),
                       IRanges::IRanges(floor(runif(200, 1e5, 1e6)), width=100),
                        strand=sample(c("+", "-"), 200, TRUE),
                        feature_id=sprintf("ID%03d", 1:200))
    colData <- S4Vectors::DataFrame(Treatment=rep(c("ChIP", "Input"), 10),
                        row.names=LETTERS[1:20],
                        group=rep(c("group1","group2"),c(10,10)))
    data <- SummarizedExperiment::SummarizedExperiment(
             assays=S4Vectors::SimpleList(counts=counts),
             rowRanges=rowRanges,
             colData=colData)
     diff.mean <- TCGAbiolinks:::diffmean(data,groupCol = "group")

[Package TCGAbiolinks version 2.14.0 Index]