\name{export} \alias{export} \alias{export,MosaicsPeak-method} \title{ Export peak calling results to text files } \description{ Export peak calling results to text files in TXT, BED, or GFF file format. } \usage{ export(object, ...) \S4method{export}{MosaicsPeak}( object, type=NA, fileLoc=NA, fileName=NA, chrID=NA ) } \arguments{ \item{object}{Object of class \code{MosaicsPeak}, peak calling results obtained using method \code{mosaicsPeak}. } \item{type}{File format. Possible values are \code{"txt"}, \code{"bed"}, and \code{"gff"}. See Details. } \item{fileLoc}{Directory of the exported file. } \item{fileName}{Name of the exported file. } \item{chrID}{Chromosome ID, which is included in the first column in the exported file, e.g. \code{chrID="chr21"}. } \item{...}{ Other parameters to be passed through to generic \code{export}.} } \details{ TXT file format (\code{type="txt"}) exports peak calling results in the most informative way. Columns include peak start position, peak end position, peak width, average posterior probability, minimum posterior probability, average ChIP tag count, maximum ChIP tag count, average input tag count, average input tag count scaled by sequencing depth, average log base 2 ratio of ChIP over input tag counts, average mappability score, and average GC content score in each peak. \code{type="bed"} and \code{type="gff"} export peak calling results in standard BED and GFF file formats, respectively, where score is the average ChIP tag counts in each peak. If no peak is detected, files will not be exported. } \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{mosaicsPeak}}, \code{\linkS4class{MosaicsPeak}}. } \examples{ \dontrun{ library(mosaicsExample) data(exampleFit) examplePeak <- mosaicsPeak( exampleFit, signalModel = "2S", FDR = 0.05 ) export( examplePeak, type = "txt", fileLoc = "./", fileName = "TSpeakList.txt", chrID = "chr21" ) export( examplePeak, type = "bed", fileLoc = "./", fileName = "TSpeakList.bed", chrID = "chr21" ) export( examplePeak, type = "gff", fileLoc = "./", fileName = "TSpeakList.gff", chrID = "chr21" ) } } \keyword{models} \keyword{methods}