Mercurial > repos > testtool > annotate_peak
comparison annotate_peak/annotatePeak.R @ 16:ee3fc24b2108 draft
Uploaded
author | testtool |
---|---|
date | Thu, 16 Mar 2017 11:23:38 -0400 |
parents | 53df7871db21 |
children | 982a01524118 |
comparison
equal
deleted
inserted
replaced
15:53df7871db21 | 16:ee3fc24b2108 |
---|---|
1 require("ChIPseeker", quietly = TRUE) | |
2 require("ChIPpeakAnno", quietly = TRUE) | |
3 require("EnsDb.Hsapiens.v75", quietly = TRUE) | |
4 require("GenomicRanges", quietly = TRUE) | |
5 | |
1 options(warn = -1) | 6 options(warn = -1) |
2 args <- commandArgs(trailingOnly = TRUE) | 7 args <- commandArgs(trailingOnly = TRUE) |
3 DMR = args[1] | 8 DMR = args[1] |
4 annoPeakTable = args[2] | 9 annoPeakTable = args[2] |
5 | 10 |
14 | 19 |
15 peaks <- GRanges(seqnames = DMRInfo[, 1], | 20 peaks <- GRanges(seqnames = DMRInfo[, 1], |
16 ranges = IRanges | 21 ranges = IRanges |
17 (start = DMRInfo[, 2], end = DMRInfo[, 3])) | 22 (start = DMRInfo[, 2], end = DMRInfo[, 3])) |
18 peaks[1:2] | 23 peaks[1:2] |
19 ## try http:// if https:// URLs are not supported | |
20 source("https://bioconductor.org/biocLite.R") | |
21 biocLite("EnsDb.Hsapiens.v75") | |
22 library(EnsDb.Hsapiens.v75) | |
23 annoData <- toGRanges(EnsDb.Hsapiens.v75) | 24 annoData <- toGRanges(EnsDb.Hsapiens.v75) |
24 annoData[1:2] | 25 annoData[1:2] |
25 | 26 |
26 ## keep the seqnames in the same style | 27 ## keep the seqnames in the same style |
27 seqlevelsStyle(peaks) <- seqlevelsStyle(annoData) | 28 seqlevelsStyle(peaks) <- seqlevelsStyle(annoData) |