estimatecc {methylCC} | R Documentation

## Estimate cell composition from DNAm data

### Description

Estimate cell composition from DNAm data

### Usage

    estimatecc(object, find_dmrs_object = NULL, verbose = TRUE,
      epsilon = 0.01, max_iter = 100, take_intersection = FALSE,
      include_cpgs = FALSE, include_dmrs = TRUE,
      init_param_method = "random", a0init = NULL, a1init = NULL,
      sig0init = NULL, sig1init = NULL, tauinit = NULL, demo = FALSE)

### Arguments

`object` | an object can be a `RGChannelSet`, `GenomicMethylSet` or `BSseq` object
`find_dmrs_object` | If the user would like to supply different differentially methylated regions, they can use the output from the `find_dmrs` function to supply different regions to `estimatecc`.
`verbose` | TRUE/FALSE argument specifying if verbose messages should be returned or not. Default is TRUE.
`epsilon` | Threshold for EM algorithm to check for convergence. Default is 0.01.
`max_iter` | Maximum number of iterations for EM algorithm. Default is 100 iterations.
`take_intersection` | TRUE/FALSE asking if only the CpGs included in `object` should be used to find DMRs. Default is FALSE.
`include_cpgs` | TRUE/FALSE. Should individual CpGs be returned. Default is FALSE.
`include_dmrs` | TRUE/FALSE. Should differentially methylated regions be returned. Default is TRUE.
`init_param_method` | method to initialize parameter estimates. Choose between "random" (randomly sample) or "known_regions" (uses unmethyalted and methylated regions that were identified based on Reinus et al. (2012) cell sorted data.). Defaults to "random".
`a0init` | Default NULL. Initial mean methylation level in unmethylated regions
`a1init` | Default NULL. Initial mean methylation level in methylated regions
`sig0init` | Default NULL. Initial var methylation level in unmethylated regions
`sig1init` | Default NULL. Initial var methylation level in methylated regions
`tauinit` | Default NULL. Initial var for measurement error
`demo` | TRUE/FALSE. Should the function be used in demo mode to shorten examples in package. Defaults to FALSE.

### Value

A object of the class `estimatecc` that contains information about the cell composition estimation (in the `summary` slot) and the cell composition estimates themselves (in the `cell_counts` slot).

### Examples

    # This is a reduced version of the FlowSorted.Blood.450k
    # dataset available by using BiocManager::install("FlowSorted.Blood.450k),
    # but for purposes of the example, we use the smaller version
    # and we set \code{demo=TRUE}. For any case outside of this example for
    # the package, you should set \code{demo=FALSE} (the default).

    dir <- system.file("data", package="methylCC")
    files <- file.path(dir, "FlowSorted.Blood.450k.sub.RData")
    if(file.exists(files)){
        load(file = files)

        set.seed(12345)
        est <- estimatecc(object = FlowSorted.Blood.450k.sub, demo = TRUE)
        cell_counts(est)
     }

[Package methylCC version 1.6.0 Index]