# HG changeset patch # User rnateam # Date 1556377475 14400 # Node ID 1b9a9409831d72bfec6b768cff82839732540dfb # Parent b418a1d3585dc47b2fb67be2c4ea87a400c536f2 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chipseeker commit e07ee851144e07fde91877727d6a39a1906f7639 diff -r b418a1d3585d -r 1b9a9409831d chipseeker.R --- a/chipseeker.R Wed Mar 13 03:05:16 2019 -0400 +++ b/chipseeker.R Sat Apr 27 11:04:35 2019 -0400 @@ -12,6 +12,7 @@ option_list <- list( make_option(c("-i","--infile"), type="character", help="Peaks file to be annotated"), + make_option(c("-H","--header"), type="logical", help="Peaks file contains header row"), make_option(c("-G","--gtf"), type="character", help="GTF to create TxDb."), make_option(c("-u","--upstream"), type="integer", help="TSS upstream region"), make_option(c("-d","--downstream"), type="integer", help="TSS downstream region"), @@ -51,7 +52,13 @@ ignoreDownstream <- FALSE } -peaks <- readPeakFile(peaks) +if (!is.null(args$header)) { + header <- TRUE +} else { + header <- FALSE +} + +peaks <- readPeakFile(peaks, header=header) # Make TxDb from GTF txdb <- makeTxDbFromGFF(gtf, format="gtf") @@ -93,11 +100,14 @@ if (!is.null(args$plots)) { pdf("out.pdf", width=14) plotAnnoPie(peakAnno) - plotAnnoBar(peakAnno) + p1 <- plotAnnoBar(peakAnno) + print(p1) vennpie(peakAnno) upsetplot(peakAnno) - plotDistToTSS(peakAnno, title="Distribution of transcription factor-binding loci\nrelative to TSS") + p2 <- plotDistToTSS(peakAnno, title="Distribution of transcription factor-binding loci\nrelative to TSS") + print(p2) dev.off() + rm(p1, p2) } ## Output RData file diff -r b418a1d3585d -r 1b9a9409831d chipseeker.xml --- a/chipseeker.xml Wed Mar 13 03:05:16 2019 -0400 +++ b/chipseeker.xml Sat Apr 27 11:04:35 2019 -0400 @@ -1,4 +1,4 @@ - + for ChIP peak annotation and visualization bioconductor-chipseeker @@ -22,6 +22,7 @@ Rscript '$__tool_directory__/chipseeker.R' -i '$peaks' + -H $header -G '$gtf' -u $adv.upstream -d $adv.downstream @@ -51,6 +52,7 @@ + @@ -189,7 +191,7 @@ **Inputs** -A peaks file in BED, Interval or Tabular format e.g from MACS2 or DiffBind. +A peaks file in BED, Interval or Tabular format e.g from MACS2 or DiffBind. Note that there is an option to specify if the input peaks file has a header row. No header row is assumed by default, which is usually the case for BED format e.g. MACS narrowpeak, however other formats e.g. MACS tabular format, may contain a header row. Example: @@ -212,7 +214,7 @@ This tool outputs * a file of annotated peaks in Interval or Tabular format - * a PDF of plots (plotAnnoPie, vennpie, upsetplot) + * a PDF of plots (plotAnnoPie, plotAnnoBar, vennpie, upsetplot, plotDistToTSS) Optionally, you can choose to output