Mercurial > repos > testtool > anno_peak_figure
comparison annoPeakFigure/annoPeakFigure.R @ 5:1de0d1429a3c draft default tip
Uploaded
author | testtool |
---|---|
date | Mon, 20 Mar 2017 06:49:22 -0400 |
parents | 57082662d2e5 |
children |
comparison
equal
deleted
inserted
replaced
4:57082662d2e5 | 5:1de0d1429a3c |
---|---|
1 require("ChIPseeker", quietly = TRUE) | 1 require("ChIPseeker", quietly = TRUE) |
2 require("ChIPpeakAnno", quietly = TRUE) | 2 require("ChIPpeakAnno", quietly = TRUE) |
3 require("EnsDb.Hsapiens.v75", quietly = TRUE) | 3 require("EnsDb.Hsapiens.v75", quietly = TRUE) |
4 require("data.table", quietly = TRUE) | |
4 | 5 |
5 options(warn = -1) | 6 options(warn = -1) |
6 options("download.file.method"="wget") | 7 options("download.file.method"="wget") |
7 | 8 |
8 args <- commandArgs(trailingOnly = TRUE) | 9 args <- commandArgs(trailingOnly = TRUE) |
9 DMR = args[1] | 10 DMR = args[1] |
10 annoPeakFigure = args[2] | 11 annoPeakFigure = args[2] |
11 | 12 |
12 #DMR <- ("test-data/DMR.bed") | 13 DMRInfo = fread( |
13 DMRInfo = read.table( | |
14 DMR, | 14 DMR, |
15 header = FALSE, | 15 header = FALSE, |
16 sep = "\t", | 16 sep = "\t", |
17 stringsAsFactors = FALSE, | 17 stringsAsFactors = FALSE, |
18 quote = "" | 18 quote = "" |
23 (start = DMRInfo[, 2], end = DMRInfo[, 3])) | 23 (start = DMRInfo[, 2], end = DMRInfo[, 3])) |
24 | 24 |
25 annoData <- toGRanges(EnsDb.Hsapiens.v75) | 25 annoData <- toGRanges(EnsDb.Hsapiens.v75) |
26 seqlevelsStyle(peaks) <- seqlevelsStyle(annoData) | 26 seqlevelsStyle(peaks) <- seqlevelsStyle(annoData) |
27 | 27 |
28 | |
28 anno <- annoPeaks(peaks, annoData=annoData,bindingType ="startSite") | 29 anno <- annoPeaks(peaks, annoData=annoData,bindingType ="startSite") |
29 | 30 |
30 #annoPeakFigure <- ('test-data/annoPie.png') | |
31 | 31 |
32 png(file = annoPeakFigure, | 32 png(file = annoPeakFigure, |
33 width = 1200, | 33 width = 1200, |
34 height = 600) | 34 height = 600) |
35 | 35 |