0
|
1 require("ChIPseeker", quietly = TRUE)
|
|
2 require("ChIPpeakAnno", quietly = TRUE)
|
|
3
|
|
4 options(warn = -1)
|
|
5
|
|
6 args <- commandArgs(trailingOnly = TRUE)
|
|
7 DMR = args[1]
|
|
8 annoPeakFigure = args[2]
|
|
9
|
|
10 #DMR <- ("test-data/DMR.bed")
|
|
11 DMRInfo = read.table(
|
|
12 DMR,
|
|
13 header = FALSE,
|
|
14 sep = "\t",
|
|
15 stringsAsFactors = FALSE,
|
|
16 quote = ""
|
|
17 )
|
|
18
|
|
19 DMRPeaks <- GRanges(seqnames = DMRInfo[, 1],
|
|
20 ranges = IRanges
|
|
21 (start = DMRInfo[, 2], end = DMRInfo[, 3]))
|
|
22
|
|
23 annotatePeak <- (annotatePeak(DMRPeaks, level = "gene", annoDb = "org.Hs.eg.db"))
|
|
24
|
|
25 #annoPeakFigure <- ('test-data/annoPeakFigure.png')
|
|
26
|
|
27 png(file = annoPeakFigure,
|
|
28 width = 1200,
|
|
29 height = 600)
|
|
30
|
|
31 upsetplot(annotatePeak, vennpie = TRUE)
|
|
32
|
|
33 dev.off()
|