comparison annotate_peak/annotatePeak.R @ 15:53df7871db21 draft

Uploaded
author testtool
date Thu, 16 Mar 2017 11:03:24 -0400
parents 4a489b0d247f
children ee3fc24b2108
comparison
equal deleted inserted replaced
14:4a489b0d247f 15:53df7871db21
1 options(warn = -1) 1 options(warn = -1)
2 args <- commandArgs(trailingOnly = TRUE) 2 args <- commandArgs(trailingOnly = TRUE)
3 DMR = args[1] 3 DMR = args[1]
4 annoPeakTable = args[2] 4 annoPeakTable = args[2]
5 5
6 DMR <- ("test-data/DMR.bed") 6 #DMR <- ("test-data/DMR.bed")
7 DMRInfo = read.table( 7 DMRInfo = read.table(
8 DMR, 8 DMR,
9 header = FALSE, 9 header = FALSE,
10 sep = "\t", 10 sep = "\t",
11 stringsAsFactors = FALSE, 11 stringsAsFactors = FALSE,
26 ## keep the seqnames in the same style 26 ## keep the seqnames in the same style
27 seqlevelsStyle(peaks) <- seqlevelsStyle(annoData) 27 seqlevelsStyle(peaks) <- seqlevelsStyle(annoData)
28 ## do annotation by nearest TSS 28 ## do annotation by nearest TSS
29 anno <- annotatePeakInBatch(peaks, AnnotationData=annoData) 29 anno <- annotatePeakInBatch(peaks, AnnotationData=annoData)
30 anno[1:2] 30 anno[1:2]
31 annoPeakTable <- ('test-data/ChIPPeak.csv') 31 #annoPeakTable <- ('test-data/ChIPPeak.csv')
32 write.csv(anno, annoPeakTable, row.names = FALSE) 32 write.csv(anno, annoPeakTable, row.names = FALSE)
33 33
34 34