Mercurial > repos > rnateam > chipseeker
changeset 7:1b9a9409831d draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chipseeker commit e07ee851144e07fde91877727d6a39a1906f7639
author | rnateam |
---|---|
date | Sat, 27 Apr 2019 11:04:35 -0400 |
parents | b418a1d3585d |
children | 8bd92f2404dd |
files | chipseeker.R chipseeker.xml |
diffstat | 2 files changed, 18 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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 @@ -<tool id="chipseeker" name="ChIPseeker" version="1.18.0"> +<tool id="chipseeker" name="ChIPseeker" version="1.18.0+galaxy1"> <description>for ChIP peak annotation and visualization</description> <requirements> <requirement type="package" version="1.18.0">bioconductor-chipseeker</requirement> @@ -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 @@ </command> <inputs> <param name="peaks" type="data" format="bed,interval,tabular" label="Peaks file" help="A peaks file in BED format." /> + <param name="header" type="boolean" truevalue="True" falsevalue="False" checked="False" label="Peaks file has header?" help="If this option is set to Yes, the tool will assume that the peak file has column headers in the first row. Default: No" /> <conditional name="gtf_source"> <param name="gtf_source_select" type="select" label="Annotation source" help="Select a GTF to use for annotation source."> <option value="cached" selected="true">Use a built-in GTF</option> @@ -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