/* | |
THIS HyPhy BATCH LANGUAGE FILE IS PROVIDED AS AN EXAMPLE/TOOL FOR | |
THE 2nd EDITION OF 'The Phylogenetic Handbook' | |
Written by | |
Sergei L Kosakovsky Pond ([email protected]) | |
Art FY Poon ([email protected]) | |
Simon DW Frost ([email protected]) |
RequireVersion ("2.22"); | |
VERBOSITY_LEVEL = 1; | |
// namespace 'io' for interactive/datamonkey i/o functions | |
LoadFunctionLibrary("lib2014/IOFunctions.bf"); | |
// namespace 'utility' for convenience functions | |
LoadFunctionLibrary("lib2014/UtilityFunctions.bf"); | |
io.displayAnalysisBanner ({"info" : "EDEPS is a modification of DEPS to look for directional evolution along all or |
/* 1. include a file to define the genetic code | |
Note the use of base directory and path forming variables to make this analysis | |
independent of directory placement | |
*/ | |
/*incFileName = HYPHY_LIB_DIRECTORY+"TemplateBatchFiles"+DIRECTORY_SEPARATOR+"TemplateModels"+DIRECTORY_SEPARATOR+"chooseGeneticCode.def"; */ | |
/* ExecuteCommands ("#include \""+incFileName+"\";"); */ | |
/* #include "functions.txt";*/ /*functions.txt has the genetic code*/ |
In addition to linear/cladogram layouts, phylotree.js also implements a radial or cicrular layout. Invoking it is a matter of overriding the default setting.
It is important to set the radial option prior to binding Newick data to the tree, because at that time nodes are mapped to screen coordinates using current settings.
The layout mode can be changed after the tree has been rendered, but then it is
This is an example of using phylotree.js settings to create a tree which is suitable for a static display: no clickable nodes, nothing is selectable, fixed sizes in both dimensions.
The Newick string is loaded from a file using an asynchronous d3.text call.
Create a phylotree.js object from a Newick tree string, and display it in an SVG element using default settings and styles. Because the default tree view supports clickable nodes, it is necessary to include jQuery
and Bootstrap
. It is always necessary to include d3
, and phylotree.js
script and styles (unless overridden by the user).
Click on internal nodes to bring up menus that allow you to collapse/select them.