-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphyloJIVEparameters.html
503 lines (465 loc) · 23.4 KB
/
phyloJIVEparameters.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="description" content="Phylojive : integrating
phylogenies with online biodiverstiy data sources">
<link rel="stylesheet" type="text/css" media="screen"
href="stylesheets/stylesheet.css">
<title>Phylojive</title>
</head>
<body>
<!-- HEADER -->
<div id="header_wrap" class="outer">
<header class="inner"> <a id="forkme_banner"
href="https://github.com/TRIN/phyloJIVE">View on GitHub</a>
<h1 id="project_title"><a class="mozTocH1" name="mozTocId637723"></a>parameters
<img alt="darwin sketch" src="images/Darwin_sketch.png"
width="120" height="120" align="right"></h1>
<h2 id="project_tagline"><a class="mozTocH2"
name="mozTocId88732"></a>for <a href="index.html"><font
color="#ffcccc">phyloJIVE</font></a> <br>
</h2>
<br>
<section id="downloads"> <a class="zip_download_link"
href="https://github.com/TRIN/phyloJIVE/zipball/master">Download
this project as a .zip fil</a> <a class="tar_download_link"
href="https://github.com/TRIN/phyloJIVE/tarball/master">Download
this project as a tar.gz file</a> </section>
</header>
</div>
<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">
<ol id="mozToc">
<!--mozToc h1 1 h2 2 h3 3 h4 4 h5 5 h6 6-->
<li><a href="#mozTocId637723">parameters</a>
<ol>
<li><a href="#mozTocId177651">params for the phylogeny
explorer web application</a>
<ol>
<li><a href="#mozTocId921802">... tree and characters</a></li>
</ol>
</li>
<li><a href="#mozTocId834619">... template for simple name
based data-sources</a>
<ol>
<li><a href="#mozTocId992837">.. alternative functions
</a></li>
<li><a href="#mozTocId305207">GUID's (LSIDs)</a></li>
</ol>
</li>
</ol>
</li>
</ol>
<h3><a name="params"></a>params for the phylogeny explorer web
application</h3>
<br>
<table width="100%" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td valign="top" width="30%">width: 550 </td>
<td valign="top" width="70%">in pixels</td>
</tr>
<tr>
<td valign="top">height:800
</td>
<td valign="top">in pixels</td>
</tr>
<tr>
<td valign="top" width="30%"> alignName:true<br>
</td>
<td valign="top" width="70%">true or false? are names
aligned or adjacent to tips</td>
</tr>
<tr>
<td valign="top"> lateralise:false<br>
</td>
<td valign="top">true or false? sort the tree by clade
branch length</td>
</tr>
<tr>
<td valign="top">levelsToShow:5</td>
<td valign="top">how deep to show?<br>
Clades deeper than this are collapsed to a small
triangle that can be expanded on demand.<br>
</td>
</tr>
<tr>
<td valign="top">branchMultiplier:1</td>
<td valign="top">multiplier for branches. <br>
Useful for very small or very big branch lengths.<br>
</td>
</tr>
<tr>
<td valign="top">firstCharacter: 'moisture'</td>
<td valign="top">The name of the first character/trait
that will appear by default on the tree. The name must
also be in the charJSON. <br>
</td>
</tr>
<tr>
<td valign="top">Node: {<br>
height: 40,<br>
width: 20,<br>
type: 'circle',<br>
dim: 5,<br>
color: '#aaa',<br>
overridable: true,<br>
align: 'left'<br>
}<br>
</td>
<td valign="top">configurable attributes of clades (tree
nodes)<br>
</td>
</tr>
<tr>
<td valign="top">
Canvas: {<br>
background: {<br>
color: '#EEF2F7'<br>
}<br>
</td>
<td valign="top">configurable attributes of the web
application Canvas <br>
</td>
</tr>
<tr>
<td valign="top"> Edge: {<br>
type: 'line',<br>
color: '#000',<br>
overridable: true,<br>
lineWidth: 2<br>
}<br>
</td>
<td valign="top">configurable attributes of the lines that
make up the phylogenetic tree visualisation<br>
</td>
</tr>
</tbody>
</table>
<br>
<h4><a class="mozTocH4" name="mozTocId921802"></a><a
name="..._tree_and_characters"></a>... tree and characters</h4>
<br>
<table width="100%" border="1" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td valign="top" width="50%">tree : 'a newick formatted
phylogeny'<br>
</td>
<td valign="top">A newick formatted tree. <br>
Enclosed in single quotes with no "special characters"
(double quotes and such like unless they are
escaped. <br>
... other tree formats are possible but not yet<br>
</td>
</tr>
<tr>
<td valign="top" width="50%">character: charJSONcharacters<br>
</td>
<td valign="top">see <a href="about_charJSON.html">about
charJSON</a><br>
</td>
</tr>
</tbody>
</table>
<h3><a class="mozTocH3" name="mozTocId834619"></a>... <a
name="template"></a>template for simple name based
data-sources</h3>
<p>It may look daunting but the tmpl variable provides a
simple way to include data resouces which provide taxon name
based searches.<br>
</p>
<p>There is no standard form of call for the biodiversity web
services. This template is suited for those that return
results that can be displayed without parsing by browsers.<br>
</p>
<p>Some biodiversity web services return json and xml, in which
case, the result needs to be parsed before it can be
displayed. The functions presentClade, onPresentClade,
and Tips can be respecified to achieve this. The <a
href="getting_started.html">getting started with phyloJIVE </a>lists
some examples.<br>
</p>
<p>It is essentially a html table that is expanded as required
to add the taxon names.</p>
<table width="100%" border="1" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td valign="top"><font size="-1">tmpl :<br>
</font></td>
<td valign="top" width="80"><font size="-1">the name of
the template<br>
</font></td>
</tr>
<tr>
<td valign="top"><font size="-1">'<table style="border:
none"><tbody><tr><th></th><th>links</th><th>
</th><th> </th><th>
</th><th> </th></tr>' + <br>
'<% _.each(nodeList , function( value ) {' +<br>
</font></td>
<td valign="top" width="80"><font size="-1">the header row<br>
</font></td>
</tr>
<tr>
<td valign="top"><font size="-1">
'<td><a href="</font><font
size="-1"><font color="#9999ff"><font size="-1"><font
color="#9999ff">http://</font></font>THE_First_Resource/</font><%=
<font color="#9999ff">value.name </font>%>"
title="<%= <font color="#9999ff">value.name </font>%>
<font color="#ff6666">some descriptive text for the
tool tip</font>" rel="<%= value.rel %>"
class="thumbImage1"><%= <font color="#9999ff">value.name</font>
%></a></td>' + <br>
<br>
</font></td>
<td valign="top"><font size="-1">link to the resource
in first column which includes the name of the
taxon<br>
</font></td>
</tr>
<tr>
<td valign="top"><font size="-1">
'<td><a
href="<font color="#9999ff">http://Another_Resource/</font><%=
<font color="#9999ff">value.name</font> %>" title="<font
color="#ff6666">about</font> <%= <font
color="#9999ff">value.name</font>%> </font><font
size="-1"><font size="-1"><font color="#ff6666">some
descriptive text for the tool tip</font></font>"
rel="<%= value.rel %>"
class="thumbImage1"><id="thumb1"><div
class="forward"></div>
</id="thumb1"></a></td>' + <br>
<br>
</font></td>
<td valign="top"><font size="-1">a resource which
requires a full name. link is shown as an icon<br>
</font></td>
</tr>
<tr>
<td valign="top"><font size="-1">'<td><a href="</font><font
size="-1"><font size="-1"><font color="#9999ff">http://Another_Resource/</font></font><%=
<font color="#3366ff">value.genus</font> %>+<%=<font
color="#3366ff"> value.species</font> %>" title="</font><font
size="-1"><font size="-1"><font size="-1"><font
color="#ff6666">some descriptive text for the
tool tip</font></font></font> on <%= <font
color="#3366ff">value.name</font> %>" rel="<%=
value.rel %>"
class="thumbImage1"><id="thumb1"><div
class="forward"></div>
</id="thumb1"></a>' + </font><br>
<br>
</td>
<td valign="top"><font size="-1">a resource which requires
a genus and species separately. link is shown as an
icon</font></td>
</tr>
<tr>
<td valign="top"><font size="-1">'%></tbody></table></div>'
</font><br>
</td>
<td valign="top">closing<br>
</td>
</tr>
</tbody>
</table>
<p><br>
Here is an example which includes links to <br>
</p>
<ul>
<li>DiscoverLife, </li>
<li>The Encylopedia of Life, </li>
<li>The Australian Faunal Directory, </li>
<li>Atlas of Living Australia Species page, </li>
<li>The National Species List Nomenclator, </li>
<li>and maps of taxon density and occurence from the Atlas of
Living Australia. </li>
</ul>
<p>
<font size="-2">tmpl : '<table style="border:
none"><tbody><tr><th></th><th>links</th><th>
</th><th> </th><th>
</th><th> </th></tr>' + <br>
'<% _.each(nodeList , function( value ) {' +<br>
' %> <tr>'+ <br>
'<td><a
href="http://www.environment.gov.au/biodiversity/abrs/online-resources/fauna/afd/taxa/<%=
value.name %>" title="<%= value.name %> in the AFD"
rel="<%= value.rel %>" class="thumbImage1"><%=
value.name %></a></td>' + <br>
'<td><a
href="http://bie.ala.org.au/species/<%= value.name %>"
title="about <%= value.name %> ALA species page "
rel="<%= value.rel %>"
class="thumbImage1"><id="thumb1"><div
class="forward"></div>
</id="thumb1"></a></td>' + <br>
'<td><a
href="http://biodiversity.org.au/name/<%= value.name
%>" title="about <%= value.name %> in NSL
nomenclator " rel="<%= value.rel %>"
class="thumbImage1"><id="thumb1"><div
class="forward"></div>
</id="thumb1"></a></td>' + <br>
'<td><a
href="http://www.discoverlife.org/mp/20q?search=<%=
value.name %>+<%= value.species %>" title="images
and info from Discover Life on <%= value.name %>"
rel="<%= value.rel %>"
class="thumbImage1"><id="thumb1"><div
class="forward"></div>
</id="thumb1"></a>' + <br>
'<td><a
href="http://biocache.ala.org.au/ws/density/map?q=<%=
value.name %>" title="<%= value.name %> Aus density
Map (if sufficient samples)" rel="<%= value.rel %>"
class="thumbImage1"><id="thumb1"><div
class="forward"></div></id="thumb1"></a></td></td>'
+<br>
'<td><a
href="http://eol.org/search/show?q=<%= value.name
%>&amp;type[]=taxon_concept&amp;type[]=image&amp;commit=Filter"
title="images of <%= value.name %> in EOL" rel="<%=
value.rel %>"
class="thumbImage1"><id="thumb1"><div
class="forward"></div>
</id="thumb1"></a></td></tr> <%
}); ' + <br>
'%></tbody></table></div>'
</font></p>
<h4><a class="mozTocH4" name="mozTocId992837"></a><a
name=".._alternative_functions"></a>.. alternative functions<br>
</h4>
<p>Alternative functions which define actions on hover and
click on nodes and clades</p>
<p> presentClade to replace underscores with spaces
in taxon names<br>
</p>
<p><br>
<font color="#6600cc">
presentClade: function (clade) {<br>
var tmpl = st.config.tmpl,<br>
nodeList = [],<br>
node, html, split;<br>
for (var i = 0; ((i < clade.length) & (i < 30));
i++) {<br>
node = {}<br>
node.name = clade [ i ].name;<br>
node.plus = clade [ i ].name.replace(/\s+/g,'+');<br>
split = node.name.split( /\s+/ );<br>
if ( split.length > 1 ){<br>
node.genus = split [ 0 ];<br>
node.species = split [ 1
];
<br>
} else {<br>
node.species = split [ 0 ];<br>
}<br>
node.rel = node.species + '' + i;<br>
node.index = i;<br>
nodeList.push ( node
);
<br>
}<br>
if ( tmpl ) {<br>
tmpl = _.template ( tmpl );<br>
html = tmpl ( {nodeList: nodeList});<br>
} else {<br>
<br>
}<br>
return html;<br>
<br>
}, //presentClade </font><br>
<br>
</p>
<p></p>
<h4><a class="mozTocH4" name="mozTocId305207"></a><a
name="GUIDs_LSIDs"></a>GUID's (LSIDs)</h4>
<p>An example where GUIDs are used (<a
href="file:///Volumes/Text/Documents-working/3%20Current%20Projects/3%20*PhyloJIVE/3.pj.%20Current%20Projects/WebApp/git/phyloJIVE/hornwortsPlus.html">Hornworts</a>
plus LSIDs). Taxon names are looked up with a nomenclator
then translated to the equivalent <a
href="http://en.wikipedia.org/wiki/LSID">LSID</a>. <br>
</p>
<p>Strictly speaking any GUID's should be supplied with the
phylogeny Or the creator of the phylogeny should explicitly
state that they are using the taxon concepts as recorded
in a particular source at a particular time. However, such
perfection is rarely attainable. This template is provided as
a proof of concept.<br>
</p>
<br>
</section>
</div>
<!-- FOOTER -->
<div id="footer_wrap" class="outer">
<footer class="inner">
<p class="copyright">Phylojive maintained by <a
href="https://github.com/TRIN">TRIN</a></p>
<p>Published with <a href="http://pages.github.com">GitHub
Pages</a></p>
</footer>
</div>
</body>
</html>