\name{mosaicsFit} \alias{mosaicsFit} \alias{mosaicsFit,BinData-method} \title{ Fit MOSAiCS model } \description{ Fit one-sample or two-sample MOSAiCS model with one signal component and two signal components. } \usage{ mosaicsFit( object, ... ) \S4method{mosaicsFit}{BinData}( object, analysisType=NULL, k=3, meanThres=NA, s=2, d=0.25, truncProb=0.9999 ) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{object}{Object of class \code{BinData}, bin-level ChIP-seq data imported using method \code{readBins}. } \item{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 \code{analysisType} is not specified, this method tries to guess its best for \code{analysisType}, based on the data provided. } \item{k}{Parameter for estimating background distribution. It is not recommended for user to change this value. } \item{meanThres}{Parameter for estimating background distribution. Default is 1 for \code{analysisType="TS"} and 0 for \code{analysisType="OS"}. Not relevant when \code{analysisType="IO"}. } \item{s}{Parameter for estimating background distribution. Relevant only when \code{analysisType="TS"}. Default is 2. } \item{d}{Parameter for estimating background distribution. Relevant only when \code{analysisType="TS"} or \code{analysisType="IO"}. Default is 0.25. } \item{truncProb}{Parameter for estimating background distribution. It is not recommended for user to change this value. } \item{...}{ Other parameters to be passed through to generic \code{mosaicsFit}.} } \details{ The imported data type constraints the analysis that can be implemented. If there is no control data (i.e., \code{type=c("chip", "M", "GC", "N")} was used in method \code{readBins}), only one-sample analysis (\code{analysisType="OS"}) is permitted. If mappability score, GC content score, or sequence ambiguity score are missing (i.e., either \code{type=c("chip", "input")} or \code{type=c("chip", "input", "N")} was used in method \code{readBins}), only two-sample analysis without using mappability and GC content (\code{analysisType="IO"}) is possible. If control data is available with mappability score, GC content score, or sequence ambiguity score, (i.e., \code{type=c("chip", "input", "M", "GC", "N")} was used in method \code{readBins}), user can do either one- or two-sample analysis (\code{analysisType="OS"}, \code{analysisType="TS"}, or \code{analysisType="IO"}). \code{meanThres}, \code{s}, and \code{d} are the tuning parameters for estimating background distribution. The vignette and Kuan et al. (2010) provide further details about these tuning parameters. Do not change \code{k} or \code{truncProb}. } \value{ Construct \code{MosaicsFit} class object. } \references{ Kuan, PF, D Chung, JA Thomson, R Stewart, and S Keles (2010), "A Statistical Framework for the Analysis of ChIP-Seq Data", submitted (\url{http://works.bepress.com/sunduz_keles/19/}). } \author{ Dongjun Chung, Pei Fen Kuan, Sunduz Keles } \seealso{ \code{\link{readBins}}, \code{\linkS4class{MosaicsFit}}. } \examples{ \dontrun{ library(mosaicsExample) data(exampleBinData) exampleFit <- mosaicsFit( exampleBinData, analysisType="TS" ) } } \keyword{models} \keyword{methods}