diff annotate_peak/annotatePeak.R @ 18:6a9b9694acbf draft

Uploaded
author testtool
date Mon, 20 Mar 2017 06:51:22 -0400
parents 982a01524118
children 741b192da59c
line wrap: on
line diff
--- a/annotate_peak/annotatePeak.R	Thu Mar 16 16:13:45 2017 -0400
+++ b/annotate_peak/annotatePeak.R	Mon Mar 20 06:51:22 2017 -0400
@@ -1,6 +1,7 @@
 require("ChIPseeker", quietly = TRUE)
 require("ChIPpeakAnno", quietly = TRUE)
 require("EnsDb.Hsapiens.v75", quietly = TRUE)
+require("data.table", quietly = TRUE)
 
 options(warn = -1)
 options("download.file.method"="wget")
@@ -9,8 +10,7 @@
 DMR = args[1]
 annoPeakTable = args[2]
 
-#DMR <- ("test-data/DMR.bed")
-DMRInfo = read.table(
+DMRInfo = fread(
   DMR,
   header = FALSE,
   sep = "\t",
@@ -27,5 +27,4 @@
 
 anno <- annoPeaks(peaks, annoData=annoData,bindingType ="startSite")
 
-#annoPeakTable <- ('test-data/ChIPPeak.csv')
-write.csv(anno, annoPeakTable, row.names = FALSE)
\ No newline at end of file
+write.table(anno, annoPeakTable, row.names = FALSE)
\ No newline at end of file