1.準備 TxDb
library(GenomicFeatures)
txdb <- makeTxDbFromGFF("D:\\m6A-seq\\NIP.gtf", format = "gtf")
2.讀入peak文件
library(clusterProfiler)
library(ChIPseeker)
mi <- readPeakFile("D:\\m6A-seq\\mi_overlap.narrowPeak")
3.畫圖
library(org.Osativa.eg.db)
peakAnno <- annotatePeak(mi, tssRegion=c(-3000, 3000),genomicAnnotationPriority = c("3UTR","5UTR", "Exon","Intron","Intergenic"),TxDb=txdb, annoDb="org.Osativa.eg.db")
plotAnnoPie(peakAnno)
plotPeakProf2(peak = mi, upstream = rel(0.2), downstream = rel(0.2),
conf = 0.95, by = "gene", type = "body", nbin = 800,
TxDb = txdb, weightCol = "V5",ignore_strand = F)