comparison chipeakanno_annopeaks.R @ 7:17b814d78ac6 draft

planemo upload for repository https://github.com/kpbioteam/chipeakanno_annopeaks commit 5ee10ba73cd634a41b84f059f02edeaa04f69b8d-dirty
author kpbioteam
date Thu, 21 Jun 2018 10:08:06 -0400
parents b5bc7e70b949
children 0473a72c943c
comparison
equal deleted inserted replaced
6:ed66a80e81e8 7:17b814d78ac6
1 source("https://bioconductor.org/biocLite.R")
2 biocLite("ChIPpeakAnno")
3
4 biocLite("rtracklayer")
5
6 require("ChIPpeakAnno", quietly = TRUE) 1 require("ChIPpeakAnno", quietly = TRUE)
7 require("EnsDb.Hsapiens.v75", quietly = TRUE) 2 require("EnsDb.Hsapiens.v75", quietly = TRUE)
8 require("rtracklayer", quietly = TRUE) 3 require("rtracklayer", quietly = TRUE)
9 4
10 options(warn = -1) 5 options(warn = -1)
19 output1 = args[5] 14 output1 = args[5]
20 15
21 DMRInfo <- read.table(input1) 16 DMRInfo <- read.table(input1)
22 peaks <- GRanges(seqnames = DMRInfo[, 1], 17 peaks <- GRanges(seqnames = DMRInfo[, 1],
23 ranges = IRanges 18 ranges = IRanges
24 (start = DMRInfo[, 2], end = DMRInfo[, 3])) 19 (start = DMRInfo[, 2], end = DMRInfo[, 3],score=DMRInfo[, 9]))
25 20
26 annoData <- toGRanges(EnsDb.Hsapiens.v75) 21 annoData <- toGRanges(EnsDb.Hsapiens.v75)
27 seqlevelsStyle(peaks) <- seqlevelsStyle(annoData) 22 seqlevelsStyle(peaks) <- seqlevelsStyle(annoData)
28 23
29 anno <- annoPeaks(peaks, annoData=annoData, bindingType =c(input2), bindingRegion=c(input3, input4)) 24 anno <- annoPeaks(peaks, annoData=annoData, bindingType =c(input2), bindingRegion=c(input3, input4))