-
Notifications
You must be signed in to change notification settings - Fork 423
/
bandage_image.xml
124 lines (115 loc) · 5.31 KB
/
bandage_image.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<tool id="bandage_image" name="Bandage Image" version="@TOOL_VERSION@+galaxy4" profile="21.05">
<description>visualize de novo assembly graphs</description>
<macros>
<import>macros.xml</import>
</macros>
<expand macro="bio_tools"/>
<expand macro="requirements"/>
<expand macro="version_command"/>
<command detect_errors="exit_code"> <![CDATA[
ln -s '$input_file' input.gfa &&
@HEADLESS@
Bandage
image
input.gfa
'out.$output_format'
#if $height:
--height '$height'
#end if
#if $width:
--width '$width'
#end if
#if $fontsize:
--fontsize '$fontsize'
#end if
#if $nodewidth:
--nodewidth '$nodewidth'
#end if
$names
$lengths
]]></command>
<inputs>
<param name="input_file" type="data" format="gfa1,gfa2,fastg,txt" label="Graphical Fragment Assembly" help="Supports multiple assembly graph formats: LastGraph (Velvet), FASTG (SPAdes), Trinity.fasta, ASQG and GFA."/>
<param argument="--height" type="integer" min="1" value="1000" optional="True" label="Image height" help="If only height or width is set, the other will be determined automatically. If both are set, the image will be exactly that size. Default: 1000."/>
<param argument="--width" type="integer" min="1" optional="True" label="Image width" help="If only height or width is set, the other will be determined automatically. If both are set, the image will be exactly that size. Default: not set."/>
<param argument="--names" type="boolean" truevalue="--names" falsevalue="" label="Node name labels?"/>
<param argument="--lengths" type="boolean" truevalue="--lengths" falsevalue="" label="Node length labels?"/>
<param argument="--fontsize" type="integer" min="5" optional="true" label="Font size" help="Node font size?"/>
<param argument="--nodewidth" type="float" min="5" optional="true" label="Node width" help="Node width for graph image?" />
<param name="output_format" type="select" label="Produce jpg, png or svg file?">
<option selected="True" value="jpg">.jpg</option>
<option value="png">.png</option>
<option value="svg">.svg</option>
</param>
</inputs>
<outputs>
<data name="outfile" format="jpg" from_work_dir="out.*" label="${tool.name} on ${on_string}: Assembly Graph Image">
<change_format>
<when input="output_format" value="png" format="png"/>
<when input="output_format" value="svg" format="svg"/>
</change_format>
</data>
</outputs>
<tests>
<test><!-- test with default settings -->
<param name="input_file" ftype="txt" value="bandage_input.txt"/>
<output name="outfile" ftype="jpg">
<assert_contents>
<has_size value="47168" delta="15000"/>
</assert_contents>
</output>
</test>
<test><!-- test with width and height parameters -->
<param name="input_file" ftype="txt" value="bandage_input.txt"/>
<param name="height" value="100"/>
<param name="width" value="100"/>
<param name="output_format" value="png"/>
<output name="outfile" ftype="png">
<assert_contents>
<has_size value="2000" delta="1500"/>
</assert_contents>
</output>
</test>
<test><!-- test svg output -->
<param name="input_file" ftype="txt" value="bandage_input.txt"/>
<param name="output_format" value="svg"/>
<output name="outfile" ftype="svg">
<assert_contents>
<has_size value="15154" delta="5000"/>
</assert_contents>
</output>
</test>
<test><!-- test with node name and length labels -->
<param name="input_file" ftype="txt" value="bandage_input.txt"/>
<param name="output_format" value="svg"/>
<param name="names" value="--names"/>
<param name="lengths" value="--lengths"/>
<output name="outfile" ftype="svg">
<assert_contents>
<has_size value="49566" delta="15000"/>
</assert_contents>
</output>
</test>
<test><!-- test with node name, length labels and fontsize-->
<param name="input_file" ftype="txt" value="bandage_input.txt"/>
<param name="output_format" value="jpg"/>
<param name="names" value="--names"/>
<param name="lengths" value="--lengths"/>
<param name="fontsize" value="5"/>
<output name="outfile" ftype="jpg">
<assert_contents>
<has_size value="45286" delta="15000"/>
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
*THE NEW BANDAGE: As of version 2022.09, the Bandage tool is now built on `Bandage-NG <https://github.com/asl/BandageNG>`_. This fork of the original Bandage is better maintained with additional features and performance upgrades.*
@BANDAGE_OVERVIEW@
**Command Documentation**
``Bandage image`` will generate an image file of the graph visualisation.
.. image:: $PATH_TO_IMAGES/bandage_graph.png
:alt: example bandage plot
]]></help>
<expand macro="citations"/>
</tool>