Hi Yuliang,
I do not quite get what do you mean by selecting y. If you want to
browse the gene list, you could select the gene list in the file you
saved as annotatedPeakList.xls .
write.table(as.data.frame(annotatedPeak), file =
"annotatedPeakList.xls", sep = "\t", row.names = FALSE)
Alternatively, you could look at the data as a data frame.
Y = as.data.frame(annotatedPeak)
Y[1:10,]
I strong suggest you take a look at the introduction to R book at
http://cran.r-project.org/doc/manuals/R-intro.pdf that will help you
understand how R works.
Best regards,
Julie
On 9/21/10 8:07 PM, "Yuliang Tan" <yuliangtan@gmail.com> wrote:
Hi Julie,
What could I do if I want to profile the expression of proteins in a
special kind of genes promoters?
I tried to select this genes from annotatedPeakList, but i don't know
how to define y, so I can't plot it.
best,
Yuliang
2010/9/20 Zhu, Julie <julie.zhu@umassmed.edu>
Yuliang,
You are welcome!
Best,
Julie
On 9/20/10 2:05 PM, "Yuliang Tan" <yuliangtan@gmail.com <http:="" yuliangtan@gmail.com=""> > wrote:
Hi Julie,
You really do me a great favor! Thank you so much!
?
Best,
Yuliang
2010/9/20 Zhu, Julie <julie.zhu@umassmed.edu <http:="" julie.zhu@umassmed.edu=""> >
Hi Yuliang,
When you do data(myPeakList), you are using the dataset myPeaklist
from the package. In order to use your own dataset, you need to remove
this line and assign a variable to the result of BED2RangedData. Here
is the complete code.
library(ChIPpeakAnno)
???????test1.bed=read.table("~/Desktop/test1.bed", sep="\t", skip=1,
header=FALSE)
myPeakList = BED2RangedData(test1.bed,header=FALSE)
??data(TSS.mouse.NCBIM37)
annotatedPeak = annotatePeakInBatch (myPeakList, AnnotationData =
TSS.mouse.NCBIM37)
write.table(as.data.frame(annotatedPeak), file =
"annotatedPeakList.xls", sep = "\t", row.names = FALSE)
y = annotatedPeak$distancetoFeature[!is.na <http: is.na="">
<http: is.na=""> (annotatedPeak$distancetoFeature) &
annotatedPeak$fromOverlappingOrNearest == "NearestStart"]
hist(y, xlab = "Distance To Nearest TSS")
#plot to show the distribution of my protein around TSS region (-5000,
+1000)
hist(y[y<=1000 | y>=-5000], xlab = "Distance To Nearest TSS")
Best regards,
Julie
On 9/17/10 7:01 PM, "Yuliang Tan" <yuliangtan@gmail.com <http:="" yuliangtan@gmail.com=""> <http: yuliangtan@gmail.com=""> > wrote:
Hi Julie:
Unfortunately, it still doesn't work, it seems that i can't get a plot
to show the distribution of my protein around TSS region (-5000,
+1000) by ChIPpeakAnno. So i send you my bed file (attached) and the R
code that i used in ChIPpeakAnno, could you tell why I failed to do
this?
?
library(ChIPpeakAnno)
test1.bed=read.table("~/Desktop/test1.bed", sep="\t", skip=1,
header=FALSE)
BED2RangedData(test1.bed,header=FALSE)
myPeakList=test1.bed
data(myPeakList)
annotatedPeak = annotatePeakInBatch (myPeakList, AnnotationData =
TSS.mouse.NCBIM37, output="both", multiple = F, maxgap = 0)
write.table(as.data.frame(annotatedPeak), file =
"annotatedPeakList.xls", sep = "\t", row.names = FALSE)
y = annotatedPeak$distancetoFeature[!is.na <http: is.na="">
<http: is.na=""> ?<http: is.na=""/> (annotatedPeak$distancetoFeature) &
annotatedPeak$fromOverlappingOrNearest == "NearestStart"]
hist(y, xlab = "Distance To Nearest TSS")
Thanks!
Best,
Yuliang
2010/9/17 Zhu, Julie <julie.zhu@umassmed.edu <http:="" julie.zhu@umassmed.edu=""> <http: julie.zhu@umassmed.edu=""> >
Yuliang,
hist(y[abs(y<1000)], xlab = "Distance To Nearest TSS", main = "")
should work. You can modify 1000 to whatever threshold you feel right.
Best regards,
Julie
On 9/17/10 2:58 PM, "Yuliang Tan" <yuliangtan@gmail.com <http:="" yuliangtan@gmail.com=""> <http: yuliangtan@gmail.com="">
?<http: yuliangtan@gmail.com=""> > wrote:
Hi Julie:
The code i used is :
y = annotatedPeak$distancetoFeature[!is.na <http: is.na="">
<http: is.na=""> ?<http: is.na=""> ?<http: is.na=""/>
(annotatedPeak$distancetoFeature) &
annotatedPeak$fromOverlappingOrNearest == "NearestStart"]
hist(y, xlab = "Distance To Nearest TSS", main = "", breaks = 1000,
xlim = c(-5000, 1000))
It works very well when i tried the code that you sent it
me$B!J(Bpls check it in the attached file. Thank you!
Could you tell me how to figure a plot to show the region near to the
TSS region? I think the result showed a too big range around TSS
region. How to define y to just the Nearest fragments?
y = annotatedPeak$distancetoFeature[!is.na <http: is.na="">
<http: is.na=""> ?<http: is.na=""> ?<http: is.na=""/>
(annotatedPeak$distancetoFeature) & annotatedPeak$fromNearest ==
"NearestStart"]
It doesn't work.
Best,
Yuliang
On Fri, Sep 17, 2010 at 11:16 AM, Zhu, Julie <julie.zhu@umassmed.edu <http:="" julie.zhu@umassmed.edu=""> <http: julie.zhu@umassmed.edu="">
?<http: julie.zhu@umassmed.edu=""> > wrote:
Hi Yuliang,
Your plot might have included all the overlapping fragments not just
the nearest.
What is the code you used for generating the plot?
y = annotatedPeak$distancetoFeature[!is.na <http: is.na="">
<http: is.na=""> ?<http: is.na=""> ?<http: is.na="">
(annotatedPeak$distancetoFeature) &
annotatedPeak$fromOverlappingOrNearest == "NearestStart"]
hist(y, xlab="Distance To Nearest TSS")
Best regards,
Julie
On 9/17/10 2:05 PM, "Yuliang Tan" <yuliangtan@gmail.com <http:="" yuliangtan@gmail.com=""> <http: yuliangtan@gmail.com="">
?<http: yuliangtan@gmail.com=""> ?<http: yuliangtan@gmail.com=""> > wrote:
Hi Julie:
I still think that there must be some problems, the results are
different with different software, and I think the results in my
ChIPpeakAnno is strange, could you pls look at the results by
chippeaklist and CEAS in the attached files?? Thanks!
Best,
Yuliang
On Fri, Sep 17, 2010 at 10:50 AM, Zhu, Julie <julie.zhu@umassmed.edu <http:="" julie.zhu@umassmed.edu=""> <http: julie.zhu@umassmed.edu="">
?<http: julie.zhu@umassmed.edu=""> ?<http: julie.zhu@umassmed.edu=""> >
wrote:
Hi Yuliang,
The warning messages can be ignored for now. In the future release, I
will replace the multiple argument with select argument.
Best regards,
Julie
On 9/17/10 1:43 PM, "Yuliang Tan" <yuliangtan@gmail.com <http:="" yuliangtan@gmail.com=""> <http: yuliangtan@gmail.com="">
?<http: yuliangtan@gmail.com=""> ?<http: yuliangtan@gmail.com="">
?<http: yuliangtan@gmail.com=""> > wrote:
Hi Julie:
I'm sorry to bother you so many times, but there is another error
message again, when I type
>annotatedPeak = annotatePeakInBatch (myPeakList, AnnotationData =
TSS.mouse.NCBIM37, output="both", multiple = F, maxgap = 0)
It showed:
There were 19 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
2: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
3: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
4: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
5: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
6: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
7: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
8: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
9: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
10: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
11: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
12: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
13: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
14: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
15: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
16: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
17: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
18: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
19: In .local(query, subject, maxgap, minoverlap, type, select,? ... :
? argument 'multiple' is deprecated; use 'select'.
Do you know what's the problem?
Thanks!
Best,
Yuliang
On Fri, Sep 17, 2010 at 6:21 AM, Zhu, Julie <julie.zhu@umassmed.edu <http:="" julie.zhu@umassmed.edu=""> <http: julie.zhu@umassmed.edu="">
?<http: julie.zhu@umassmed.edu=""> ?<http: julie.zhu@umassmed.edu="">
?<http: julie.zhu@umassmed.edu=""> > wrote:
Yuliang,
Yes, you need first run peak calling algorithm such as MACS, the
Bioconductor packages chipseq or
BayesPeak etc.
If you still encounter memory problem after first running peak calling
algorithm, you could try R 64-bit version.
Best regards,
Julie
On 9/17/10 3:14 AM, "Yuliang Tan" <yuliangtan@gmail.com <http:="" yuliangtan@gmail.com=""> <http: yuliangtan@gmail.com="">
?<http: yuliangtan@gmail.com=""> ?<http: yuliangtan@gmail.com="">
?<http: yuliangtan@gmail.com=""> ?<http: yuliangtan@gmail.com=""> > wrote:
Hi Julie,
I followed the examples in R console, it reported an Error: cannot
allocate vector of size 128.0 Mb, my bed file maybe too big, here is
the head of this test.bed:
?
chr8??? 119445843??? 119446142??? Neg1??? 1??? -??? 119445843???
119446142??? 153,255,153
chrY??? 2788549??? 2788848??? Pos2??? 1??? +??? 2788549??? 2788848???
153,153,255
chr3??? 53798783??? 53799082??? Neg3??? 1??? -??? 53798783???
53799082??? 153,255,153
chr11??? 3062997??? 3063296??? Pos4??? 1??? +??? 3062997??? 3063296???
153,153,255
chr4??? 59868948??? 59869247??? Neg5??? 1??? -??? 59868948???
59869247??? 153,255,153
chr6??? 92670855??? 92671154??? Pos6??? 1??? +??? 92670855???
92671154??? 153,153,255
chr12??? 111937877??? 111938176??? Pos7??? 1??? +??? 111937877???
111938176??? 153,153,255
chr13??? 26631633??? 26631932??? Neg8??? 1??? -??? 26631633???
26631932??? 153,255,153
chr13??? 89216483??? 89216782??? Neg9??? 1??? -??? 89216483???
89216782??? 153,255,153
chr7??? 122607914??? 122608213??? Neg10??? 1??? -??? 122607914???
122608213??? 153,255,153
Do you think that I need to use a bed file runed after MACS or some
other program?
Best,
Yuliang
PS: what is the sessionInfo()?
On Thu, Sep 16, 2010 at 5:45 PM, Zhu, Julie <julie.zhu@umassmed.edu <http:="" julie.zhu@umassmed.edu=""> <http: julie.zhu@umassmed.edu="">
?<http: julie.zhu@umassmed.edu=""> ?<http: julie.zhu@umassmed.edu="">
?<http: julie.zhu@umassmed.edu=""> ?<http: julie.zhu@umassmed.edu=""> >
wrote:
uliang,
What is your test.bed look like? It should be a data frame. ?If you
have a bed file named test.bed, you would first read the test.bed into
R as test.bed = read.table($B!H(Bbedfile.txt$B!I(B,
sep=$B!I(B\t$B!I(B, skip=1,header=FALSE) before calling function
BED2RangedData.
Could you please type test.bed[1:5,] to see what is the content of the
first five rows of the data?
How many rows in test.bed data frame? Please include sessionInfo() in
your email.
Please follow the examples by typing ?BED2RangedData in a R console.
Best regards,
Julie
On 9/16/10 6:50 PM, "Yuliang Tan" <yuliangtan@gmail.com <http:="" yuliangtan@gmail.com=""> <http: yuliangtan@gmail.com="">
?<http: yuliangtan@gmail.com=""> ?<http: yuliangtan@gmail.com="">
?<http: yuliangtan@gmail.com=""> ?<http: yuliangtan@gmail.com="">
?<http: yuliangtan@gmail.com=""> > wrote:
Hi Julie,
Thanks for your help! I have another problem when i run
BED2RangedData(test.bed,header=TRUE),
It got:
Error in DataFrame(...) : cannot coerce class "numeric" to a DataFrame
R(156,0xa02c9720) malloc: *** mmap(size=105365504) failed (error
code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
R(156,0xa02c9720) malloc: *** mmap(size=105365504) failed (error
code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
R(156,0xa02c9720) malloc: *** mmap(size=105365504) failed (error
code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Do you thin it is because of my bed or some packages i doesn't
install?
Best,
Yuliang
On Thu, Sep 16, 2010 at 5:54 AM, Zhu, Julie <julie.zhu@umassmed.edu <http:="" julie.zhu@umassmed.edu=""> <http: julie.zhu@umassmed.edu="">
?<http: julie.zhu@umassmed.edu=""> ?<http: julie.zhu@umassmed.edu="">
?<http: julie.zhu@umassmed.edu=""> ?<http: julie.zhu@umassmed.edu="">
?<http: julie.zhu@umassmed.edu=""> > wrote:
Hi Yuliang,
The mouse TSS annotation is TSS.mouse.NCBIM37. You can also get the
annotation using the function getAnnotation.
You will find this information if you type in R console,
library(ChIPpeakAnno)
?annotatePeakInBatch
?getAnnotation
For detailed information on how to use the package, please refer to
the paper in BMC Bioinformatics
(
http://www.biomedcentral.com/1471-2105/11/237) and ChIPpeakAnno
practical presentation given at Bioc2010 conference
(
http://www.bioconductor.org/help/course-
materials/2010/BioC2010/BioC2010_ChIPpeakAnno.pdf).
Kind regards,
Julie
On 9/15/10 9:42 PM, "Yuliang Tan" <yuliangtan@gmail.com <http:="" yuliangtan@gmail.com=""> <http: yuliangtan@gmail.com="">
?<http: yuliangtan@gmail.com=""> ?<http: yuliangtan@gmail.com="">
?<http: yuliangtan@gmail.com=""> ?<http: yuliangtan@gmail.com="">
?<http: yuliangtan@gmail.com=""> ?<http: yuliangtan@gmail.com=""> > wrote:
Hi Zhu:
I'm trying to do some analysis by ChIPpeakAnno, but it seems that
there are no mouse genome database in this package, could you tell me
how to build an annotation file for this package?? Thank you!
[[alternative HTML version deleted]]