Mercurial > repos > mingchen0919 > dynamic_tool_test
comparison dynamic_tool_wrappers_macros.xml @ 0:b49e227ec738 draft default tip
planemo upload commit fe1408d418f7f1354a736f73ece704219baa3190
author | mingchen0919 |
---|---|
date | Wed, 21 Mar 2018 17:26:27 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b49e227ec738 |
---|---|
1 <macros> | |
2 | |
3 <xml name="rmarkdown_requirements"> | |
4 <requirement type="package" version="1.15.0.6-0">pandoc</requirement> | |
5 <requirement type="package" version="1.20.0">r-getopt</requirement> | |
6 <requirement type="package" version="1.6">r-rmarkdown</requirement> | |
7 </xml> | |
8 | |
9 <xml name="stdio"> | |
10 <stdio> | |
11 <regex match="XXX" source="stderr" level="warning" | |
12 description="Check the tool log output file for more details."/> | |
13 </stdio> | |
14 </xml> | |
15 | |
16 <!--Tool name--> | |
17 <xml name="tool_name"> | |
18 <param type="select" name="tool_name" multiple="false" label="Tool name"> | |
19 <option value="fastqc" selected="false">fastqc</option> | |
20 </param> | |
21 </xml> | |
22 | |
23 <!--OPTION/ARGUMENT PAIRS and INPUT types--> | |
24 <!--input files--> | |
25 <xml name="option_argument_one_dataset"> | |
26 <repeat name="option_argument_one_dataset_repeat" title="OPTION and ARGUMENT: input one dataset" min="0" default="0"> | |
27 <param type="text" name="flag" optional="true" label="flag" /> | |
28 <param name="one_dataset" type="data" optional="true" multiple="false" label="value"/> | |
29 </repeat> | |
30 </xml> | |
31 <xml name="option_argument_multiple_datasets"> | |
32 <repeat name="option_argument_multiple_datasets_repeat" title="OPTION and ARGUMENT: input multiple datasets" min="0" default="0"> | |
33 <param type="text" name="flag" optional="true" label="flag" /> | |
34 <param name="multiple_datasets" type="data" optional="true" multiple="true" label="value" /> | |
35 </repeat> | |
36 </xml> | |
37 <xml name="option_argument_path_relative_to_upstream_tool"> | |
38 <repeat name="option_argument_path_relative_to_upstream_tool_repeat" title="OPTION and ARGUMENT: path relative to upstream tool" min="0" default="0"> | |
39 <param type="text" name="flag" optional="true" label="flag" /> | |
40 <param name="upstream_tool_output_dir" type="data" optional="true" multiple="false" label="upstream tool output directory"/> | |
41 <param type="text" name="option_argument_path" optional="true" label="value" /> | |
42 </repeat> | |
43 </xml> | |
44 | |
45 <!--input values: string, float and integer--> | |
46 <xml name="option_argument_string"> | |
47 <repeat name="option_argument_string_repeat" title="OPTION and ARGUMENT: input string" min="0" default="0"> | |
48 <param type="text" name="flag" label="flag" /> | |
49 <param type="text" name="option_argument_string" label="value" /> | |
50 </repeat> | |
51 </xml> | |
52 <xml name="option_argument_float"> | |
53 <repeat name="option_argument_float_repeat" title="OPTION and ARGUMENT: input float" min="0" default="0"> | |
54 <param type="text" name="flag" label="flag" /> | |
55 <param type="text" name="option_argument_float" label="value" /> | |
56 </repeat> | |
57 </xml> | |
58 <xml name="option_argument_integer"> | |
59 <repeat name="option_argument_integer_repeat" title="OPTION and ARGUMENT: input integer" min="0" default="0"> | |
60 <param type="text" name="flag" label="flag" /> | |
61 <param type="text" name="option_argument_integer" label="value" /> | |
62 </repeat> | |
63 </xml> | |
64 | |
65 <!--output set--> | |
66 <xml name="output_set"> | |
67 <data format="html" name="report" label="${tool.name} report"/> | |
68 <data format="txt" name="tool_help_doc" label="${tool.name} help doc"/> | |
69 <data format="txt" name="tool_output_dir" label="${tool.name} output directory"/> | |
70 <data format="txt" name="tool_log" label="${tool.name} log" from_work_dir="tool_log.txt"/> | |
71 </xml> | |
72 | |
73 | |
74 <!--shell command fragment--> | |
75 <xml name="shell_command"> | |
76 <command><![CDATA[ | |
77 export TOOL_DIR='${__tool_directory__}' && | |
78 | |
79 Rscript '${__tool_directory__}/dynamic_tool_render.R' | |
80 | |
81 ############ tool_name | |
82 -t '$tool_name' | |
83 | |
84 ############ option_argument_one_dataset | |
85 #set sep = '' | |
86 #set one_dataset_items = '' | |
87 #for i in $option_argument_one_dataset_repeat: | |
88 #set one_dataset_items += $sep + $option_argument_one_dataset_repeat.flag + " " + $option_argument_one_dataset_repeat.value + "'" | |
89 #### separate values set by repeat | |
90 $set sep = '|' | |
91 #end for | |
92 | |
93 -o '$one_dataset_items' | |
94 | |
95 | |
96 | |
97 ############ option_argument_multiple_datasets | |
98 #set sep = '' | |
99 #set multiple_datasets_items = '' | |
100 #for i in $option_argument_multiple_datasets_repeat: | |
101 #set multiple_datasets_items += $sep + $option_argument_multiple_datasets_repeat.flag + " " + $option_argument_multiple_datasets_repeat.value + "'" | |
102 #### separate values set by repeat | |
103 $set sep = '|' | |
104 #end for | |
105 | |
106 -m '$multiple_datasets_items' | |
107 | |
108 | |
109 ############ option_argument_path_relative_to_upstream_tool | |
110 #set sep = '' | |
111 #set path_relative_to_upstream_tool_items = '' | |
112 #for i in $option_argument_path_relative_to_upstream_tool_repeat: | |
113 #set path_relative_to_upstream_tool_items += $sep + $option_argument_path_relative_to_upstream_tool_repeat.flag + " " + $option_argument_path_relative_to_upstream_tool_repeat.value + "'" | |
114 #### separate values set by repeat | |
115 $set sep = '|' | |
116 #end for | |
117 | |
118 -u '$path_relative_to_upstream_tool_items' | |
119 | |
120 | |
121 | |
122 ############ option_argument_string | |
123 #set sep = '' | |
124 #set string_items = '' | |
125 #for i in $option_argument_string_repeat: | |
126 #set string_items += $sep + $option_argument_string_repeat.flag + " " + $option_argument_string_repeat.value + "'" | |
127 #### separate values set by repeat | |
128 $set sep = '|' | |
129 #end for | |
130 | |
131 -s '$string_items' | |
132 | |
133 | |
134 ############ option_argument_float | |
135 #set sep = '' | |
136 #set float_items = '' | |
137 #for i in $option_argument_float_repeat: | |
138 #set float_items += $sep + $option_argument_float_repeat.flag + " " + $option_argument_float_repeat.value + "'" | |
139 #### separate values set by repeat | |
140 $set sep = '|' | |
141 #end for | |
142 | |
143 -f '$float_items' | |
144 | |
145 ############ option_argument_integer | |
146 #set sep = '' | |
147 #set integer_items = '' | |
148 #for i in $option_argument_integer_repeat: | |
149 #set integer_items += $sep + $option_argument_integer_repeat.flag + " " + $option_argument_integer_repeat.value + "'" | |
150 #### separate values set by repeat | |
151 $set sep = '|' | |
152 #end for | |
153 | |
154 -i '$integer_items' | |
155 | |
156 | |
157 ############ output_set | |
158 -R '$report' | |
159 -D '$report.files_path' | |
160 -H '$tool_help_doc' | |
161 -O '$tool_output_dir' | |
162 -L '$tool_log' | |
163 | |
164 ]]></command> | |
165 </xml> | |
166 | |
167 <!--tool citations--> | |
168 <xml name="citations"> | |
169 <citation type="bibtex"><![CDATA[ | |
170 @article{allaire2016rmarkdown, | |
171 title={rmarkdown: Dynamic Documents for R, 2016}, | |
172 author={Allaire, J and Cheng, Joe and Xie, Yihui and McPherson, Jonathan and Chang, Winston and Allen, Jeff | |
173 and Wickham, Hadley and Atkins, Aron and Hyndman, Rob}, | |
174 journal={R package version 0.9}, | |
175 volume={6}, | |
176 year={2016} | |
177 } | |
178 ]]></citation> | |
179 <citation type="bibtex"><![CDATA[ | |
180 @book{xie2015dynamic, | |
181 title={Dynamic Documents with R and knitr}, | |
182 author={Xie, Yihui}, | |
183 volume={29}, | |
184 year={2015}, | |
185 publisher={CRC Press} | |
186 } | |
187 ]]></citation> | |
188 </xml> | |
189 </macros> |