forked from vibbits/phyd3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
documentation.html
executable file
·910 lines (902 loc) · 39.4 KB
/
documentation.html
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
<!DOCTYPE html>
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html;charset=UTF-8" http-equiv="content-type">
<title>PhyD3</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<link rel="stylesheet" href="libs/css/bootstrap-material-design.min.css" />
<link rel="stylesheet" href="libs/css/vib.css" />
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="libs/js/material.min.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-61194136-8', 'auto');
ga('send', 'pageview');
</script>
</head>
<body class="container">
<br />
<a href="index.html"><img id="phyd3logo" src="img/logo-name.svg" /></a>
<a href="http://www.vib.be"><img id="viblogo" src="img/vib_tagline_pos_rgb.png" /></a>
<div class="row phyd3-documentation well">
<h3>Idea</h3>
When Chrome dropped the NPAPI support in 2015, integration of Java applets with Chrome browser becomes a hurdle (only as a web start software).<br />
This results in lesser integration of a widely used <a href="https://sites.google.com/site/cmzmasek/home/software/archaeopteryx" target="_blank">Archaeopteryx Java applet</a> for around 70% of the users.<br />
This project was about to bring the similar functionalities using the latest web technologies.<br />
Using <a href="https://d3js.org/" target="_blank">D3.js</a> to creating a phylogram is quite simple as we saw in <a href="http://bl.ocks.org/kueda/1036776" target="_blank">d3.phylogram.js</a>.<br />
But we found currently existing web-applications for visualization of phylogenetic trees not up to the task.<br />
So we've created phyD3.
<h3>Features list</h3>
<ul>
<li>dynamic node hiding - tree nodes are automatically hidden, when they dont fit in the space between nodes, to prevent overlapping text & graphs
<li>alternating colors - tree colors can be inverted for higher readability
<li>aligning nodes - nodes can be lined up to match furthest node, in order to present annotation data more clearly
<li>displaying branch length & support values - if those values are present, they can be displayed directly next to the nodes, the number of displayed decimals can also be controlled
<li>displaying node & taxonomy names - if those values are present, they can be displayed directly next to the nodes,
<li>displaying all, internal or external node names - users can choose what information to display
<li>taxonomy coloring - node text can be coloured according to node taxonomy, if the colors are provided
<li>node resizing - node text can be scaled, to support better readability
<li>dynamic zooming - users can dynamically zoom in and out using mouse or the buttons provided
<li>displaying domain architecture - nodes can be annotated with graphical representation of domain architecture, with option to display domain names, if provided
<li>domain coloring - domains can be coloured according to the domain names, if the colors are provided
<li>domain scaling - the graphical domain representation can be scaled, to support better readability
<li>domain p-value filtering - domains can be filtered, so that only domains with lower p-value than defined are displayed
<li>showing annotation graphs & legend - nodes can be annotated with graphs to present various numerical data, using multiple bar charts, pie charts or binary charts
<li>graph scaling - users can easily change the scale of bar graphs, so that the annotation will be displayed more clearly
<li>tree export - the tree can be exported to PNG or SVG with all the options and filters used by the user
<li>node infobox - when the user clicks on the node, additional infobox is displayed with all the information about the node and its annotation
</ul>
<h3>Supported formats</h3>
<ul>
<li>Newick - <a href="http://evolution.genetics.washington.edu/phylip/newicktree.html" target="_blank">http://evolution.genetics.washington.edu/phylip/newicktree.html</a>
<li>phyloXML - <a href="http://www.phyloxml.org/" target="_blank">http://www.phyloxml.org</a>
<li>extended phyloXML - <a href="#extended+phyloXML">see below</a>, our extension to support annotation graphs and colours in the phyloXML
</ul>
<h3><a class="no-decoration" name="extended+phyloXML">Extended phyloXML</a></h3>
The current phyloXML XSD permits inserting other (non-standard) tags, which are used here to describe taxonomy colors, domain colors as well as node label and node graphs.<br />
<ol>
<li><h4>Taxonomy information</h4>
You can specify the taxonomy name, color and URL in the <taxonomies> section of extended phyloXML.<br />
These information will be displayed on the tree, in node infobox as well as used for taxonomy colorization.<br />
The taxonomy codes must match ones used in phylogeny. Use HEX values for colors (0xRRGGBB). Use full URL for links (starting with http://).<br />
See the code below and also <a href="view.php?id=taxonomy.xml&f=xml">working example</a>.
<pre>
<phyloxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phyloxml.org"
xsi:schemaLocation="http://www.phyloxml.org http://www.phyloxml.org/1.10/phyloxml.xsd">
<phylogeny rooted="true">
<clade>
<taxonomy>
<code><b>mdo</b></code>
</taxonomy>
...
</clade>
...
</phylogeny>
<taxonomies>
<taxonomy code="<b>mdo</b>">
<color>0x40FF00</color>
<name>Malus domestica</name>
<url>https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=3750</url>
</taxonomy>
...
</taxonomies>
...
</phyloxml></pre>
</li>
<li><h4>Domain information</h4>
You can specify domain description, color and URL in the <domains> section of extended phyloXML.<br />
These information will be displayed on the tree, in node infobox as well as used for domain colorization.<br />
The domain codes must match ones used in phylogeny. Use HEX values for colors (0xRRGGBB). Use full URL for links (starting with http://).<br />
See the code below and also <a href="view.php?id=domains.xml&f=xml">working example</a>.
<pre>
<phyloxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phyloxml.org"
xsi:schemaLocation="http://www.phyloxml.org http://www.phyloxml.org/1.10/phyloxml.xsd">
<phylogeny rooted="true">
<clade>
<sequence>
<domain_architecture length="402">
<domain confidence="3.7E-6" from="135" to="212"><b>IPR011992</b></domain>
<domain confidence="8.879" from="181" to="216"><b>IPR002048</b></domain>
...
</domain_architecture>
</sequence>
...
</clade>
...
</phylogeny>
<domains>
<domain name="<b>IPR011992</b>">
<color>0x12C6D7</color>
<description>Pyruvate dehydrogenase</description>
<url>http://www.example.com</url>
</domain>
<domain name="<b>IPR002048</b>">
<color>0xFAF38C</color>
<description>Protein kinase</description>
<url>http://www.example.com</url>
</domain>
...
</domains>
...
</phyloxml></pre>
</li>
<li><h4>Node labels</h4>
It is possible to display on the tree additional node labels. Those labels can be created from existing node properties or other tags. <br />
There are two kinds of labels: text labels and color labels.<br />
To specify which properties to show use <labels> section in extended phyloXML. Type can be either text or color. Data tag and ref must match the intended clade property to be displayed. Use HEX values for colors (0xRRGGBB). Only text labels can be displayed for inner nodes of the tree.<br />
See the code below and also <a href="view.php?id=labels.xml&f=xml">working example</a>.
<pre>
<phyloxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phyloxml.org"
xsi:schemaLocation="http://www.phyloxml.org http://www.phyloxml.org/1.10/phyloxml.xsd">
<phylogeny rooted="true">
<clade>
<<b>events</b>>
<<b>duplications</b>>1</<b>duplications</b>>
</<b>events</b>>
<<b>property</b> applies_to="clade" datatype="xksd:string" ref="<b>Resistance score</b>">0xA3B523</property>
...
</clade>
...
</phylogeny>
<labels>
<label type="text">
<name show="0">Duplications</name>
<data tag="<b>events</b>" ref="<b>duplications</b>"></data>
</label>
<label type="color">
<name show="1">Resistance</name>
<data tag="<b>property</b>" ref="<b>Resistance score</b>"></data>
</label>
...
</labels>
...
</phyloxml></pre>
</li>
<li><h4>Node graphs</h4>
You can also include the graphs specifications and the graph data, that should be displayed next to the node (clade).<br /> On the internal nodes <b>pie</b> or <b>binary</b> graphs can be drawn.
For leaf nodes you can choose between 5 graph types: <b>multibar (normal/stacked), pie, binary, heatmap, boxplot</b>. Each referenced clade needs to have an <b>id</b> tag defined in the phylogeny.<br />
For complete graph specification you need three things:
<ol>
<li><b>name</b> - graph name, that will be displayed in detailed node information popup
<li><b>legend</b> - for each value series of your data, you need to specify the legend field; for each field you need to put field name (which will be displayed to the user in legend and infobox popup), color that will be used to draw this series (for all graph types besides heatmap) and for binary graph also a symbol shape (one of circle); additionally for heatmap you need to specify which gradient spec to use (name & classes following the <a href="http://colorbrewer2.org/" target="_blank">ColorBrewer2</a>)
<li><b>data</b> - for each clade id you wish to display the graph for, you need to include data values, ordered in series defined in legend; you can also use existing tags or properties from phylogeny tree, referencing them by tag and ref attributes of data tag; to turn single values into pie charts use <b>min</b> and <b>max</b> tags inside <b>data</b> tag.
</ol>
See the code below and also working examples of <a href="view.php?id=outergraphs.xml&f=xml">leaf node graphs</a> or <a href="view.php?id=innergraphs.xml&f=xml">inner node graphs</a>.
<pre>
<phyloxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phyloxml.org"
xsi:schemaLocation="http://www.phyloxml.org http://www.phyloxml.org/1.10/phyloxml.xsd">
<phylogeny rooted="true">
<clade>
<id>10</id>
<events>
<duplications>1</duplications>
</events>
<clade>
<id>11</id>
<property applies_to="clade" datatype="xksd:double" ref="duplication consistency score:">0.6923</property>
...
</clade>
<clade>
<id>12</id>
<property applies_to="clade" datatype="xksd:double" ref="duplication consistency score:">0.6923</property>
...
</clade>
...
</clade>
<clade>
<id>13</id>
<events>
<duplications>1</duplications>
</events>
...
</clade>
...
</phylogeny>
<graphs>
<graph type="multibar">
<name>Multibar test graph</name>
<legend show="0">
<field>
<name>bar1</name>
<color>0x8986BF</color>
</field>
<field>
<name>bar2</name>
<color>0x9D4FB0</color>
</field>
<field>
<name>bar3</name>
<color>0xF7BE81</color>
</field>
</legend>
<data>
<values for="10">
<value>12</value>
<value>61</value>
<value>34</value>
</values>
<values for="11">
<value>57</value>
<value>37</value>
<value>8</value>
</values>
<values for="12">
<value>23</value>
<value>27</value>
<value>14</value>
</values>
<values for="13">
<value>23</value>
<value>27</value>
<value>14</value>
</values>
...
</data>
</graph>
<graph type="multibar">
<name>Stacked multibar test graph</name>
<legend show="1" stacked="1">
<field>
<name>barA</name>
<color>0x8986BF</color>
</field>
<field>
<name>barB</name>
<color>0x9D4FB0</color>
</field>
<field>
<name>barC</name>
<color>0xF7BE81</color>
</field>
</legend>
<data>
<values for="10">
<value>21</value>
<value>16</value>
<value>43</value>
</values>
<values for="11">
<value>75</value>
<value>73</value>
<value>8</value>
</values>
<values for="12">
<value>32</value>
<value>72</value>
<value>41</value>
</values>
<values for="13">
<value>32</value>
<value>72</value>
<value>41</value>
</values>
...
</data>
</graph>
<graph type="boxplot">
<name>Boxplot test graph</name>
<legend show="1">
<field>
<color>0x8986BF</color>
</field>
<field>
<color>0x9D4FB0</color>
</field>
</legend>
<data>
<values for="10">
<value>12</value>
<value>21</value>
<value>34</value>
<value>49</value>
<value>58</value>
</values>
<values for="11">
<value>17</value>
<value>27</value>
<value>38</value>
<value>46</value>
<value>57</value>
</values>
<values for="12">
<value>13</value>
<value>27</value>
<value>34</value>
<value>43</value>
<value>56</value>
</values>
...
</data>
</graph>
<graph type="binary">
<name>Binary test graph1</name>
<legend show="1">
<field>
<name>binary1</name>
<color>0xf03b20</color>
<shape>circle</shape>
</field>
<field>
<name>binary2</name>
<color>0x2c7fb8</color>
<shape>cross</shape>
</field>
<field>
<name>binary3</name>
<color>0x37BA49</color>
<shape>diamond</shape>
</field>
</legend>
<data>
<values for="10">
<value>1</value>
<value>1</value>
<value>0</value>
</values>
...
</data>
</graph>
<graph type="heatmap">
<name>Heatmap test graph with fields</name>
<legend show="0">
<field>
<name>heat1</name>
</field>
<field>
<name>heat2</name>
</field>
<field>
<name>heat3</name>
</field>
<field>
<name>heat4</name>
</field>
<field>
<name>heat5</name>
</field>
<field>
<name>heat6</name>
</field>
<field>
<name>heat7</name>
</field>
<field>
<name>heat8</name>
</field>
<field>
<name>heat9</name>
</field>
<gradient>
<name>YlOrRd</name>
<classes>9</classes>
</gradient>
</legend>
<data>
<values for="10">
<value>64</value>
<value>38</value>
<value>84</value>
<value>9</value>
<value>74</value>
<value>33</value>
<value>82</value>
<value>37</value>
<value>12</value>
</values>
...
</data>
</graph>
<graph type="pie">
<name>Duplication</name>
<legend>
<field>
<name>Consistency score</name>
<color>0xFF0000</color>
</field>
</legend>
<data tag="property" ref="duplication consistency score:">
<min>0</min>
<max>1</max>
</data>
</graph>
<graph type="binary">
<name>Speciations</name>
<legend>
<field>
<name>Speciations</name>
<color>0x00FF00</color>
<shape>circle</shape>
</field>
</legend>
<data tag="events" ref="duplications">
</data>
</graph>
...
</graphs>
</phyloxml></pre>
</li>
</ol>
<h3>Usage</h3>
<ol>
<li><h4>Running the example with Node.js</h4>
Download the PhyD3 source code from: <a href="https://github.com/vibbits/phyd3/" target="_blank">https://github.com/vibbits/phyd3/</a>.<br />
In the PhyD3 folder issue the following commands:<br />
<pre>
# npm install
...
# node phyd3.js
Listening on 127.0.0.1:8080...</pre>
Open your browser and point to your local PhyD3 copy under <a href="http://127.0.0.1:8080/" target='_blank'>http://127.0.0.1:8080/</a>.
</li>
<li><h4>Embedding the widget</h4>
In the dist/ folder you will find minified js & css files. The required jQuery, Bootstrap and D3 libraries are not included. You will need to link all the libraries and phyD3 on your website.<br >
There are two parsers of tree formats available: Newick <i>phyd3.newick.parse()</i> and phyloXML <i>phyd3.phyloxml.parse()</i>. Once you have parsed your tree you can use <i>phyd3.phylogram.build(id, tree, opts)</i> function to display the PhyD3 viewer. <br /> See the example below.
<pre>
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://d3js.org/d3.v3.min.js"></script>
<link rel="stylesheet" href="css/phyd3.min.css" />
<script src="js/phyd3.min.js"></script>
<script>
function load() {
d3.xml("sample.xml", function(xml) {
var tree = phyd3.phyloxml.parse(xml);
phyd3.phylogram.build("#phyd3", tree, {});
});
};
</script>
</head>
<body onload="load()">
<div id="phyd3"></div>
</body>
</html></pre>
In dist/ folder there are also index.html and sample.xml files to help you get started.
</li>
<li><h4>Widget configuration</h4>
The third parameter of the build function is a options object. It helps you customise the viewer look and behaviour. Available options are listed below.
<table class="table">
<tr>
<th>Property name</th>
<th>Default value</th>
<th>Description</th>
</tr>
<tr>
<td>backgroundColor</td>
<td>white</td>
<td>color used to paint SVG background and node infobox popup background</td>
</tr>
<tr>
<td>domainLevel</td>
<td>1</td>
<td>only domains which confidence is lower than specified value will be shown on domain architecture graph</td>
</tr>
<tr>
<td>domainLevelStep</td>
<td>10</td>
<td>multiplied factor in the domain level when changing the threshold</td>
</tr>
<tr>
<td>domainWidth</td>
<td>100</td>
<td>width of the domain architecture graph</td>
</tr>
<tr>
<td>domainWidthStep</td>
<td>100</td>
<td>added factor in the domain architecture graph when zooming</td>
</tr>
<tr>
<td>dynamicHide</td>
<td>false</td>
<td>when true, hides all the overlapping node names, graphs and domain architecture and support lines</td>
</tr>
<tr>
<td>pinnedNodes</td>
<td>[]</td>
<td>array of node IDs that should be always visible, independently of dynamic hide setting</td>
</tr>
<tr>
<td>foregroundColor</td>
<td>black</td>
<td>color used to pain fonts, lines, outlines & borders</td>
</tr>
<tr>
<td>graphWidth</td>
<td>20</td>
<td>width of the multibar graph</td>
</tr>
<tr>
<td>graphWidthStep</td>
<td>10</td>
<td>added factor in the multibar graph width when zooming</td>
</tr>
<tr>
<td>height</td>
<td>800</td>
<td>height of the viewer SVG area</td>
</tr>
<tr>
<td>invertColors</td>
<td>false</td>
<td>when true, uses the foreground color as background and vice versa</td>
</tr>
<tr>
<td>lineupNodes</td>
<td>true</td>
<td>when true, nodes are lined up to the furthest node and support lines are drawn</td>
</tr>
<tr>
<td>margin</td>
<td>20</td>
<td>margin in the viewer SVG area</td>
</tr>
<tr>
<td>nanColor</td>
<td>white</td>
<td>Color for undefined values in heatmaps</td>
</tr>
<tr>
<td>nodeHeight</td>
<td>6</td>
<td>height of the node (node size, text font-size, radius of pie & binary graphs, height of multibar & domain graphs)</td>
</tr>
<tr>
<td>nodeHeightStep</td>
<td>1</td>
<td>added factor in the node height when changing the node size</td>
</tr>
<tr>
<td>outline</td>
<td>0.3</td>
<td>font stroke outline for displaying node names</td>
</tr>
<tr>
<td>popupAction</td>
<td>renderPopup</td>
<td>callback function to handle click event on a node, by default displays the node infobox</td>
</tr>
<tr>
<td>popupWidth</td>
<td>500</td>
<td>width of the node infobox popup</td>
</tr>
<tr>
<td>scaleStep</td>
<td>0.3</td>
<td>multiplied factor in the tree height and width when zooming</td>
</tr>
<tr>
<td>scaleX</td>
<td>1</td>
<td>SVG scale on X axis</td>
</tr>
<tr>
<td>scaleY</td>
<td>1</td>
<td>SVG scale on Y axis</td>
</tr>
<tr>
<td>showDomains</td>
<td>true</td>
<td>when true, shows the domain architecture graph</td>
</tr>
<tr>
<td>showDomainNames</td>
<td>false</td>
<td>when true, shows the domain names on the domain architecture graph</td>
</tr>
<tr>
<td>showDomainColors</td>
<td>true</td>
<td>when true, sets the colors of the domains on the domain architecture graph accordingly to xml</td>
</tr>
<tr>
<td>showFullTaxonomy</td>
<td>false</td>
<td>when true, shows the full taxonomy names instead of taxonomy codes on the tree</td>
</tr>
<tr>
<td>showGraphs</td>
<td>true</td>
<td>when true, shows the graphs next to nodes</td>
</tr>
<tr>
<td>showGraphLegend</td>
<td>true</td>
<td>when true, shows the legend on top of the graphs</td>
</tr>
<tr>
<td>showLabels</td>
<td>true</td>
<td>when true, shows the labels next to nodes</td>
</tr>
<tr>
<td>showLengthValues</td>
<td>false</td>
<td>when true, shows the branch length values next to nodes</td>
</tr>
<tr>
<td>maxDecimalsLengthValues</td>
<td>2</td>
<td>number of decimals the branch length values will be rounded to</td>
</tr>
<tr>
<td>branchLengthColor</td>
<td>red</td>
<td>font color when displaying branch length values</td>
</tr>
<tr>
<td>showSupportValues</td>
<td>false</td>
<td>when true, shows the clade support values next to nodes</td>
</tr>
<tr>
<td>maxDecimalsSupportValues</td>
<td>0</td>
<td>number of decimals the support values will be rounded to</td>
</tr>
<tr>
<td>supportValuesColor</td>
<td>blue</td>
<td>font color when displaying clade support values</td>
</tr>
<tr>
<td>showNodeNames</td>
<td>true</td>
<td>when true, shows the node names next to nodes</td>
</tr>
<tr>
<td>showNodesType</td>
<td>only leaf</td>
<td>shows the names and taxonomy only for specified subset of nodes, available options are: 'all', 'only leaf', 'only inner'</td>
</tr>
<tr>
<td>showPhylogram</td>
<td>false</td>
<td>when true, shows phylogram instead of dendrogram</td>
</tr>
<tr>
<td>showTaxonomy</td>
<td>true</td>
<td>when true, shows the taxonomy codes next to nodes</td>
</tr>
<tr>
<td>showTaxonomyColors</td>
<td>true</td>
<td>when true, sets the colors of node names and taxonomy names to the taxonomy color specified in xml</td>
</tr>
<tr>
<td>textLength</td>
<td>100</td>
<td>width in pixels reserved for node text</td>
</tr>
<tr>
<td>translateX</td>
<td>0</td>
<td>initial SVG translation on X axis</td>
</tr>
<tr>
<td>translateY</td>
<td>0</td>
<td>initial SVG translation on Y axis</td>
</tr>
<tr>
<td>treeWidth</td>
<td>auto</td>
<td>override default tree width calculations; useful with large number of node graphs</td>
</tr>
</table>
</li>
<li><h4>Widget controls</h4>
You can allow the users to control the display of the tree by providing them with form controls with the appropriate id. The full list of controls can be found below.
<table class="table">
<tr>
<th>Control ID</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td>graphWidth</td>
<td>text</td>
<td>displays the current multibar graph width</td>
</tr>
<tr>
<td>graphWidthLower</td>
<td>button</td>
<td>decreases the multibar graph width by graphWidthStep</td>
</tr>
<tr>
<td>graphWidthHigher</td>
<td>button</td>
<td>increases the multibar graph width by graphWidthStep</td>
</tr>
<tr>
<td>domainWidth</td>
<td>text</td>
<td>displays the current domain architecture graph width</td>
</tr>
<tr>
<td>domainWidthLower</td>
<td>button</td>
<td>decreases the domain architecture graph width by domainWidthStep</td>
</tr>
<tr>
<td>domainWidthHigher</td>
<td>button</td>
<td>increases the domain architecture graph width by domainWidthStep</td>
</tr>
<tr>
<td>nodeHeight</td>
<td>text</td>
<td>displays the current node height</td>
</tr>
<tr>
<td>nodeHeightLower</td>
<td>button</td>
<td>decreases the node height by nodeHeightStep</td>
</tr>
<tr>
<td>nodeHeightHigher</td>
<td>button</td>
<td>increases the node height by nodeHeightStep</td>
</tr>
<tr>
<td>dynamicHide</td>
<td>checkbox</td>
<td>toggles the dynamic hide mechanism on and off</td>
</tr>
<tr>
<td>invertColors</td>
<td>checkbox</td>
<td>toggles the inversion of colors on and off</td>
</tr>
<tr>
<td>lineupNodes</td>
<td>checkbox</td>
<td>toggles the line up of the nodes on and off</td>
</tr>
<tr>
<td>phylogram</td>
<td>checkbox</td>
<td>toggles between dendrogram and phylogram tree</td>
</tr>
<tr>
<td>lengthValues</td>
<td>checkbox</td>
<td>toggles the display of branch length values on and off</td>
</tr>
<tr>
<td>maxDecimalsLengthValues</td>
<td>input</td>
<td>specifies the number of decimals the length values will be rounded to</td>
</tr>
<tr>
<td>supportValues</td>
<td>checkbox</td>
<td>toggles the display of clade support vlaues on and off</td>
</tr>
<tr>
<td>maxDecimalsSupportValues</td>
<td>input</td>
<td>specifies the number of decimals the length values will be rounded to</td>
</tr>
<tr>
<td>nodeNames</td>
<td>checkbox</td>
<td>toggles the display of node names on and off</td>
</tr>
<tr>
<td>taxonomy</td>
<td>checkbox</td>
<td>toggles the display of taxonomy names on and off</td>
</tr>
<tr>
<td>taxonomyColors</td>
<td>checkbox</td>
<td>toggles the colorization of nodes according to their taxonomy on and off</td>
</tr>
<tr>
<td>domains</td>
<td>checkbox</td>
<td>toggles the display of the domain architecture graph on and off</td>
</tr>
<tr>
<td>domainNames</td>
<td>checkbox</td>
<td>toggles the display of the domain names on and off</td>
</tr>
<tr>
<td>domainColors</td>
<td>checkbox</td>
<td>toggles the colors of the domains on and off</td>
</tr>
<tr>
<td>graphs</td>
<td>checkbox</td>
<td>toggles the display of graphs on and off</td>
</tr>
<tr>
<td>graphLegend</td>
<td>checkbox</td>
<td>toggles the display of graph legend on and off</td>
</tr>
<tr>
<td>nodesType</td>
<td>select</td>
<td>changes the displayed node types, possible options are 'all', 'only leaf', 'only inner'</td>
</tr>
<tr>
<td>zoominY</td>
<td>button</td>
<td>zooms in the tree on Y axis</td>
</tr>
<tr>
<td>zoomoutY</td>
<td>button</td>
<td>zooms out the tree on Y axix</td>
</tr>
<tr>
<td>zoominX</td>
<td>button</td>
<td>zooms in the tree on X axis</td>
</tr>
<tr>
<td>zoomoutX</td>
<td>button</td>
<td>zooms out the tree on X axis</td>
</tr>
<tr>
<td>resetZoom</td>
<td>button</td>
<td>resets the zoom to the defaul level on both X and Y axes</td>
</tr>
<tr>
<td>linkSVG</td>
<td>button</td>
<td>downloads the current tree as SVG file</td>
</tr>
<tr>
<td>linkPNG</td>
<td>button</td>
<td>downloads the current tree as PNG file</td>
</tr>
</table>
</li>
</ol>
<h3>License</h3>
<b>phyD3, phylogenetic tree viewer based on D3.js</b><br />
Copyright (c) BITS VIB 2016<br /><br />
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free Software Foundation;
either version 3 of the License, or any later version.<br /><br />
Redistribution and use in source and binary forms,
with or without modification, are permitted provided that the following conditions are met:<br />
<ul>
<li>Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
<li>Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
<li>Neither the name of the VIB nor the names of its contributors may be used to
endorse or promote products derived from this software without specific prior written permission.
</ul>
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.<br /><br />
Full license text can be found <a href="https://www.gnu.org/licenses/gpl-3.0.txt">here</a><br /><br />
You can obtain the source code from:<br />
<a href="https://github.com/vibbits/phyd3/" target="_blank">https://github.com/vibbits/phyd3/</a>
<h3>Contact us</h3>
For any questions, remarks, issues, etc., send an email to <a href="mailto:[email protected]">[email protected]</a>
</div>
</body>
</html>