Entering edit mode
Binbin Liu
▴
30
@binbin-liu-4350
Last seen 10.2 years ago
Hello there,
I have two questions here to ask for your suggestions regarding
BayesPeak pkg and RangedData obj output.
I am trying to use BayesPeak for peak identification of my treat with
input
After done:
raw.chr1 = bayespeak(treat, control, chr="chr1", use.multicore=T,
mc.cores=16)
output.chr1 = summarize.peaks(raw.chr1, method="lowerbound")
I had a look at peaks in output.chr1 ----
RangedData with 1376 rows and 1 value column across 1 space
space ranges | PP
<character> <iranges> | <numeric>
1 chr1 [33146139, 33146289] | 0.9333376
2 chr1 [33381689, 33381839] | 0.9753039
3 chr1 [33382089, 33382289] | 0.9999574
4 chr1 [33504139, 33504289] | 0.9997761
5 chr1 [33561739, 33561939] | 0.9999883
6 chr1 [33563589, 33563839] | 1.0000000
7 chr1 [33622739, 33622939] | 0.9999843
8 chr1 [33627989, 33628139] | 0.9997822
9 chr1 [33644589, 33644939] | 0.9999988
10 chr1 [33646539, 33646689] | 0.9771097
and attributes(output.chr1) ----
attributes(outputchr1)
$ranges
CompressedIRangesList of length 1
$chr1
IRanges of length 1376
start end width
[1] 33146139 33146289 151
[2] 33381689 33381839 151
[3] 33382089 33382289 201
[4] 33504139 33504289 151
[5] 33561739 33561939 201
[6] 33563589 33563839 251
[7] 33622739 33622939 201
[8] 33627989 33628139 151
[9] 33644589 33644939 351
... ... ...
Does this look normal to you?, because I am not sure. It seems that
all peaks have very similar width and coordinates. I have tried with
different chip-seq dataset and got similar pattern of output as this.
What have I done wrong here?
The second question is when I try to write output with
write.table(output.chr1, file="blah.txt", sep="\t") as shown on the
BayesPeak tutorial, R complains that
"Error in as.data.frame.default(x[[i]], optional = TRUE) :
cannot coerce class structure("RangedData", package = "IRanges")
into a data.frame"
What is wrong here?
sessionInfo()
R version 2.10.1 (2009-12-14)
x86_64-unknown-linux-gnu
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] multicore_0.1-4 BayesPeak_1.2.0 IRanges_1.4.16
loaded via a namespace (and not attached):
[1] tools_2.10.1
Many thanks for any help.