2
|
1 \name{export}
|
|
2 \alias{export}
|
|
3 \alias{export,MosaicsPeak-method}
|
|
4 \title{
|
|
5 Export peak calling results to text files
|
|
6 }
|
|
7 \description{
|
|
8 Export peak calling results to text files in TXT, BED, or GFF file formats.
|
|
9 }
|
|
10 \usage{
|
|
11 export(object, ...)
|
|
12 \S4method{export}{MosaicsPeak}( object, type=NA, filename=NA )
|
|
13 }
|
|
14 \arguments{
|
|
15 \item{object}{Object of class \code{MosaicsPeak},
|
|
16 peak calling results obtained using method \code{mosaicsPeak}. }
|
|
17 \item{type}{Format of the exported file.
|
|
18 Possible values are \code{"txt"}, \code{"bed"}, and \code{"gff"}. See Details. }
|
|
19 \item{filename}{Name of the exported file. }
|
|
20 \item{...}{ Other parameters to be passed through to generic \code{export}.}
|
|
21 }
|
|
22 \details{
|
|
23 TXT file format (\code{type="txt"}) exports peak calling results in the most informative way.
|
|
24 Columns include chromosome ID, peak start position, peak end position, peak width,
|
|
25 average posterior probability, minimum posterior probability,
|
|
26 average ChIP tag count, maximum ChIP tag count (always),
|
|
27 average input tag count, average input tag count scaled by sequencing depth,
|
|
28 average log base 2 ratio of ChIP over input tag counts
|
|
29 (if matched control sample is also provided),
|
|
30 average mappability score, and average GC content score
|
|
31 (when mappability and GC content scores are used in the analysis) in each peak.
|
|
32 \code{type="bed"} and \code{type="gff"} export peak calling results in standard BED and GFF file formats,
|
|
33 respectively, where score is the average ChIP tag counts in each peak.
|
|
34 If no peak is detected, \code{export} method will not generate any file.
|
|
35 }
|
|
36 \references{
|
|
37 Kuan, PF, D Chung, JA Thomson, R Stewart, and S Keles (2011),
|
|
38 "A Statistical Framework for the Analysis of ChIP-Seq Data",
|
|
39 \emph{Journal of the American Statistical Association}, Vol. 106, pp. 891-903.
|
|
40 }
|
|
41 \author{ Dongjun Chung, Pei Fen Kuan, Sunduz Keles }
|
|
42 \seealso{
|
|
43 \code{\link{mosaicsPeak}}, \code{\linkS4class{MosaicsPeak}}.
|
|
44 }
|
|
45 \examples{
|
|
46 \dontrun{
|
|
47 library(mosaicsExample)
|
|
48 data(exampleFit)
|
|
49
|
|
50 examplePeak <- mosaicsPeak( exampleFit, signalModel = "2S", FDR = 0.05 )
|
|
51 export( examplePeak, type = "txt", filename = "./TSpeakList.txt" )
|
|
52 export( examplePeak, type = "bed", filename = "./TSpeakList.bed" )
|
|
53 export( examplePeak, type = "gff", filename = "./TSpeakList.gff" )
|
|
54 }
|
|
55 }
|
|
56 \keyword{models}
|
|
57 \keyword{methods}
|