Mercurial > repos > testtool > anno_peak_figure
view annoPeakFigure/annoPeakFigure.R @ 4:57082662d2e5 draft
Uploaded
author | testtool |
---|---|
date | Fri, 17 Mar 2017 07:20:20 -0400 |
parents | 6bcf1f0bff41 |
children | 1de0d1429a3c |
line wrap: on
line source
require("ChIPseeker", quietly = TRUE) require("ChIPpeakAnno", quietly = TRUE) require("EnsDb.Hsapiens.v75", quietly = TRUE) options(warn = -1) options("download.file.method"="wget") args <- commandArgs(trailingOnly = TRUE) DMR = args[1] annoPeakFigure = args[2] #DMR <- ("test-data/DMR.bed") DMRInfo = read.table( DMR, header = FALSE, sep = "\t", stringsAsFactors = FALSE, quote = "" ) peaks <- GRanges(seqnames = DMRInfo[, 1], ranges = IRanges (start = DMRInfo[, 2], end = DMRInfo[, 3])) annoData <- toGRanges(EnsDb.Hsapiens.v75) seqlevelsStyle(peaks) <- seqlevelsStyle(annoData) anno <- annoPeaks(peaks, annoData=annoData,bindingType ="startSite") #annoPeakFigure <- ('test-data/annoPie.png') png(file = annoPeakFigure, width = 1200, height = 600) pie1(table(anno$insideFeature)) dev.off()