ChIPseeker question: provide custom csAnno to plots
2
0
Entering edit mode
@francesca-casalino-4984
Last seen 20 months ago
United States

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

chipseeker • 3.2k views
ADD COMMENT
1
Entering edit mode
Guangchuang Yu ★ 1.2k
@guangchuang-yu-5419
Last seen 6 weeks ago
China/Guangzhou/Southern Medical Univer…

The plotAnnoBar only support csAnno object. If you have a data.frame with feature and frequency, it would be very easy to produce a barplot using ggplot2/barplot. Go ahead to read some docs and try it.


 

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

No. this is not supported.

ADD REPLY
0
Entering edit mode

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 the csAnno instance can be converted to GRanges object. But I did not find there is a function to do the vice verse (GRanges object to csAnno 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!

 

 

ADD REPLY
0
Entering edit mode
Annotation Distance.to.TSS Nearest.PromoterID geneId_chipseeker annotation_chipseeker distanceToTSS_chipseeker
exon (transcript:Sb08g023250.1, exon 1 of 1) 1312 transcript:Sb08g023250.1 Sb08g023250 Promoter (<=1kb) 0
exon (transcript:Sb08g022960.1, exon 3 of 6) 2070 transcript:Sb08g022960.1 Sb08g022960 Promoter (<=1kb) 0
exon (transcript:Sb08g022780.1, exon 1 of 1) 1673 transcript:Sb08g022780.1 Sb08g022780 Promoter (<=1kb) 0
exon (transcript:Sb08g004860.1, exon 1 of 1) 812 transcript:Sb08g004860.1 Sb08g004860 Promoter (<=1kb) 0
exon (transcript:Sb08g004850.1, exon 1 of 7) 1097 transcript:Sb08g004850.1 Sb08g004850 Promoter (<=1kb) 0
TTS (transcript:Sb08g001320.1) 1983 transcript:Sb08g001320.1 Sb08g001320 Promoter (<=1kb) 0
intron (transcript:Sb08g019690.1, intron 1 of 3) 1245 transcript:Sb08g019690.1 Sb08g019690 Promoter (<=1kb) 0
exon (transcript:Sb08g021920.1, exon 1 of 2) 648 transcript:Sb08g021920.1 Sb08g021920 Promoter (<=1kb) 0
exon (transcript:Sb08g017750.1, exon 2 of 3) 1659 transcript:Sb08g017750.1 Sb08g017750 Promoter (<=1kb) 0
exon (transcript:Sb08g022760.1, exon 1 of 3) 1002 transcript:Sb08g022760.1 Sb08g022760 Promoter (<=1kb) 0
exon (transcript:Sb08g019050.1, exon 1 of 1) 761 transcript:Sb08g019050.1 Sb08g019050 Promoter (<=1kb) 0
exon (transcript:Sb08g018940.1, exon 1 of 1) 777 transcript:Sb08g018940.1 Sb08g018940 Promoter (<=1kb) 0
ADD REPLY
0
Entering edit mode

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

 

ADD REPLY
0
Entering edit mode
ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

seqnames start end width Annotation Detailed.Annotation Distance.to.TSS Nearest.PromoterID Entrez.ID Nearest.Unigene Nearest.Refseq Nearest.Ensembl Gene.Name Gene.Alias Gene.Description Gene.Type annotation geneChr geneStart geneEnd geneLength geneStrand geneId transcriptId distanceToTSS
8 55349719 55353107 3389 exon (transcript:Sb08g023250.1, exon 1 of 1) NA 1312 transcript:Sb08g023250.1 NA NA NA NA NA NA NA NA Exon (SB08G023250/Sb08g023250, exon 1 of 1) 1 55340328 55340777 450 2 Sb08g023240 SB08G023240 -8942

 

ADD REPLY
0
Entering edit mode
@francesca-casalino-4984
Last seen 20 months ago
United States

Ok sure, thank you for your reply. 

ADD COMMENT

Login before adding your answer.

Traffic: 820 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6