[statistical exploration of landscapes of phylogenetic trees]
treescape implements statistical tools for the exploration of
sets of phylogenetic trees describing the evolutionary relationships between the same taxa.
This web interface provides an easy access to the resources implemented in the package.
Each tab is made of two panels: a sidebar used to choose inputs, analysis tools and aesthetics,
and a main panel displaying results.
Tree landscape explorer
The Tree landscape explorer tab is where the whole tree space can be explored.
Choose between a two- or three-dimensional plot to visualise the trees using Metric Multidimensional Scaling (MDS, a.k.a. Principal Coordinates Analysis, PCoA),
which calculates the best reduced-spaced visualisation of the distances between trees.
The sidebar contains the following sections:
- Input: to upload the set of trees to analyse
- Analysis: to customize the analysis
- Aesthetics: to customize the graphics
Input
treescape takes a list of phylogenetic trees as input.
The user can choose between data distributed with the package, or provide input files.
Two types of input files can be used:
- R objects saved using the function save(x, file="x.RData")
where 'x' is a list of trees of the class multiphylo (from the ape package. Accepted extensions are ".RData" and ".rda".
- list of trees saved in a nexus file, e.g. using ape's function write.nexus(x, file="x.nex") in R.
Analysis
Metric:
the metric to be used to measure distances between tips of the trees. Choose from:
- Kendall Colijn metric: the tree metric developed by Kendall & Colijn; used by default
- patristic: the sum of branch lengths on the shortest path between pairs of tips
(see ?distTips in the package adephylo)
- Number of nodes: the total number of internal nodes on the shortest path between pairs of tips
(see ?distTips in the package adephylo)
- Abouheif: the Abouheif metric
(see ?distTips in the package adephylo)
- Sum of direct descendents: another metric related to the Abouheif metric
(see ?distTips in the package adephylo)
Lambda:
The value of lambda used in Kendall & Colijn's metric.
Number of MDS axes retained :
The number of principal components to retain in the Metric Multidimensional Scaling (MDS).
Identify clusters?
Whether to find clusters using the findGroves function.
When this option is selected, you will also have the option to choose the clustering method and number of clusters.
Aesthetics
A number of graphical options are available.
View:
The default is to view the entire "tree landscape", that is, a 2- or 3-dimensional map where the points correspond to trees
and the distances between points approximate their relative distances in tree space, according to the chosen measure.
The rest of the options detailed below correspond to this view.
An alternative is to pick a single "reference tree" and plot the distances from it to each other tree.
If this view is chosen, you will be given the option to select the reference tree of interest.
When there are many trees in the set, it may be helpful to expand the plot by using the scale bar to increase the height,
to view the tree labels more easily.
Finally, if clusters are identified in the analysis then these will be marked on this plot in the corresponding colours.
Note that this gives an indication of the quality of the clustering: highly scattered clusters correspond to poor resolution in the space.
Clusters can overlap in this view: it is quite possible for multiple clusters of trees to be equidistant from the reference tree
in different "directions" in the space.
Plot dimensions:
If three or more axes have been retained, the option to view the space in three dimensions will be available.
It is possible to rotate the image by clicking on it and dragging the mouse, and to zoom in and out with the mouse scroll button.
Note that 3D plotting depends on the shinyRGL package, which (currently) is not supported on the latest versions
of the package rgl .
If no image or a spurious message about enabling javascript appears, we recommend removing the current installation of rgl
from your library and then installing the patch:
devtools::install_github('trestletech/rgl@js-class') .
For more details and to track progress on this issue, see
shinyRGL on GitHub.
x/y/z axes:
Used to select which principal components are represented as x and y axes
(and, if viewing in 3D, the z axis) on the scatterplot.
Output
Beneath the scatterplot are output options: the scatterplot, trees and analysis results can be exported in various formats.
Currently available options are:
- save the 2D scatterplot as a .png file. Unfortunately a formal method to save the 3D plot is not
yet supported, but you can right-click (Mac: long-click) on the image and select 'Save image as ...'.
- save trees to a Nexus file (.nex)
- save results as .csv file (spreadsheet-like text file; compatible with most systems);
results are output as a table where each row is a tree label, and columns contain optional
clustering results as well as principal components (PC) of the Metric Multidimensional Scaling
(MDS) of the tree space
- save results as an R object (.RData); in this case, two objects will be saved in the
.RData: 'trees' will be a list of trees of class 'multiPhylo', and 'analysis' will be the results
of the analysis; when clusters are not inferred, 'analysis' is the output of the function
'treescape'; when clusters are inferred, 'analysis' is the output of the function 'findGroves'.
Tree viewer
The Tree viewer tab is where individual trees can be examined.
The sidebar contains the following sections:
Input
The tree selection options are as follows:
- Median tree: select the overall median tree, or, if clusters have been identified, the median from each cluster
- General tree selection: select an individual tree by its name (if provided) or number in the list of trees supplied
Aesthetics
A number of graphical options are available.
See ?plot.phylo from the package ape for more details.
Output
Beneath the tree is the option to save the image as a .png file.
densiTree viewer
The densiTree viewer tab is where collections of trees can be viewed together using the
densiTree function from the package phangorn, which is based on the
software densiTree, which provides
considerably more functionality.
The sidebar contains the following sections:
- Input: to pick the collection of trees to view
- Aesthetics: to customize the graphics
Input
The entire tree set can be viewed using the option 'All trees'. Note that this is likely to be slow for large sets of trees.
If clusters have been detected in the Tree landscape explorer tab then the collection of trees from each cluster can also be selected.
This can help to show the variation within the cluster.
Aesthetics
A number of graphical options are available; further options will be added soon.
Output
Beneath the densiTree plot is the option to save the image as a .png file.
More information
treescape is developed on github.
For questions, bug reports, feature requests and contributions, please
use github's issue system.
[Back to top]