0
|
1 require("ChIPseeker", quietly = TRUE)
|
|
2 require("ChIPpeakAnno", quietly = TRUE)
|
|
3 options(warn = -1)
|
|
4
|
|
5 args <- commandArgs(trailingOnly = TRUE)
|
|
6 DMR = args[1]
|
|
7 annoPeakTable = args[2]
|
|
8
|
|
9
|
|
10 DMRInfo = read.table(
|
|
11 DMR,
|
|
12 header = FALSE,
|
|
13 sep = "\t",
|
|
14 stringsAsFactors = FALSE,
|
|
15 quote = ""
|
|
16 )
|
|
17
|
|
18 DMRPeaks <- GRanges(seqnames = DMRInfo[, 1],
|
|
19 ranges = IRanges
|
|
20 (start = DMRInfo[, 2], end = DMRInfo[, 3]))
|
|
21
|
|
22 annotatePeak <-
|
|
23 as.data.frame(annotatePeak(DMRPeaks, level = "gene", annoDb = "org.Hs.eg.db"))
|
|
24
|
|
25
|
|
26 write.csv(annotatePeak, annoPeakTable, row.names = FALSE)
|