comparison toolfactory/tfout/plotter.xml @ 4:2a46da701dde draft

Uploaded
author fubar
date Mon, 26 Apr 2021 05:25:26 +0000
parents
children
comparison
equal deleted inserted replaced
3:c4f192ec521c 4:2a46da701dde
1 <tool name="plotter" id="plotter" version="0.01">
2 <!--Source in git at: https://github.com/fubar2/toolfactory-->
3 <!--Created by planemo@galaxyproject.org at 31/03/2021 10:58:49 using the Galaxy Tool Factory.-->
4 <description>Makes random plots</description>
5 <requirements>
6 <requirement version="" type="package">r-base</requirement>
7 </requirements>
8 <stdio>
9 <exit_code range="1:" level="fatal"/>
10 </stdio>
11 <expand macro="stdio"/>
12 <version_command><![CDATA[echo "0.01"]]></version_command>
13 <command><![CDATA[Rscript
14 $runme
15 "$nplot"]]></command>
16 <configfiles>
17 <configfile name="runme"><![CDATA[
18 \# demo
19 args = commandArgs(trailingOnly=TRUE)
20 if (length(args)==0) {
21 n_plots = 3
22 } else {
23 n_plots = as.integer(args[1]) }
24 dir.create('plots')
25 for (i in 1:n_plots) {
26 foo = runif(100)
27 bar = rnorm(100)
28 bar = foo + 0.05*bar
29 pdf(paste('plots/yet',i,"anotherplot.pdf",sep='_'))
30 plot(foo,bar,main=paste("Foo by Bar plot \#",i),col="maroon", pch=3,cex=0.6)
31 dev.off()
32 foo = data.frame(a=runif(100),b=runif(100),c=runif(100),d=runif(100),e=runif(100),f=runif(100))
33 bar = as.matrix(foo)
34 pdf(paste('plots/yet',i,"anotherheatmap.pdf",sep='_'))
35 heatmap(bar,main='Random Heatmap')
36 dev.off()
37 }
38
39 ]]></configfile>
40 </configfiles>
41 <inputs>
42 <param name="nplot" type="text" value="3" label="Number of random plots pairs to draw" help=""/>
43 </inputs>
44 <outputs>
45 <collection name="plots" type="list" label="Plots">
46 <discover_datasets pattern="__name_and_ext__" directory="plots" visible="false"/>
47 </collection>
48 </outputs>
49 <tests>
50 <test>
51 <param name="nplot" value="3"/>
52 <output_collection name="plots"/>
53 </test>
54 </tests>
55 <help><![CDATA[
56
57 **What it Does**
58
59 Makes plots into a collection demonstration
60
61
62
63 ------
64
65
66 Script::
67
68 # demo
69 args = commandArgs(trailingOnly=TRUE)
70 if (length(args)==0) {
71 n_plots = 3
72 } else {
73 n_plots = as.integer(args[1]) }
74 dir.create('plots')
75 for (i in 1:n_plots) {
76 foo = runif(100)
77 bar = rnorm(100)
78 bar = foo + 0.05*bar
79 pdf(paste('plots/yet',i,"anotherplot.pdf",sep='_'))
80 plot(foo,bar,main=paste("Foo by Bar plot #",i),col="maroon", pch=3,cex=0.6)
81 dev.off()
82 foo = data.frame(a=runif(100),b=runif(100),c=runif(100),d=runif(100),e=runif(100),f=runif(100))
83 bar = as.matrix(foo)
84 pdf(paste('plots/yet',i,"anotherheatmap.pdf",sep='_'))
85 heatmap(bar,main='Random Heatmap')
86 dev.off()
87 }
88
89 ]]></help>
90 <citations>
91 <citation type="doi">10.1093/bioinformatics/bts573</citation>
92 </citations>
93 </tool>
94