diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/chipeakanno_annopeaks.R	Wed May 02 09:24:03 2018 -0400
@@ -0,0 +1,23 @@
+require("ChIPpeakAnno", quietly = TRUE)
+require("EnsDb.Hsapiens.v75", quietly = TRUE)
+require("rtracklayer", quietly = TRUE)
+
+options(warn = -1)
+options("download.file.method"="wget")
+
+args <- commandArgs(trailingOnly = TRUE)
+
+input1 = args[1]
+input2 = args[2]
+input3  = as.numeric(args[3])
+input4 = as.numeric(args[4])
+output1  = args[5]
+
+peaks <- get(load(input1))
+
+annoData <- toGRanges(EnsDb.Hsapiens.v75)
+seqlevelsStyle(peaks) <- seqlevelsStyle(annoData)
+
+ anno <- annoPeaks(peaks, annoData=annoData, bindingType =c(input2), bindingRegion=c(input3, input4))
+ 
+ write.table(anno, file= output1, row.names = FALSE)