Software

Software Packages

The Polly lab produces software to assist in morphometric, phylogenetic, and ecometric analyses.  Our code was developed for research that led toward our publications or for instruction in our courses.  We've packaged it for use by anyone who is interested.  Most of our coding is in Mathematica©, which is a general mathematical and statistical package analogous to or Matlab.  Our Mathematica add-ons require the user to already have a Mathematica license.  We have made a few of the same functions available as scripts, which you will also find on this page.

Geometric Morphometrics for Mathematica

Download Polly Morphometrics 12.3 [.m file]
Download User's Guide [PDF]
Latest update 23 March 2019

This Mathematica© add-on package performs common geometric morphometric functions. Includes Procrustes superimposition, thin-plate spline graphics, Centroid Size calculation, Procrustes distance calculation, Mantel tests, Ancestral Node reconstruction, Eclidean Distance Matrix Analysis (EDMA), and import function for TPS files.

Installation. The file is in Mathematica's ".m" format, which can be imported into Mathematica 6.0 and later (some functions do not work in earlier versions of Mathematica). Install using the "Install" item on the "File" menu. Once installed, you must load the package with the line <<PollyMorphometrics or whatever name you choose at installation. 

Changes in Version 12.x. Upgrade of PrincipalCoordinates[] function to return principal coordinates scores from a data matrix based on Euclidean distance with option for Gower distance. Update in BreakOutlines[] function to space points at equal distances across the breakpoints in addition to within the outline segments. Fixed bugs that affected ReconstructAncestorShapes[], TreeToMorphospace[], and PhylogeneticPrincipalComponentsOfShape[] in data sets with many taxa and landmarks. Added Mantel[] and MantelForMorphometrics[] functions to test similarity in covariance structure.  Added RVCoefficient[]CRCoefficient[], and AdamsCRTest[] functions for evaluating modularity and integration.  Also converted all "Modules" to "Blocks" for improved efficiency.

Changes in Version 11.x. Upgrade of tpsImport[] function to be compatible with OUTLINES; addition of function to break curves and outlines into segments and place equally spaced semilandmarks on them. Bug fix in tpsSpline[] that caused spline images to be malformed when the number of landmarks was large and shape differences were large. Bug fix in BreakOutlines[] that cause function to fail if two or more outline points were equidistant from nearest landmark point. Bug fix in tpsImport[] for files with both outlines and scale factors.

Changes in Version 10.x. Addition of ShapeMANOVA[] function to perform one-way multivarite analysis of variance (MANOVA) on Procrustes superimposed coordinates, new version of EqualSpace[] function to arrange points on a curve or outline, minor improvements to the performance of the functions that reconstruct ancestral shapes or project phylogenetic trees into shape space.

This package is used in the Indiana Univesrity course G562, Geometric Morphometrics.

Cite as: Polly, P.D. 2019. Geometric morphometrics for Mathematica. Version 12.3. Department of Earth and Atmospheric Sciences, Indiana University: Bloomington, Indiana. https://pollylab.indiana.edu/software/ 

Phylogenetics for Mathematica

Polly Phylogenetics 6.3 package [.m]
User's Guide [PDF]
Updated 23 March 2019

This add-in package for Mathematica performs basic phylogenetic functions, including reading and drawing Newick format trees, calculating phylogenetically independent contrasts, reconstructing ancestral values for continuous traits, performing random walks, and simulating continuous traits on phylogenetic trees.

The file is in Mathematica's ".m" format, which can be imported into Mathematica 6.0 and later (functions do not work in earlier versions of Mathematica). Install using the "Install" item on the "File" menu. Once installed, you must load the package like any other with the line <<PollyPhylogenetics, using either this suggested name or another.

Changes in Version 6.x.  Many new functions.  PhylogeneticRegression performs a PGLS linear regression, MapTraitsOntoTree produces a colored graphic showing estimated trait values on a phylogenetic tree, PruneTree extracts a tree for a selected subset of taxa in a larger tree, Kappa estimates Blomberg's K for a univariate trait, KappaMultivariate estimates Adams' for a highly multivariate geometric morphometric data set, and SharedPhylogeneticHistory and MeanTreeDistance report statistics useful in the study of phylogenetic community assembly.  New and more efficient functions are also available for estimating rates and ancestral node values for traits.  Changed all "Modules" to "Blocks" for improved efficiency.

