Skip to content
Michael Landis edited this page Oct 23, 2013 · 65 revisions

Phylowood is an open source web utility to turn the geographical dispersal of your biological system into interactive animations.

Quick start

Need a little help? You'll be up and running within 60 seconds.

  • First, open the Phylowood web service in a new window.
  • Next, select "h5n1" from the drop-down menu reading "select demo".
    Phylowood
  • Phylowood will then draw this dataset's phylogeny and map.
    Phylowood
  • Finally, click the Play button. Speed up the play time by clicking the Fast Forward button (up to 8x).
    Phylowood

Keep reading if you'd like to learn more.

About Phylowood

Why use Phylowood?

  • Animations quickly convey information and engage audiences.
  • Interactive animations allow you to highlight important aspects of your dataset and focus on regions, lineages, and times of high activity.
  • Configurable animation styles to suit your model or hypothesis assumptions.
  • Accepts your Phylowood-formatted data as input.
  • Requires no software except a modern web browser (Javascript HTML5-compliant).
  • Open source and hosted on GitHub, so you can fork the project and tweak it as you like.

Overview

Typical model assumptions

  • Phylogeography
    Phylogeographical analyses typically associate a single individual per lineage.
  • Biogeography
    Biogeographical analyses typically associate all members of a population per lineage.
  • Discrete models
    Discrete models divide a geography into distinct areas (like a chess board). Organisms may only exist in these defined areas.
  • Continuous models
    Continuous models do not divide a geography into areas. Organisms may exist at any coordinate in the geography.

Animation objects

  • Phylogenetic branch
    Branches are proportional to time (or other units, if specified). Phylowood only animates branches that exist at a given time.
  • Markers
    Markers are drawn on the map to represent organisms corresponding to each branch. Markers may be drawn differently according to the model assumptions and according to the value associated to each lineage, area, and time.
    Discrete biogeography & discrete phylogeography: pie clustering
    Pie slice depths are proportional to the value associated with the lineage at some time and discrete area. Phylowood
    Continuous phylogeography
    Marker radii are proportional to the value associated with the lineage at some time and continuous geographical coordinate. Phylowood
  • Phylogenetic continuum
    This term refers to the set of a lineage, all of that lineage's ancestral lineages, and all of that lineage's descendant lineages. The phylogenetic continuum is the operand of highlighting and masking effects.

Animation controls

  • Highlighting
    Hover the mouse over markers and branches to highlight a phylogenetic continuum. Removing the mouse does these effects. Highlighting also displays information about the target below the map.
  • Masking
    Double-click a lineage to mask its phylogenetic continuum. Click a lineage to unmask. Unlike highlighting, masking persists until an unmasking event is called.
  • Media controls
    In order, the buttons are: Start, Reverse, Play (or Pause), Stop, Forward, and End.
    Phylowood
  • Map controls
    Click and drag to pan the map. Use the mouse wheel or the zoom buttons to zoom in and out.

Tutorials

Input data

Entering custom input

Uncheck the Auto-Load option and select a demo.
Phylowood
You can modify existing demos or even load your own data by simply pasting it into the text area.

Format

Phylowood uses the New Hampshire eXtended (.nhx) file format to associate ancestral area values with the internal nodes of the phylogeny. There are four control blocks in the Phylowood format. Example:

#NEXUS

Begin phylowood;
	description Discrete biogeography of moody cats found near Zurich.
	modeltype biogeography
	areatype discrete
	phylotimeoffset -50
	phylotimeunit Myr
	maptype clean
	drawtype pie
	pieslicestyle full
	piefillstyle outwards
	markerradius 250
End;

Begin taxa;
	Dimensions ntax=2;
	Taxlabels
		Mopey_cat
    	Ornery_cat
		;
End;

Begin geo;
	Dimensions ngeo=2;
	Coords
		0	47.37	8.55,
		1	48.50	9.00
		;
End;

Begin trees;
	Translate
		0	Mopey_cat,
		1	Ornery_cat,
		;
tree TREE1 = (0[&area_pp={1,0}]:1.0,1[&area_pp={0,1}]:1.0)[&area_pp={0.5,0.5}];
End;

Phylowood settings

The phylowood block assigns model and display preferences to the animation. To assign a setting, enter a new line as [setting_name] [setting_value]. Below is a list of current settings. The first setting is the default setting unless otherwise specified by the #SETTINGS block.

description: "", [any string]
modeltype: phylogeography, biogeography
areatype: continuous, discrete (Currently, areatype essentially enforces modeltype, but specify both to be safe and compatible with future updates.)
phylotimeoffset: 0.0, [any number]
phylotimeunit: "", [any word]
maptype: clean, named
drawtype: pie (for discrete models; only currently available option, but more to come)
pieslicestyle: even, full (used for pie only)
piefillstyle: outwards, inwards (used for pie only)
markerradius: 20, [any number] (NOTE: this value scales differently for different values of areatype, modeltype, and drawtype, and may require manual tweaking.)

Taxa

The taxa block maps taxon labels to the tree block described below.

Geography

The geo block contains a list of geographical coordinates, where each row is specified by [latitude] [longitude]. The order of the input is assumed to match the order of the area values (described in the Tree section).

Tree

The tree block contains a time-calibrated phylogeny with branch lengths and metadata, reported in the New Hampshire eXtended (.nhx) format. For example, a node with value 0.9 in area 2 and with value 1.0 in area 3 would be encoded as

[&area_pp={0.0,0.9,1.0,0.0}]

Values may be likelihoods, posterior probabilities, species abundances, morphological data, or qualitative "hunchiness". NOTE: animated marker sizes are proportional to value, so you will need to adjust the markerradius setting as appropriate.

Sharing URLs

Examples can be automatically loaded by including the following template in Phylowood's URL:

http://mlandis.github.io/phylowood/?url=examples/vireya.nhx

Screenshots and recordings

Although ideally, we would like to export SVGs and video from the Javascript animations, this is not yet implemented. Instead, we would recommend bayarea-fig that is designed to make publication-ready figures. It uses Phylowood's NHX format. For videos, we recommend using LICEcap to create animated gifs (example).

Author information

References

(to be added)

Sponsoring organizations

NESCent Google Summer of Code: 2012