comparison ChIPseeker_test2.R @ 0:c1eac77337ae draft

planemo upload for repository https://github.com/kpbioteam/ChIPseeker_test2
author kpbioteam
date Mon, 09 Apr 2018 07:00:57 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c1eac77337ae
1 require(ChIPseeker,quiet=TRUE)
2 require(TxDb.Mmusculus.UCSC.mm9.knownGene,quiet=TRUE)
3 require(org.Mm.eg.db,quiet=TRUE)
4
5 options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } )
6
7 # we need that to not crash galaxy with an UTF8 error on German LC settings.
8 loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8")
9
10 args <- commandArgs(trailingOnly = TRUE)
11
12 input = args[1]
13 output1 = args[2]
14 output2 = args[3]
15
16 #output4 = args[5]
17
18 txdb<- TxDb.Mmusculus.UCSC.mm9.knownGene
19
20 peakAnno <- annotatePeak(input, tssRegion=c(-5000, 5000),
21 TxDb=txdb, annoDb="org.Mm.eg.db")
22
23
24
25 write.table(as.data.frame(peakAnno),file=output1,row.names=FALSE,sep="\t")
26
27 pdf(file=output2)
28 plotAnnoPie(peakAnno)
29 dev.off()
30