comparison chipseeker.xml @ 0:58ef4507ce5a draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/chipseeker commit 9324a8e21c41d62b461dce9c3c17df544e5cd0ce
author rnateam
date Thu, 24 May 2018 18:25:40 -0400
parents
children 95f779f4adb7
comparison
equal deleted inserted replaced
-1:000000000000 0:58ef4507ce5a
1 <tool id="chipseeker" name="ChIPseeker" version="1.14.2">
2 <description>for ChIP peak annotation and visualization</description>
3 <requirements>
4 <requirement type="package" version="1.14.2">bioconductor-chipseeker</requirement>
5 <requirement type="package" version="3.4.0">bioconductor-txdb.hsapiens.ucsc.hg38.knowngene</requirement>
6 <requirement type="package" version="3.2.2">bioconductor-txdb.hsapiens.ucsc.hg19.knowngene</requirement>
7 <requirement type="package" version="3.4.0">bioconductor-txdb.Mmusculus.UCSC.mm10.knownGene</requirement>
8 <requirement type="package" version="3.5.0">bioconductor-org.hs.eg.db</requirement>
9 <requirement type="package" version="3.5.0">bioconductor-org.mm.eg.db</requirement>
10 </requirements>
11 <version_command><![CDATA[
12 echo $(R --version | grep version | grep -v GNU)", ChIPseeker version" $(R --vanilla --slave -e "library(ChIPseeker); cat(sessionInfo()\$otherPkgs\$ChIPseeker\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", TxDb.Hsapiens.UCSC.hg38.knownGene version" $(R --vanilla --slave -e "library(TxDb.Hsapiens.UCSC.hg38.knownGene); cat(sessionInfo()\$otherPkgs\$TxDb.Hsapiens.UCSC.hg38.knownGene\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", TxDb.Hsapiens.UCSC.hg19.knownGene version" $(R --vanilla --slave -e "library(TxDb.Hsapiens.UCSC.hg19.knownGene); cat(sessionInfo()\$otherPkgs\$TxDb.Hsapiens.UCSC.hg19.knownGene\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", TxDb.Mmusculus.UCSC.mm10.knownGene version" $(R --vanilla --slave -e "library(TxDb.Mmusculus.UCSC.mm10.knownGene); cat(sessionInfo()\$otherPkgs\$TxDb.Mmusculus.UCSC.mm10.knownGene\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", org.Hs.eg.db version" $(R --vanilla --slave -e "library(org.Hs.eg.db); cat(sessionInfo()\$otherPkgs\$org.Hs.eg.db\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", org.Mm.eg.db version" $(R --vanilla --slave -e "library(org.Mm.eg.db); cat(sessionInfo()\$otherPkgs\$org.Mm.eg.db\$Version)" 2> /dev/null | grep -v -i "WARNING: ")
13 ]]></version_command>
14 <command detect_errors="exit_code"><![CDATA[
15 #if $rscript:
16 cp '${chipseeker_script}' '${out_rscript}' &&
17 #end if
18 Rscript '${chipseeker_script}'
19 ]]>
20 </command>
21 <configfiles>
22 <configfile name="chipseeker_script"><![CDATA[
23 options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } )
24
25 # we need that to not crash galaxy with an UTF8 error on German LC settings.
26 loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8")
27
28 suppressPackageStartupMessages(library(ChIPseeker))
29
30 genome <- "${genome}"
31
32 if (genome == "hg38") {
33 suppressPackageStartupMessages({
34 library(TxDb.Hsapiens.UCSC.hg38.knownGene)
35 library(org.Hs.eg.db)
36 })
37 txdb <- TxDb.Hsapiens.UCSC.hg38.knownGene
38 annodb <- "org.Hs.eg.db"
39 } else if (genome == "hg19") {
40 suppressPackageStartupMessages({
41 library(TxDb.Hsapiens.UCSC.hg19.knownGene)
42 library(org.Hs.eg.db)
43 })
44 txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
45 annodb <- "org.Hs.eg.db"
46 } else if (genome == "mm10") {
47 suppressPackageStartupMessages({
48 library(TxDb.Mmusculus.UCSC.mm10.knownGene)
49 library(org.Mm.eg.db)
50 })
51 txdb <- TxDb.Mmusculus.UCSC.mm10.knownGene
52 annodb <- "org.Mm.eg.db"
53 } else {
54 cat(paste("Genome not supported", genome))
55 }
56
57 peaks <- readPeakFile('$peaks_file')
58 peakAnno <- annotatePeak(peaks, TxDb=txdb, annoDb=annodb)
59 write.table(peakAnno, file='$out_tab', sep="\t", row.names=FALSE, quote=FALSE)
60
61 if (!is.null("${pdf}")) {
62 pdf("out.pdf", width=14)
63 plotAnnoPie(peakAnno)
64 plotAnnoBar(peakAnno)
65 vennpie(peakAnno)
66 upsetplot(peakAnno)
67 plotDistToTSS(peakAnno, title="Distribution of transcription factor-binding loci\nrelative to TSS")
68 dev.off()
69 }
70 ]]></configfile>
71 </configfiles>
72
73 <inputs>
74 <param name="peaks_file" type="data" format="bed" label="Peaks file" help="A peaks file in BED format." />
75 <param name="genome" type="select" label="Genome" help="Select the genome. Options are hg38, hg19 or mm10.">
76 <option value="hg38">hg38</option>
77 <option value="hg19">hg19</option>
78 <option value="mm10">mm10</option>
79 </param>
80
81 <param name="pdf" type="boolean" truevalue="True" falsevalue="" checked="True" label="Output a PDF file of plots?" help="Default: Yes" />
82 <param name="rscript" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="False" label="Output Rscript?" help="If this option is set to Yes, the Rscript used to annotate the IDs will be provided as a text file in the output. Default: No" />
83 </inputs>
84
85 <outputs>
86 <data name="out_tab" format="tabular" from_work_dir="out.tab" label="${tool.name} on ${on_string}: Annotated Peaks" />
87 <data name="out_plots" format="pdf" from_work_dir="out.pdf" label="${tool.name} on ${on_string}: Plots">
88 <filter>pdf</filter>
89 </data>
90 <data name="out_rscript" format="txt" from_work_dir="out_rscript.txt" label="${tool.name} on ${on_string}: Rscript">
91 <filter>rscript</filter>
92 </data>
93 </outputs>
94
95 <tests>
96 <!-- Ensure outputs work -->
97 <test expect_num_outputs="3">
98 <param name="peaks_file" value="in.diffbind" ftype="bed"/>
99 <param name="genome" value="hg19"/>
100 <param name="rscript" value="True"/>
101 <output name="out_tab" file="out.tab" />
102 <output name="out_plots" file="out.pdf" compare="sim_size"/>
103 <output name="out_rscript" >
104 <assert_contents>
105 <has_text_matching expression="peakAnno.*annotatePeak" />
106 </assert_contents>
107 </output>
108 </test>
109 </tests>
110 <help><![CDATA[
111
112 .. class:: infomark
113
114 **What it does**
115
116 ChIPseeker_ is a Bioconductor package for annotating ChIP-seq data analysis. See
117 the `ChIPseeker vignette`_ for more information.
118
119 -----
120
121 **Inputs**
122
123 A peaks file in BED format e.g from MACS2 or DiffBind.
124
125 -----
126
127 **Outputs**
128
129 This tool outputs
130
131 * a table of annotated peaks
132 * a PDF of plots
133 * the R script used by this tool
134
135 .. _ChIPseeker: https://bioconductor.org/packages/release/bioc/html/ChIPseeker.html
136 .. _`ChIPseeker vignette`: http://bioconductor.org/packages/release/bioc/vignettes/ChIPseeker/inst/doc/ChIPseeker.html
137
138 ]]></help>
139 <citations>
140 <citation type="doi">10.1093/bioinformatics/btv145</citation>
141 </citations>
142 </tool>