mosaicsFit {mosaics} | R Documentation

## Fit MOSAiCS model

### Description

Fit one-sample or two-sample MOSAiCS models with one signal component and two signal components.

### Usage

    mosaicsFit( object, ... )
    ## S4 method for signature 'BinData'
    mosaicsFit( object, analysisType="automatic", bgEst="rMOM",
        k=3, meanThres=NA, s=2, d=0.25, trans="power", truncProb=0.999, parallel=FALSE, nCore=8 )

### Arguments

`object` | Object of class `BinData`, bin-level ChIP-seq data imported using method `readBins`.
`analysisType` | Analysis type. Possible values are "OS" (one-sample analysis), "TS" (two-sample analysis using mappability and GC content), and "IO" (two-sample analysis without using mappability and GC content). If `analysisType="automatic"`, this method tries to make the best guess for `analysisType`, based on the data provided.
`bgEst` | Parameter to determine background estimation approach. Possible values are "matchLow" (estimation using bins with low tag counts) and "rMOM" (estimation using robust method of moment (MOM)). If `bgEst="automatic"`, this method tries to make the best guess for `bgEst`, based on the data provided. Default is `bgEst="rMOM"`.
`k` | Parameter for estimating background distribution. It is not recommended for users to change this value.
`meanThres` | Parameter for estimating background distribution. Default is 1 for `analysisType="TS"` and 0 for `analysisType="OS"`. Not relevant when `analysisType="IO"`.
`s` | Parameter for estimating background distribution. Relevant only when `analysisType="TS"`. Default is 2.
`d` | Parameter for estimating background distribution. Relevant only when `analysisType="TS"` or `analysisType="IO"`. Default is 0.25.
`trans` | Transformation of matching control tag count. Possible values are "log" (logarithm transformation) and "power" (power transformation). Relevant only when `analysisType="IO"`. Default is `trans="power"`.
`truncProb` | Parameter for estimating background distribution. Relevant only when `analysisType="IO"`.
`parallel` | Utilize multiple CPUs for parallel computing using `"parallel"` package? Possible values are `TRUE` (utilize multiple CPUs) or `FALSE` (do not utilize multiple CPUs). Default is `FALSE` (do not utilize multiple CPUs).
`nCore` | Number of CPUs when parallel computing is utilized.
`...` | Other parameters to be passed through to generic `mosaicsFit`.

### Details

The imported data type constraints the analysis that can be implemented. If only data for ChIP sample and matched control sample (i.e., either `type=c("chip", "input")` or `type=c("chip", "input", "N")` was used in method `readBins`), only two-sample analysis without using mappability and GC content (`analysisType="IO"`) is allowed. If matched control data is available with mappability score, GC content score, and sequence ambiguity score, (i.e., `type=c("chip", "input", "M", "GC", "N")` was used in method `readBins`), user can do all of three analysis types (`analysisType="OS"`, `analysisType="TS"`, or `analysisType="IO"`). If there is no data for matched control sample (i.e., `type=c("chip", "M", "GC", "N")` was used in method `readBins`), only one-sample analysis (`analysisType="OS"`) is permitted.

Parallel computing can be utilized for faster computing if `parallel=TRUE` and `parallel` package is loaded. `nCore` determines number of CPUs used for parallel computing. `meanThres`, `s`, `d`, `trans`, and `truncProb` are the tuning parameters for estimating background distribution. The vignette and Kuan et al. (2011) provide further details about these tuning parameters. Please do not try different value for `k` argument.

### Value

Construct `MosaicsFit` class object.

### Author(s)

Dongjun Chung, Pei Fen Kuan, Rene Welch, Sunduz Keles

### References

Kuan, PF, D Chung, G Pan, JA Thomson, R Stewart, and S Keles (2011), "A Statistical Framework for the Analysis of ChIP-Seq Data", Journal of the American Statistical Association, Vol. 106, pp. 891-903.

Chung, D, Zhang Q, and Keles S (2014), "MOSAiCS-HMM: A model-based approach for detecting regions of histone modifications from ChIP-seq data", Datta S and Nettleton D (eds.), Statistical Analysis of Next Generation Sequencing Data, Springer.

### See Also

`readBins`, `mosaicsFitHMM`, `MosaicsFit`.

### Examples

    ## Not run:
    library(mosaicsExample)
    data(exampleBinData)
    exampleFit <- mosaicsFit( exampleBinData, analysisType="IO" )

    ## End(Not run)

[Package mosaics version 2.18.0 Index]