comparison circgraph.xml @ 0:ef5f8bbf7730 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/circos commit a41493893bdcbe330434db9c5851719012b62fa8
author iuc
date Wed, 09 Aug 2017 09:52:52 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:ef5f8bbf7730
1 <?xml version="1.0"?>
2 <tool id="circgraph" name="Circos Builder" version="@WRAPPER_VERSION@">
3 <description>creates circos plots from standard bioinformatics datatypes.</description>
4 <macros>
5 <import>macros.xml</import>
6 <import>macros_conffiles.xml</import>
7 </macros>
8 <expand macro="requirements"/>
9 <version_command>circos --version</version_command>
10 <command detect_errors="aggressive"><![CDATA[
11 ## Directory structure
12 mkdir -p circos/conf/ circos/data/ &&
13
14 #if $reference_genome.reference_genome_source == 'history':
15 ln -s '$reference_genome.genome_fasta' genomeref.fa &&
16 #end if
17
18 #if $reference_genome.reference_genome_source != 'karyotype':
19 ## Process the karyotype.txt file
20 python '$__tool_directory__/fasta-to-karyotype.py'
21
22 #if str($reference_genome.reference_genome_source) == 'cached':
23 '${reference_genome.fasta_indexes.fields.path}'
24 #else if str($reference_genome.reference_genome_source) == 'history':
25 genomeref.fa
26 #end if
27
28 #if $reference_genome.bands:
29 '${reference_genome.bands}'
30 #end if
31 > circos/conf/karyotype.txt &&
32 #else
33 cp $reference_genome.input_karyotype circos/conf/karyotype.txt &&
34 #end if
35
36 mv '$circos_conf' circos/conf/circos.conf &&
37 mv '$ticks_conf' circos/conf/ticks.conf &&
38 mv '$ideogram_conf' circos/conf/ideogram.conf &&
39 mv '$data_conf' circos/conf/2d.conf &&
40 mv '$links_conf' circos/conf/links.conf &&
41 mv '$test_case_conf' circos/conf/galaxy_test_case.xml &&
42
43 ## 2D Data Plots
44 #for $hi, $data in enumerate($sec_tdd.data):
45 #if str($data.plot_format.plot_format_select) == 'tile':
46 python '$__tool_directory__/unified-tiles.py'
47 '${data.plot_format.data_source}' '${data.plot_format.data_source.ext}'
48 > circos/data/data-${hi}.txt &&
49 #else:
50 python $__tool_directory__/unified-histogram.py
51 $data.plot_format.plot_format_select
52 #if str($data.plot_format.plot_format_select) in ('histogram', 'heatmap'):
53 #for $fi, $file in enumerate($data.plot_format.data_source):
54 '${file}' '${file.ext}'
55 #end for
56 #else:
57 '${data.plot_format.data_source}' '${data.plot_format.data_source.ext}'
58 #end if
59 > circos/data/data-${hi}.txt &&
60 #end if
61 #end for
62
63 ## Link Tracks
64 #for $hi, $data in enumerate($sec_links.data):
65 cp '${data.data_source}' circos/data/links-${hi}.txt &&
66 #end for
67
68 tar cvfz circos.tar.gz circos &&
69
70 circos -conf circos/conf/circos.conf
71 ]]></command>
72 <configfiles>
73 <expand macro="configfile_circos_conf" />
74 <expand macro="configfile_ticks_conf" />
75 <expand macro="configfile_ideogram_conf" />
76 <expand macro="configfile_data_conf" />
77 <expand macro="configfile_links_conf" />
78 <expand macro="test_case" />
79 </configfiles>
80 <inputs>
81 <conditional name="reference_genome">
82 <param name="reference_genome_source" type="select" label="Reference Genome">
83 <option value="history" selected="True">From History</option>
84 <option value="cached">Locally Cached</option>
85 <option value="karyotype">Karyotype</option>
86 </param>
87 <when value="cached">
88 <param name="fasta_indexes" type="select" label="Source FASTA Sequence">
89 <options from_data_table="all_fasta"/>
90 </param>
91 <!-- TODO: multiple band files? -->
92 <param name="bands" type="data" format="bed6,bed12" optional="true" label="Cytogenetic Bands"
93 help="If defined, will display cytogenetic bands as part of the karyotype configuration"/>
94 </when>
95 <when value="history">
96 <param name="genome_fasta" type="data" format="fasta" label="Source FASTA Sequence"/>
97 <!-- TODO: multiple band files? -->
98 <param name="bands" type="data" format="bed6,bed12" optional="true" label="Cytogenetic Bands"
99 help="If defined, will display cytogenetic bands as part of the karyotype configuration"/>
100 </when>
101 <when value="karyotype">
102 <param name="input_karyotype" type="data" format="tabular,txt" label="Karyotype Configuration"/>
103 </when>
104 </conditional>
105
106 <section name="ideogram" title="Ideogram Configuration (Genome/Chromosomes)">
107 <param name="spacing" type="float" value="0.005" label="Spacing Between Ideograms"/>
108 <param name="radius" type="float" value="0.90" label="Radius"/>
109 <param name="thickness" type="float" value="10" label="Thickness"/>
110
111 <section name="ideogram_labels" title="Labels">
112 <param name="show_label" type="boolean" truevalue="yes" falsevalue="no" label="Show Label"/>
113 <!--<param type="float" value="0.95" label="Radius" name="radius"/>-->
114 <!--<param type="float" value="10" label="Thickness" name="thickness"/>-->
115 <param name="parallel" type="boolean" label="Parallel" truevalue="yes" falsevalue="no"
116 help="When set to yes/true, labels will be perpendicular to the tangent of the circle at the location of the label. Otherwise, they will be parallel with the tangent of the circle"/>
117 </section>
118 </section>
119
120 <section name="ticks" title="Ticks">
121 <param name="show_ticks" type="boolean" truevalue="yes" falsevalue="no" label="Show Ticks"/>
122 <!--<param type="boolean" label="Show Tick Labels" name="show_tick_labels" truevalue="true" falsevalue="false" />-->
123 <param name="radius" type="float" value="1.0" label="Radius"/>
124 <expand macro="circos_color"/>
125 <param name="multiplier" type="float" value="1e-3" label="Multiplier"
126 help="1e-3 means your tick spacing will be in kb (tick spacing of 5000 = every 5kb, labels will read '5kb'). 1e-6 means mb."/>
127
128 <repeat name="tick_group" title="Tick Group">
129 <param name="spacing" type="float" value="5000" label="Tick Spacing" help="Number of bases"/>
130 <param name="size" type="float" value="10" label="Tick Size"/>
131 <param name="show_tick_labels" type="boolean" truevalue="yes" falsevalue="no" label="Show Tick Labels"/>
132 <param name="label_size" type="float" value="20" label="Label Size"/>
133 <param name="label_offset" type="float" value="10" label="Label Offset"/>
134 <param name="format" type="select" label="Label Format">
135 <option value="%d" selected="True">Integer</option>
136 <option value="%f">Float</option>
137 <option value="%.1f">Float (one decimal)</option>
138 <option value="%.2f">Float (two decimals)</option>
139 <sanitizer>
140 <valid>
141 <add value="%" />
142 </valid>
143 </sanitizer>
144 </param>
145 </repeat>
146
147 </section>
148
149 <section name="sec_tdd" title="2D Data">
150 <repeat name="data" title="2D Data Plot">
151 <!-- Positioning -->
152 <param name="r1" type="float" value="0.89" label="Outside Radius"/>
153 <param name="r0" type="float" value="0.8" label="Inside Radius"/>
154 <param name="orientation" type="boolean" label="Orient Inwards" truevalue="in" falsevalue="out"
155 help="When yes/true, the plot will face inwards. I.e. lowest values will be to the outside"/>
156
157 <conditional name="plot_format">
158 <param name="plot_format_select" type="select" label="Plot Format">
159 <option value="histogram" selected="True">Histogram</option>
160 <option value="heatmap">Heatmap</option>
161 <option value="line">Line</option>
162 <option value="scatter">Scatter</option>
163 <option value="tile">Tiles</option>
164 </param>
165 <when value="histogram">
166 <param name="data_source" type="data" format="bed6,bed12,wig,gff3" label="Histogram Data Source"
167 multiple="True" help="If multiple files are selected, they will be treated as a stacked histogram"/>
168 <section name="format_specific" title="Plot Format Specific Options">
169 <expand macro="brewer_scale" label="Fill Color" name="fill_color"/>
170 <param name="extend_bins" type="boolean" label="Join non-abutting Bins" truevalue="yes" falsevalue="no"
171 help="Join histogram bins that do not touch (abut)" />
172 </section>
173 </when>
174 <when value="heatmap">
175 <param name="data_source" type="data" format="bed6,bed12,wig,gff3" label="Heatmap Data Source"
176 multiple="True" help="If multiple files are selected, they will be plotted alongside each other radially"/>
177 <section name="format_specific" title="Plot Format Specific Options">
178 <expand macro="brewer_scale" label="Fill Color" name="fill_color"/>
179 <param name="scale_log_base" type="float" value="1.0" label="Scale Log Base"
180 help="If scale_log_base&lt;1, the dynamic range of color mapping of small values will be increased. If scale_log_base&gt;1, then dynamic range of large values will be increased."/>
181 </section>
182 </when>
183 <when value="line">
184 <param name="data_source" type="data" format="bed6,bed12,wig,gff3" label="Line Data Source"/>
185 <section name="format_specific" title="Plot Format Specific Options">
186 <expand macro="circos_color" label="Stroke Color" name="color" value="#000000"/>
187 <param name="thickness" type="integer" value="0" label="Stroke Thickness"/>
188 </section>
189 </when>
190 <when value="scatter">
191 <param name="data_source" type="data" format="bed6,bed12,wig,gff3" label="Scatter Plot Data Source"/>
192 <section name="format_specific" title="Plot Format Specific Options">
193 <!-- glyph, glyph_size, min, max -->
194 <param name="glyph" type="select" label="Glyph">
195 <option value="circle">Circle</option>
196 <option value="triangle">Triangle</option>
197 <option value="rectangle">Rectangle</option>
198 </param>
199 <param name="glyph_size" type="integer" value="8" label="Glyph Size"/>
200 <param name="data_min" type="float" value="0.0" label="Data Minimum" help="Minimum value of the range of the plot axis, data outside this range are clipped." />
201 <param name="data_max" type="float" value="1.0" label="Data Maximum" help="Maximum value of the range of the plot axis, data outside this range are clipped." />
202 <expand macro="circos_color" name="color" value="#555555" label="Color" />
203 <expand macro="circos_color" name="stroke_color" value="#000000" label="Stroke Color"/>
204 <param name="stroke_thickness" type="integer" value="0" label="Stroke Thickness"/>
205 </section>
206 </when>
207 <when value="tile">
208 <param name="data_source" type="data" format="bed6,bed12,gff3" label="Tile Data Source"
209 help="If your tile source features have scores in them, they will be used in colouration"/>
210 <section name="format_specific" title="Plot Format Specific Options">
211 <expand macro="brewer_scale" name="fill_color" label="Fill Color"/>
212 <expand macro="circos_color" name="color" value="#000000" label="Stroke Color"/>
213 <param name="stroke_thickness" type="integer" value="0" label="Stroke Thickness"/>
214 <param name="layers" type="integer" value="15" label="Layers"/>
215 <param name="thickness" type="float" value="15" label="Thickness" help="In pixels"/>
216 <param name="padding" type="float" value="8" label="Padding" help="In pixels"/>
217
218 <conditional name="overflow">
219 <param name="overflow_behavior" type="select" label="Overflow Behavior">
220 <option value="hide">Hide: overflow tiles are not drawn</option>
221 <option value="grow">Grow: new layers are added as required</option>
222 <option value="collapse">Collapse: overflow tiles are drawn on the first layer</option>
223 </param>
224 <when value="hide">
225 </when>
226 <when value="grow">
227 <expand macro="circos_color" name="layer_overflow_color" label="Layer Overflow Color"/>
228 </when>
229 <when value="collapse">
230 <expand macro="circos_color" name="layer_overflow_color" label="Layer Overflow Color"/>
231 </when>
232 </conditional>
233 </section>
234 </when>
235 </conditional>
236
237 <expand macro="rules" />
238 <expand macro="axes" />
239 <expand macro="backgrounds" />
240 </repeat>
241 </section>
242 <section name="sec_links" title="Link Tracks">
243 <repeat name="data" title="Link Data">
244 <!-- Positioning -->
245 <param name="radius" type="float" value="0.8" label="Inside Radius"
246 help="This is the radial position of the termination of the link; for relative values, if radius smaller than 1 then it is defined in terms of the inner ideogram radius, otherwise it is defined in terms of the outer ideogram radius" />
247 <param name="data_source" type="data" format="txt" label="Link Data Source" help="Select file with link data. Format: chr1 start1 end1 chr2 start2 end2" />
248 <conditional name="linktype">
249 <param name="ribbon" type="select" label="Link Type" help="">
250 <option value="no" selected="true">basic</option>
251 <option value="yes">ribbon</option>
252 </param>
253 <when value="yes">
254 <param name="twist" type="select" label="Twist Ribbon">
255 <option value="" selected="true">auto</option>
256 <option value="twist=yes">always</option>
257 <option value="flat=yes">never</option>
258 </param>
259 </when>
260 <when value="no"/>
261 </conditional>
262 <expand macro="circos_color" name="color" value="#000000" label="Link Color"/>
263 <param name="thickness" type="float" value="15" label="Thickness" help="In pixels"/>
264 <param name="bezier_radius" type="float" value="0.1" min="0" max="1" label="Bezier Radius"
265 help="The radial position of the third control point (in addition to the two positions defined by the link coordinates) used to draw the Bezier curve; if this parameter is 0 then straight lines will be used"/>
266
267 <section name="advanced" title="Advanced Settings">
268 <param name="zdepth" type="float" value="" optional="true" label="Z-depth"
269 help="Optional. Datasets with a higher z-depth value are drawn on top of data sets with a lower value. Only useful if plotting multiple link tracks"/>
270 <param name="crest" type="float" value="0.5" min="0" max="1" label="Crest"
271 help="Two additional Bezier control points can be set by using the crest parameter. When defined, points p3 and p4 are added. These points lie at the same angular position as the start and end link termini and have the radial position. In the crest=0 extreme, p3 and p4 are at the same position as p0,p1. In this case, crest has no effect. When crest=1, p3,p4 are at the radial position of p2, the control point set by bezier_radius"/>
272 <param name="bezier_radius_purity" type="float" value="0.75" min="0" max="1" label="Bezier Radius Purity"
273 help="The bezier_radius_purity adjusts the position of p2 for each link. The p2 control point will move along the line formed by the original p2 location and the intersection of p0-p1 and the bisecting radius. When purity = 1, p2' = p2. When purity = 0, p2' = midpoint(p0,p1)"/>
274 <conditional name="perturbation">
275 <param name="perturb" type="select" label="Perturb links?"
276 help="A set of parameters can be used to randomly adjust bezier_radius, bezier_radius_purity, and crest parameters to give the links a more disorganized, organic feel. By perturbing each link you can also show additional texture in the data among links which would have ordinarily overlapped. Each parameter's perturbation amount is defined as a pair of values - pmin,pmax. These are the minimum and maximum multipliers by which the value can be perturbed">
277 <option value="no" selected="true">no</option>
278 <option value="yes">yes</option>
279 </param>
280 <when value="yes">
281 <param name="perturb_crest_min" type="float" value="0.5" label="Crest min"
282 help="For example setting (min,max) = (0.5,1.2) will cause parameter to be randomly scaled between 50-120%"/>
283 <param name="perturb_crest_max" type="float" value="1.5" label="Crest max"
284 help="For example setting (min,max) = (0.5,1.2) will cause parameter to be randomly scaled between 50-120%"/>
285 <param name="perturb_bezier_radius_min" type="float" value="0.5" label="Bezier Radius min"
286 help="For example setting (min,max) = (0.5,1.2) will cause parameter to be randomly scaled between 50-120%"/>
287 <param name="perturb_bezier_radius_max" type="float" value="1.5" label="Bezier Radius max"
288 help="For example setting (min,max) = (0.5,1.2) will cause parameter to be randomly scaled between 50-120%"/>
289 <param name="perturb_bezier_radius_purity_min" type="float" value="0.5" label="Bezier Radius Purity min"
290 help="For example setting (min,max) = (0.5,1.2) will cause parameter to be randomly scaled between 50-120%"/>
291 <param name="perturb_bezier_radius_purity_max" type="float" value="1.5" label="Bezier Radius Purity max"
292 help="For example setting (min,max) = (0.5,1.2) will cause parameter to be randomly scaled between 50-120%"/>
293 </when>
294 <when value="no"/>
295 </conditional>
296 </section>
297 <expand macro="linkrules"/>
298 </repeat>
299 </section>
300 </inputs>
301 <outputs>
302 <data name="output_png" format="png" from_work_dir="circos.png" label="Circos Plot (png)"/>
303 <data name="output_svg" format="svg" from_work_dir="circos.svg" label="Circos Plot (svg)"/>
304 <data name="output_tar" format="tar.gz" from_work_dir="circos.tar.gz" label="Circos Conf Files"/>
305 </outputs>
306 <tests>
307 <test>
308 <param name="reference_genome|reference_genome_source" value="history"/>
309 <param name="reference_genome|genome_fasta" value="1/input.fa" />
310 <!-- ideograms -->
311 <param name="ideogram|spacing" value="0.005" />
312 <param name="ideogram|radius" value="0.9" />
313 <param name="ideogram|thickness" value="10.0" />
314 <param name="ideogram|ideogram_labels|show_label" value="yes" />
315 <param name="ideogram|ideogram_labels|parallel" value="no" />
316 <!-- Ticks -->
317 <param name="ticks|show_ticks" value="yes" />
318 <param name="ticks|radius" value="1.0" />
319 <param name="ticks|color" value="#17365d" />
320 <param name="ticks|multiplier" value="0.001" />
321 <param name="ticks|tick_group_0|tickspacing" value="5000.0" />
322 <param name="ticks|tick_group_0|size" value="20.0" />
323 <param name="ticks|tick_group_0|show_tick_labels" value="yes" />
324 <param name="ticks|tick_group_0|label_size" value="20.0" />
325 <param name="ticks|tick_group_0|label_offset" value="10.0" />
326 <param name="ticks|tick_group_0|label_format" value="%d" />
327 <param name="ticks|tick_group_1|tickspacing" value="500.0" />
328 <param name="ticks|tick_group_1|size" value="10.0" />
329 <param name="ticks|tick_group_1|show_tick_labels" value="no" />
330 <param name="ticks|tick_group_1|label_size" value="20.0" />
331 <param name="ticks|tick_group_1|label_offset" value="10.0" />
332 <param name="ticks|tick_group_1|label_format" value="%d" />
333 <!-- Data -->
334 <param name="sec_tdd|data_0|r0" value="0.8" />
335 <param name="sec_tdd|data_0|r1" value="0.89" />
336 <param name="sec_tdd|data_0|orientation" value="out" />
337 <param name="sec_tdd|data_0|plot_format|plot_format_select" value="histogram" />
338 <param name="sec_tdd|data_0|plot_format|data_source" value="1/0-0.wig" />
339 <param name="sec_tdd|data_0|plot_format|format_specific|fill_color" value="purples-13-seq" />
340 <param name="sec_tdd|data_0|plot_format|format_specific|extend_bins" value="no" />
341
342 <param name="sec_tdd|data_1|r0" value="0.7" />
343 <param name="sec_tdd|data_1|r1" value="0.79" />
344 <param name="sec_tdd|data_1|orientation" value="out" />
345 <param name="sec_tdd|data_1|plot_format|plot_format_select" value="tile" />
346 <param name="sec_tdd|data_1|plot_format|data_source" value="1/1.gff3" />
347 <param name="sec_tdd|data_1|plot_format|format_specific|fill_color" value="rdylgn-15-div" />
348 <param name="sec_tdd|data_1|plot_format|format_specific|color" value="#000000" />
349 <param name="sec_tdd|data_1|plot_format|format_specific|stroke_thickness" value="1" />
350 <param name="sec_tdd|data_1|plot_format|format_specific|layers" value="15" />
351 <param name="sec_tdd|data_1|plot_format|format_specific|thickness" value="15.0" />
352 <param name="sec_tdd|data_1|plot_format|format_specific|padding" value="8.0" />
353 <param name="sec_tdd|data_1|plot_format|format_specific|overflow|overflow_behavior" value="grow" />
354 <param name="sec_tdd|data_1|plot_format|format_specific|overflow|layer_overflow_color" value="#ffc000" />
355
356 <param name="sec_tdd|data_2|r0" value="0.6" />
357 <param name="sec_tdd|data_2|r1" value="0.69" />
358 <param name="sec_tdd|data_2|orientation" value="out" />
359 <param name="sec_tdd|data_2|plot_format|plot_format_select" value="scatter" />
360 <param name="sec_tdd|data_2|plot_format|data_source" value="1/2.wig" />
361 <param name="sec_tdd|data_2|plot_format|format_specific|glyph" value="triangle" />
362 <param name="sec_tdd|data_2|plot_format|format_specific|glyph_size" value="8" />
363 <param name="sec_tdd|data_2|plot_format|format_specific|data_min" value="0.0" />
364 <param name="sec_tdd|data_2|plot_format|format_specific|data_max" value="1.0" />
365 <param name="sec_tdd|data_2|plot_format|format_specific|color" value="#555555" />
366 <param name="sec_tdd|data_2|plot_format|format_specific|stroke_color" value="#000000" />
367 <param name="sec_tdd|data_2|plot_format|format_specific|stroke_thickness" value="0" />
368 <!-- Links -->
369 <param name="sec_links|data_0|radius" value="0.59" />
370 <param name="sec_links|data_0|data_source" value="1/links.txt" />
371 <param name="sec_links|data_0|linktype|ribbon" value="yes" />
372 <param name="sec_links|data_0|color" value="#9966ff" />
373 <param name="sec_links|data_0|bezier_radius" value="0.3" />
374 <param name="sec_links|data_0|sec_link_rule|rules_0|conditions_0|application|application_select" value="pos1" />
375 <param name="sec_links|data_0|sec_link_rule|rules_0|conditions_0|application|comparison|compare" value="lt" />
376 <param name="sec_links|data_0|sec_link_rule|rules_0|conditions_0|application|comparison|compval" value="25000" />
377 <param name="sec_links|data_0|sec_link_rule|rules_0|actions_0|action|action_select" value="color" />
378 <param name="sec_links|data_0|sec_link_rule|rules_0|actions_0|action|action_value" value="#ffcc00" />
379
380 <param name="sec_links|data_1|radius" value="0.45" />
381 <param name="sec_links|data_1|data_source" value="1/links2.txt" />
382 <param name="sec_links|data_1|linktype|ribbon" value="yes" />
383 <param name="sec_links|data_1|color" value="#42aa42" />
384 <param name="sec_links|data_1|bezier_radius" value="0" />
385
386 <!-- Outputs -->
387 <output name="output_png" file="1/output.png" compare="sim_size" delta="15000" ftype="png" />
388 <output name="output_svg" file="1/output.svg" compare="sim_size" ftype="svg" />
389 </test>
390 </tests>
391 <help><![CDATA[
392 Circos
393 ======
394
395 Circos is a software package for visualizing data and information. It visualizes data in a circular layout — this makes Circos ideal for exploring relationships between objects or positions. There are other reasons why a circular layout is advantageous, not the least being the fact that it is attractive.
396
397 Circos is ideal for creating publication-quality infographics and illustrations with a high data-to-ink ratio, richly layered data and pleasant symmetries. You have fine control each element in the figure to tailor its focus points and detail to your audience.
398
399 .. image:: $PATH_TO_IMAGES/circos-sample-panel.png
400 :alt: several example circos plots
401
402 For more information see the Circos documentation_.
403
404 .. _documentation: http://circos.ca/documentation/
405
406
407 ]]></help>
408 <expand macro="citations" />
409 </tool>