Hi,
I would like to use plotAnnoBar with different categories of classes compared to the default of "Promoter", "5' UTR", "3' UTR", "Exon", "Intron", "Downstream (<=3kb)", "Intergenic", so I was wondering whether it is possible to go from a data frame of frequencies ("anno.df" in ChIPseeker), to a csAnno that can be provided directly to plotAnnoBar (I am using lists).
Thank you
Hi Guangchuang, is there any way I can convert a TXT file (external annotated peak file) to a csAnno object? In other words, could ChIPseeker take external annotated peak file to do plots? Thanks a lot! BEST, Xiaofei
No. this is not supported.
I think I should find a way to do this. I see ChIPseeker can accept a GRanges object. So, what I did is that I made a GRanges object from a data frame by makeGRangesFromDataFrame. Then, I used this as the input of ChIPseeker to do plots. Also, I used makeTxDbFromGFF to create TxDb from a GFF3 file. It works with functions of covplot, tagMatrixList, peakHeatmap, and ect., which can take GRanges object as input. But, the problem is the function of plotAnnoPie, which takes
csAnno
instance as input. I see thecsAnno
instance can be converted to GRanges object. But I did not find there is a function to do the vice verse (GRanges object tocsAnno
instance).Any comments? The reason I used an external annotated peaks is that I'd like to keep consistent with my previous analysis.
Thanks a lot!
Also, I compared the annotation between ChIPseeker with another tool. The first few lines results are listed above (hope you can get the meaning for each column because of bad format. I don't know how to upload an image from my laptop). The Nearest.PromoterID are same between them. But the distance to TSS is different totally.
Any ideas? Because I don't think it should be 0 to the nearest TSS for most of peaks. Any possible reasons I made mistake?
Thank you so much! Best, Xiaofei
any reproducible example?
yes, I sent you the related files to your Gmail. Please let me know, if you can't open it. Thanks a lot! BEST, Xiaofei
by default if the TSS is inside a peak, the peak to the TSS distance is set to 0. You can still calculate the minimal value of both end to the TSS by specifying
ignoreOverlap=T
.Yes, it totally makes sense. But could you tell me how the distance to TSS is calculated (I will look up this too)? Because I see they are much different between homer and chipseeker, not only the number but also the sign (+/-). Please refer to the example at the bottom, the distance is 1312 VS -8942.
Here is how homer does it http://homer.ucsd.edu/homer/ngs/annotation.html.