Mercurial > repos > testtool > annotate_peak
comparison annotatePeak/annotatePeak.R @ 2:be66730c5c3b draft
Uploaded
author | testtool |
---|---|
date | Sat, 25 Feb 2017 11:29:01 -0500 |
parents | 92387cb81962 |
children | e1c643f600d2 |
comparison
equal
deleted
inserted
replaced
1:92387cb81962 | 2:be66730c5c3b |
---|---|
1 require("ChIPseeker", quietly = TRUE) | 1 require("ChIPseeker", quietly = TRUE) |
2 require("ChIPpeakAnno", quietly = TRUE) | 2 require("ChIPpeakAnno", quietly = TRUE) |
3 require("org.Hs.eg.db", quietly = TRUE) | 3 require("org.Hs.eg.db", quietly = TRUE) |
4 require("GenomicRanges", quietly = TRUE) | |
4 options(warn = -1) | 5 options(warn = -1) |
5 | 6 |
6 args <- commandArgs(trailingOnly = TRUE) | 7 args <- commandArgs(trailingOnly = TRUE) |
7 DMR = args[1] | 8 DMR = args[1] |
8 annoPeakTable = args[2] | 9 annoPeakTable = args[2] |
18 | 19 |
19 DMRPeaks <- GRanges(seqnames = DMRInfo[, 1], | 20 DMRPeaks <- GRanges(seqnames = DMRInfo[, 1], |
20 ranges = IRanges | 21 ranges = IRanges |
21 (start = DMRInfo[, 2], end = DMRInfo[, 3])) | 22 (start = DMRInfo[, 2], end = DMRInfo[, 3])) |
22 | 23 |
23 annotatePeak <- | 24 annotatePeak <- annotatePeak(DMRPeaks, level = "gene", annoDb = "org.Hs.eg.db") |
24 as.data.frame(annotatePeak(DMRPeaks, level = "gene", annoDb = "org.Hs.eg.db")) | |
25 ??org.Hs.eg.db | |
26 | 25 |
27 write.csv(annotatePeak, annoPeakTable, row.names = FALSE) | 26 |
27 write.csv(as.data.frame(annotatePeak), annoPeakTable, row.names = FALSE) |