Showing posts with label tree exports. Show all posts
Showing posts with label tree exports. Show all posts

Tuesday, 19 September 2017

Export lists to Newick format

In version 2 of Biodiverse you can now export any lists that are stored on a tree to the Nexus format.

A useful example of this is when you run calculations for each node of a cluster tree, thereby using the terminal nodes (branches) below each branch as the neighbourhood units in a spatial analysis.  An example of this in practice is in González-Orozco et al. (2014)  where the environmental parameters of each biogeographic region were summarised (see table 4 in that paper).

In a previous post I described how you can export the colours from the Biodiverse display to Nexus format to more easily generate figures for publication.  Now you can also export the values of the results to Nexus, which means you can use them for further analysis or alternate display methods using tools such as FigTree or Mesquite.

Below are images showing the general process in practice.

Note that the Nexus format does not support a hierarchy of names, so the lists need to be flattened.  Given that it is possible to have items with the same value within different lists in Biodiverse (e.g. for list indices that generate a result per label in a set), the exported names use the list name followed by the item name, joined by two underscores e.g. SPATIAL_RESULTS__ENDC_CWE.



Setting up a cluster analysis where a set of endemism indices will be calculated for each branch in the cluster tree.

Displaying the results, in this case the Corrected Weighted Endemism (CWE) for the set of branches intercepted by the blue slider bar on the dendrogram


The exported tree, but with default display settings.  


And now with thicker branches, and the colours set to show the CWE results using a divergent red-blue colour scheme.


And with the Richness index plotted using the HSB spectrum.


And here is a video of the process in Biodiverse (partly as a test to see if it works):





Shawn Laffan
19-Aug-2017


For more details about Biodiverse, see http://purl.org/biodiverse 

For the full list of changes in the 1.99 series (leading to version 2) see https://purl.org/biodiverse/wiki/ReleaseNotes (for all issues addressed or being targeted to fix for version 2, see https://github.com/shawnlaffan/biodiverse/milestone/4 ).

To see what else Biodiverse has been used for, see https://purl.org/biodiverse/wiki/PublicationsList


You can also join the Biodiverse-users mailing list at http://groups.google.com/group/Biodiverse-users


Wednesday, 26 April 2017

Biodiverse now exports tree branch colours

Biodiverse version 2 will allow you to export the tree branch colours.  This means you can now get your tree colours to the point that you are happy with them, and export them to another program such as FigTree to generate figures for a publication.

Colours can be exported with the Nexus and tabular Tree formats.  If you use the tabular format then there will be a column in the output table called Colour.  For the Nexus format, the colours are stored in the comments block for each branch.

Click on the "Export colours" checkbox to export the colours in a Nexus file. 

A few examples are below.

View labels tab with a set of labels highlighted on the tree.


The selection colours displayed in FigTree.

A cluster analysis with six clusters coloured.

The tree in FigTree with the six clusters coloured.  

A user defined selection.

The same user defined selection in FigTree.

The colouring works for anything that is applied to the tree, so you can also export continuous palettes when you have calculations per node (branch).

PD calculated for each cluster node (branch).

And the same PD colouring now in FigTree.

Kudos to Luke Fitzpatrick for getting it working.

Shawn Laffan
26-Apr-2017


For more details about Biodiverse, see http://purl.org/biodiverse 

For the full list of changes in the 1.99 series (leading to version 2) see https://purl.org/biodiverse/wiki/ReleaseNotes (for all issues addressed or being targeted to fix for version 2, see https://github.com/shawnlaffan/biodiverse/milestone/4 ).

To see what else Biodiverse has been used for, see https://purl.org/biodiverse/wiki/PublicationsList


You can also join the Biodiverse-users mailing list at http://groups.google.com/group/Biodiverse-users