I was confused about the argument of tssRegion in peak annotation function of ChIPseeker. It seems that there is no change of the annotation output when I changed the tssRegion setting, from tssRegion=c(-3000, 3000) to tssRegion=c(-2000, 0). I am working on a plant species, Brachypodium distachyon (~272 Mb). I thought this is to define the promoter region, which supposed to be upstream of TSS or 5UTR and setting upstream=3000, downstream=3000 is just for plotting around TSS. So, what is the point of this argument here?
And, does anyone know how the promoter was defined in genomic annotation categories (promoter, 5/3 UTR, exon, intron, downstream, intergenic)? For downstream, does it start after 3' UTR? Can I manually set the downstream range, e.g. 500bp?
peakAnno <- annotatePeak(files[[4]], tssRegion=c(-3000, 3000), TxDb=txdb)
Thanks
R script used here:
library(GenomicFeatures)
library(ChIPseeker)
library(clusterProfiler)
txdb <- loadDb("Bdistachyon_v314.sqlite")
file_H3K27me3="H3K27me3_DiffBind_Peaks.bed"
peak_H3K27me3 <- readPeakFile(file_H3K27me3)
peakAnno <- annotatePeak(peak_H3K27me3, tssRegion=c(-3000, 3000), TxDb=txdb, genomicAnnotationPriority = c( "5UTR", "Exon", "Intron", "3UTR", "Promoter", "Downstream","Intergenic"))
pdf("H3K27me3_AnnoPie_U3000_D3000.pdf")
plotAnnoPie(peakAnno)
dev.off()
pdf("H3K27me3_AnnoUpset_U3000_D3000.pdf")
upsetplot(peakAnno, sets.bar.color="grey23", matrix.color = "black", main.bar.color = "grey23")
dev.off()
write.csv(peakAnno, "H3K27me3_all_peaks_annotation_U3000_D3000.csv")
peakAnno <- annotatePeak(peak_H3K27me3, tssRegion=c(-2000, 0), TxDb=txdb, genomicAnnotationPriority = c( "5UTR", "Exon", "Intron", "3UTR", "Promoter", "Downstream","Intergenic"))
pdf("H3K27me3_AnnoPie_U2000_D0.pdf")
plotAnnoPie(peakAnno)
dev.off()
pdf("H3K27me3_AnnoUpset_U2000_D0.pdf")
upsetplot(peakAnno, sets.bar.color="grey23", matrix.color = "black", main.bar.color = "grey23")
dev.off()
write.csv(peakAnno, "H3K27me3_all_peaks_annotation_U2000_D0.csv")
lifengl-dm:scripts lifengliu$ diff H3K27me3_all_peaks_annotation_U2000_D0.csv H3K27me3_all_peaks_annotation_U3000_D3000.csv
lifengl-dm:scripts lifengliu$
And the numbers in AnnoPie or AnnoUpset are exactly the same.
so the tssRegion argument here is to define the promoter region or something else? If you need the bed file and txdb file, I can send them to you.