comparison chipeakanno_annopeaks.R @ 0:efd9e1315ed5 draft

planemo upload for repository https://github.com/kpbioteam/chipeakanno_annopeaks commit b81bbf4662bc9f8a936ccdf5813c3cd8020c579d-dirty
author kpbioteam
date Wed, 02 May 2018 09:24:03 -0400
parents
children a90b6d85463c
comparison
equal deleted inserted replaced
-1:000000000000 0:efd9e1315ed5
1 require("ChIPpeakAnno", quietly = TRUE)
2 require("EnsDb.Hsapiens.v75", quietly = TRUE)
3 require("rtracklayer", quietly = TRUE)
4
5 options(warn = -1)
6 options("download.file.method"="wget")
7
8 args <- commandArgs(trailingOnly = TRUE)
9
10 input1 = args[1]
11 input2 = args[2]
12 input3 = as.numeric(args[3])
13 input4 = as.numeric(args[4])
14 output1 = args[5]
15
16 peaks <- get(load(input1))
17
18 annoData <- toGRanges(EnsDb.Hsapiens.v75)
19 seqlevelsStyle(peaks) <- seqlevelsStyle(annoData)
20
21 anno <- annoPeaks(peaks, annoData=annoData, bindingType =c(input2), bindingRegion=c(input3, input4))
22
23 write.table(anno, file= output1, row.names = FALSE)