Changes in Version 5.x.  ThreeModelTest (new function): Performs evolutionary model selection on trait data from an evolving lineage as described by Hunt (2006). Updated July 2018 to remove minor inconsistencies with Hunt's code.  PagelsLambda (new function): Calculates Pagel’s Lambda for a univariate continuous trait on a phylogenetic tree.

Changes in Version 4.x.  ReadNewick (improved function): Newick format files without branch length specifications are now automatically imported with unit branch lengths. ReconstructNodes (improved function): fixed incompatibilities that caused problems with TreeToMorphospace and PhylogeneticPrincipalComponents functions in the Morphometrics for Mathematica package.

Changes in Version 3.0. Improved efficiency in SimulateContinuousTraitsOnTree function.

Changes in Version 2.3. Addition of LineageEvolution function to simulate trait evolution in an anagenetic lineage under models of Brownian motion, directionality, or stabilizing processes.

Cite as: Polly, P.D. 2018. Phylogenetics for Mathematica. Version 6.0. Department of Earth and Atmospheric Sciences, Indiana University: Bloomington, Indiana. https://pollylab.indiana.edu/software/

Quantitative Paleontology for Mathematica

Polly Quantitative Paleontology 5.0 package [.m]
User's Guide [PDF]
Updated 18 June 2016

This package was developed for the Indiana University course EAS G563, Quantitative Paleontology.

The file is a ".m" file, which can be imported into Mathematica 6.0 and later (functions do not work in earlier versions of Mathematica). Install using the "Install" item on the "File" menu. Once installed, you must load the package like any other with the line <<PollyQuantPaleo, using either this suggested name or another. 

Changes in 5.x. Added functions for Principal Coordinates Analysis (PCO) and Gower distances. Fixed bugs in Disparity[] and DisparityWithStages[] and added new character-based distance metric.

Changes in 4.x. All functions return data using new methods that conserve memory. Disparity[] function updated so it calculates statistics over all dimensions of morphospace. LetThereBeLight[] function now stops when standing diversity reaches 10,000 lineages unless user specifies otherwise. LetThereBeLightWithPseudoExtinction[] is a new function similar to LetThereBeLight, but with pseudo extinction of the parent lineage when speciation takes place. ConvertParacladeToTree[] is a new function that converts the output of LetThereBeLightWithPseudoExtinction[] to Newick format so that it can be drawn or analysed using functions from the Phylogenetics for Mathematica package.

Changes in 3.0.LRI[], a new function to estimate rate and mode of evolution using the Log-Rate/Log-Interval method of Gingerich (1993).

Cite as: Polly, P.D. 2016. Quantitative Paleontology for Mathematica. Version 4.3. Department of Earth and Atmospheric Sciences, Indiana University: Bloomington, Indiana.  https://pollylab.indiana.edu/software/

Modularity for Morphometrics

Download the Modularity 2.0 package here
User's Guide here
Updated 7 April 2018

This package contains functions for analyzing morphological integration and modularity. The scope of the package and instructions for its use are contained in the accompanying User Guide. It accompanies the review of modularity by Goswami and Polly (2010).  Users are referred to that paper for a discussion of the methods embedded in this package, including their strengths and weaknesses, and for elaboration of other methods that address broader problems.  

The package itself is a ".m" file, which can be imported into Mathematica 6.0 and later (functions do not work in earlier versions of Mathematica). Save the file as text then install using the "Install" item on the "File" menu. Once installed, you must load the package like any other with the line "<<Modularity`", using either this suggested name or another.

Package was updated April, 2018 to be compatible with recent versions of Mathematica.

Cite as: Polly, P.D. and A. Goswami. 2010. Modularity for Mathematica, Version 2.0. Department of Earth and Atmospheric Sciences, Indiana University: Bloomington, Indiana.