Tuesday, 19 September 2017

Log scale your map displays

In Biodiverse version 2 you will be able to log scale the colour stretch on the map.  This is a pretty minor change in some ways, but does allow much better visualisations of results when the distributions are highly left skewed.

The Spatial and Cluster tabs have a legend option to allow you to turn it on or off.

The View Labels tab currently switches between log and linear scaling depending on the maximum value and the maximum possible value.  It will use log scaling when there are more than 20 labels to highlight or the the maximum value across highlighted cells is less than 0.8 times the number of selected labels.  Otherwise it will use a linear scaling (so if there are 20 selected labels, but no cell contains more than 16 then it will log scale the display).


Here is a video to demonstrate the process.  The first part shows a matrix visualisation of a Region Grower analysis (a simple pair-wise complementarity analysis, in this case using richness as the index).  It is much easier to see the spatial patterns when the colour stretch is log scaled.  The second shows a spatial analysis.  In this case the log scaling does not make too much difference.  The third shows the view labels tab.  Note that the log scaling makes it  much easier to see an entire clade on a tree, as previously the colours would have been washed out.








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

Visualise spatial analysis results on the tree



Many of the indices in Biodiverse allow users to see what the relative contribution of branches on the tree are to one or more indices.  For example, one can see what the weighted branch lengths are in a phylogenetic endemism analysis, or see what the relative loss of phylogenetic diversity would be if a branch was lost from a sample.

Previously the only way to inspect these was to use a popup window by control-clicking on a cell.  This is useful, but rapidly becomes difficult when there are many cells to explore.

In version 2 of Biodiverse, users can now visualise these values on the tree as the mouse is hovered over cells.

This builds on the turnover displays that were added a while ago.

Rather than a long blog post, it is probably best to simply show a video.  In this example, a set of indices are calculated for the Acacia data set described in several publications (see the full list here and search for Acacia).

Note how the display is log scaled by default, but linear scaling can be used if preferred.  The default colour scheme uses the rainbow-ish default, as in the map display, but other schemes can also be used.  Users can also hide the legend if it gets in the way.







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


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