Skip to content

Instantly share code, notes, and snippets.

View spond's full-sized avatar

Sergei Pond spond

View GitHub Profile
@spond
spond / dNdS.bf
Created August 21, 2015 19:50
Pairwise dN/dS estimation
/*
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 (spond@ucsd.edu)
Art FY Poon (apoon@ucsd.edu)
Simon DW Frost (sdfrost@ucsd.edu)
@spond
spond / EDEPS.bf
Created August 15, 2015 18:23
EDEPS HBL files
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*/
@spond
spond / README.md
Created July 13, 2015 22:21
Multiple trees on page

Multiple trees on a single page

@spond
spond / README.md
Last active August 29, 2015 14:24
Radial tree layout

Different tree layouts.

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

@spond
spond / README.md
Last active May 3, 2017 20:27
Vanilla tree

Non-interactive tree using phylotree.js

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.

@spond
spond / README.md
Last active November 22, 2023 09:52
phylotree.js "Hello World"

The simplest example of using phylotree.js

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.