annotate nwdisplay.xml @ 0:5c11638687d0 draft

Imported from capsule None
author dcorreia
date Tue, 15 Mar 2016 10:53:34 -0400
parents
children 3200899efad9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
1 <tool id="nwdisplay" name="Newick Display" version="1">
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
2 <description>Display a phylogenetic tree as SVG</description>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
3 <requirements>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
4 <requirement type="package" version="1.6">newick_utilities</requirement>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
5 </requirements>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
6 <command>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
7 nw_display
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
8 -s
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
9 $scalebar
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
10 -u "$legend"
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
11 -I 'r'
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
12 -i
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
13 #if $condbranchsupport.branchsupport == "true":
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
14 "fill:$condbranchsupport.supcolor;
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
15 font-size:$condbranchsupport.supfontsize;
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
16 transform:$condbranchsupport.suptransform;"
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
17 #else:
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
18 "visibility:hidden;"
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
19 #end if
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
20 -b
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
21 #if $condbranchlength.branchlength == "true":
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
22 "fill:$condbranchlength.lencolor;
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
23 font-size:$condbranchlength.lenfontsize;
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
24 transform:$condbranchlength.lentransform;"
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
25 #else:
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
26 "visibility:hidden;"
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
27 #end if
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
28
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
29 -l "font-family:$leafPolice;font-size:$leafSize;"
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
30 -d "stroke:grey;fill:none;stroke-width:2;stoke-linecap:round;"
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
31 -w $width
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
32 $radial
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
33
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
34 $fileNewick > $output
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
35
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
36 </command>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
37 <inputs>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
38 <param name="fileNewick" format="txt,nw,nwk,nhx" type="data" label="Newick file" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
39 <param name="scalebar" type="boolean" truevalue="" falsevalue="-S" checked="True" label="Display scale bar" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
40 <param name="legend" type="text" value="" label="Unit name scale" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
41 <param name="leafPolice" type="text" value="sans-serif" label="Leaf police" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
42 <param name="leafSize" type="text" value="10px" label="Leaf font-size" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
43 <conditional name="condbranchsupport">
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
44 <param name="branchsupport" type="select" label="Branch support">
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
45 <option value="true">Display branch support</option>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
46 <option value="false" selected="true">Hide branch support</option>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
47 </param>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
48 <when value="true">
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
49 <param name="supcolor" type="text" value="red" label="color" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
50 <param name="supfontsize" type="text" value="10px" label="font-size" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
51 <param name="suptransform" type="text" value="translateY(1.5em)" label="move" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
52 </when>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
53 <when value="false" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
54 </conditional>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
55 <conditional name="condbranchlength">
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
56 <param name="branchlength" type="select" label="Branch length">
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
57 <option value="true">Display branch length</option>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
58 <option value="false" selected="true">Hide branch length</option>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
59 </param>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
60 <when value="true">
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
61 <param name="lencolor" type="text" value="blue" label="color" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
62 <param name="lenfontsize" type="text" value="10px" label="font-size" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
63 <param name="lentransform" type="text" value="translate(-1.5em,0em)" label="move" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
64 </when>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
65 <when value="false" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
66 </conditional>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
67 <param name="width" type="integer" value="800" label="SVG Tree width (px)" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
68 <param name="radial" type="boolean" truevalue="-r" falsevalue="" checked="False" label="Draw a radial tree" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
69 </inputs>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
70 <outputs>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
71 <data name="output" format="svg" label="${fileNewick.name}.svg" />
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
72 </outputs>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
73 <tests>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
74 <test>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
75 <param name="fileNewick" value="tree.nwk"/>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
76 <param name="width" value="400"/>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
77 <param name="leafPolice" value="courier"/>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
78 <output name="output" file="tree.svg" lines_diff="2"/>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
79 </test>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
80 <test>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
81 <param name="fileNewick" value="tree.nwk"/>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
82 <param name="radial" value="-r"/>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
83 <param name="branchlength" value="true"/>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
84 <output name="output" file="tree2.svg" lines_diff="2"/>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
85 </test>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
86 </tests>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
87 <help>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
88 <![CDATA[
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
89 **Displays a tree as a graph, as text or SVG.**
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
90
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
91
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
92 Synopsis
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
93 --------
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
94
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
95 nw_display [options] <tree filename|->
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
96
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
97 Input
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
98 -----
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
99
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
100 Argument is the name of the file containing one or more trees,
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
101 or '-' (in which case the tree is read on stdin).
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
102
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
103 Output
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
104 ------
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
105
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
106 Outputs a graph representing the tree, either as text (default) or
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
107 as SVG (option -s). Underscores in labels are replaced with spaces.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
108 Trees with no branch lengths are taken to be cladograms and are
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
109 drawn with leaves aligned. Otherwise, the tree is assumed to be a
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
110 phylogram: branch lengths are honored and a scale bar is drawn.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
111
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
112 SVG graphics can be converted to other formats with converters
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
113 such as Inkscape (e.g. to PDF) or ImageMagick (e.g. to PNG or JPEG).
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
114 Inkscape is available from www.inkscape.org and ImageMagick from
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
115 www.imagemagick.org.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
116
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
117 Options
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
118 -------
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
119
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
120 -a <number>: rotate all labels by this amount (radians, default: 0)
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
121 [only SVG radial]
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
122 -A <number>: rotate left-side labels by this amount (radians,
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
123 default: 0.0349 (=~ 2°)) [only SVG radial]
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
124 -b <string>: CSS for branch length labels. [only SVG]
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
125 Default: 'font-size:small;font-family:sans'.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
126 setting 'opacity:0' disables printing of branch lengths.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
127 -c <filename>: use specified file as CSS map [only SVG]. A CSS map
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
128 is a text file which specifies a style (CSS) for a clade.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
129 Each line has the following structure:
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
130 <CSS> <flag> <label>+
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
131 <CSS> is a valid CSS style specification (no spaces allowed)
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
132 e.g. 'font-size:small;font-family:italics;stroke:green'.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
133 <flag> is either 'Individual' or 'Clade' (case is not important, can
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
134 be abbreviated down to 'I' or 'C'). If set to 'Clade', the style is
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
135 applied to the clade defined by the labels. If 'Individual', the
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
136 style is applied to each node individually.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
137 <label>+ is a nonempty, whitespace-separated list of Newick labels
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
138 (spaces are allowed IFF the label is enclosed in ''). If a label
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
139 matches more than one node, all matching nodes are used.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
140 Default: no CSS map, whole tree is black (unless specified otherwise
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
141 via option -d).
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
142 <CSS>, <flag>, and <labels>+ are separated by whitespace.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
143 The following specifies red stroke for a clade defined by A, B and C;
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
144 and 2-pixel wide, blue stroke for individual nodes D, E, and F:
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
145 stroke:red Clade A B C
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
146 stroke:blue;stroke-width:2 I D E F
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
147 If no colormap is specified, the default is (but see option -d):
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
148 stroke:black;fill:none;stroke-width:1;stroke-linecap:round
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
149 -d <string>: CSS for 'plain' tree nodes (i.e., unless overridden by -c)
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
150 [only SVG]
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
151 Default: stroke:black;fill:none;stroke-width:1;stroke-linecap:round
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
152
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
153 -h: prints this message and exits
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
154
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
155 -i <string>: CSS for inner node labels. [only SVG]
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
156 Default: 'font-size:small;font-family:sans'.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
157
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
158 setting 'visibility:hidden' disables printing of inner node labels.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
159 -I <char> sets the position of the inner node label. Valid options are
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
160 'l' (near the leaves), 'm' (middle) or 'r' (near the root). Default
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
161 is 'l'.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
162
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
163 -l <string>: CSS for leaf node labels. [only SVG]
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
164 Default: 'font-size:medium;font-family:sans'.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
165 setting 'visibility:hidden' disables printing of leaf node labels.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
166 Note: if you change this, you will probably need to adjust the
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
167 space allocated to leaf labels - see option -W.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
168 -n <number> add this number of pixels to the horizontal position of
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
169 node labels. [SVG only]
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
170
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
171 -o <filename>: use specified file as ornament map. Works like the CSS
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
172 map (see option -c), except that it specifies arbitrary SVG snippets
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
173 instead of CSS styles. For example, the following
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
174 "<circle style='fill:red' r='5'>" Clade A B C
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
175 will draw a red circle of radius 5 at the root of the clade defined
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
176 by nodes A, B, and C. Keyword 'Individual' is also accepted and
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
177 works like for CSS.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
178
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
179 -R <integer>: use that many pixels for the root [only SVG]
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
180
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
181 -r: draw a radial tree (default: orthogonal) [only SVG]
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
182
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
183 -s: output graph as SVG (default: ASCII graphics). All output is on
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
184 stdout, so if there is more than one tree, stdout will be a
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
185 concatenation of SVG documents. These can be split into individual
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
186 files with the csplit(1) command:
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
187
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
188 $ nw_display -s many_trees.nw > multiple_svg
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
189 $ csplit -zs -f tree\_ -b '%02d.svg' multiple_svg '/<?xml/' {*}
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
190
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
191 will generate as many SVG files as there are Newick trees in
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
192 many_trees.nw. The files will be named tree_01.svg, tree_02.svg, etc.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
193
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
194 -S: suppress scale bar (ignored for cladograms)
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
195
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
196 -t: set the zero of the scale at the maximum depth instead of the root.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
197 This is useful when the branch lengths are in time units: zero marks
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
198 the present, and the scale shows the age of the ancestral nodes.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
199 -u <string>: string is used as unit name for scale bar (ignored
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
200 if no scale bar is drawn).
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
201 -U <URL_filename>: use specified URL map [only SVG]. A URL map
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
202 is a text file which specifies a URL for a label.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
203 Each line has the following structure:
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
204 <label> <URL>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
205 Clicking on a label will follow the link (if any).
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
206 -v <number>: number of pixels between leaves (default: 40) [only SVG
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
207 orthogonal]
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
208 -w <number>: graph should be no wider than <number>, measured in
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
209 characters for text and pixels for SVG. Defaults: 80 (text),
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
210 300 (SVG)
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
211 -W <number>: use this as an estimate of the width of a leaf label
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
212 character (in pixels) [only SVG]. This affects the space left for
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
213 the tree nodes. Default: 5.0 You will probably need this if you
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
214 change the leaf label font properties (option -l), especially size.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
215 You will probably need trial and error to find the right value.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
216
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
217 LibXML
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
218 ......
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
219
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
220 If LibXML is being used, the handling of ornaments (-o) is more elaborate.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
221 See the tutorial, section 2.2 (displaying) for details.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
222 This executable uses LibXML2.
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
223
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
224 Examples
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
225 --------
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
226
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
227 # display tree as ASCII::
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
228
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
229 $ nw_display data/catarrhini
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
230
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
231 # display tree as SVG, using a color map::
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
232
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
233 $ nw_display -s -c data/color.map data/catarrhini
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
234
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
235 # ditto, convert to other graphics formats::
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
236
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
237 $ nw_display -s -c data/color.map data/catarrhini > catarrhini.svg
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
238 $ convert catarrhini.svg catarrhini.png # PNG, with ImageMagick
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
239 $ convert catarrhini.svg catarrhini.jpeg # JPEG, with ImageMagick
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
240 $ inkscape -z -f catarrhini.svg -A catarrhini.pdf # PDF, with Inkscape
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
241
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
242 # the same; no branch lengths::
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
243
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
244 $ nw_display -s -b 'visibility:hidden' -c data/color.map data/catarrhini
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
245
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
246 # radial tree, leaf labels in italics::
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
247
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
248 $ nw_display -s -r -l 'font-style:italics' data/catarrhini
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
249
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
250 ]]>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
251 </help>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
252 <citations>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
253 <citation type="doi">10.1186/1748-7188-3-7</citation>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
254 </citations>
5c11638687d0 Imported from capsule None
dcorreia
parents:
diff changeset
255 </tool>