-
Notifications
You must be signed in to change notification settings - Fork 0
Home
An R tool for standardised rigid rotations of articulated Three-Dimensional structures with application for geometric morphometrics
The quantification of complex morphological patterns typically involves comprehensive shape and size analyses, usually obtained by gathering morphological data from all the structures that capture the phenotypic diversity of an organism or object. Articulated structures are a critical component of overall phenotypic diversity, but data gathered from these structures are difficult to incorporate in to modern analyses because of the complexities associated with jointly quantifying 3D shape in multiple structures. While there are existing methods for analysing shape variation in articulated structures in Two-Dimensional (2D) space, these methods do not work in 3D, a rapidly growing area of capability and research. Here we describe a simple geometric rigid rotation approach that removes the effect of random translation and rotation, enabling the morphological analysis of 3D articulated structures. Our method is based on Cartesian coordinates in 3D space so it can be applied to any morphometric problem that also uses 3D coordinates (e.g. spherical harmonics). We demonstrate the method by applying it to a landmark-based data set for analysing shape variation using geometric morphometrics. We have developed an R tool (ShapeRotator) so that the method can be easily implemented in the commonly used R package geomorph and MorphoJ software. This method will be a valuable tool for 3D morphological analyses in articulated structures by allowing an exhaustive examination of shape and size diversity.
In this Wiki we illustrate the functions available within the ShapeRotator R tool and the basic steps required in order to successfully implement the rotation on a dataset of 3D coordinates. ShapeRotator allows the rigid rotation of sets of both landmarks and semilandmarks used in geometric morphometric analyses, enabling morphometric analyses of complex objects, articulated structures, or multiple parts within an object or specimen.
If you have any questions you can contact Marta Vidal-García at [email protected]
Citation: M. Vidal-García, L. Bandara and J.S. Keogh. ShapeRotator: An R tool for standardized rigid rotations of articulated three-dimensional structures with application for geometric morphometrics. Ecology and Evolution. In press. DOI: 10.1002/ece3.4018
website: http://marta-vidal-garcia.weebly.com
install.packages("devtools")
library(devtools)
install_github("marta-vidalgarcia/ShapeRotator")
library(ShapeRotator)
We first import the two datasets to joing using the R package geomorph
library(geomorph)
For example, if we wanted to import a tps file we would do the following:
data_1 <- readland.tps(“data_1.tps”, specID = “ID”, readcurves = F)
data_2 <- readland.tps(“data_2.tps”, specID = “ID”, readcurves = F)
For more help on importing the GM datasets, please see Adams et al. (2017) and the associated help files in geomorph. Please note that this method also works for semilandmarks.
You will need to select different number of landmarks and the associated rotation axes depending on whether you would like to perform a simple.rotation() OR a double.rotation()
For simple.rotation() each structure needs to have three selected landmarks: landmarks A, B, C for data_1 and landmarks D, E, F for data_2. For double.rotation() we will need an extra landmark (landmarks A, B, C, D for data_1 and landmarks E, F, G, H for data_2).
During this step, each structure will be translated to the point of origin so that ̃p0 =(0,0,0); thus, the distance from the coordinates of landmark A (Ax, Ay, Az) is substracted from all the landmarks in all specimens, for example (Nx − Ax, Ny – Ay, Nz – Az) for landmark N. This translation is made with the function translate().
Translation for a single-point articulated structure:
For the first dataset:
data.1_t <- translate (T = data_1, landmark = landmark_A)
For the second dataset:
data.2_t <- translate (T = data_2, landmark = landmark_D)
for the simple.rotation()
Translation for a double-point articulated structure:
For the first dataset:
data.1_t <- translate (T = data_1, landmark = landmark_A)
For the second dataset:
data.2_t <- translate (T=data_2, landmark = landmark_E)
for the double.rotation()
Please note that the default is to set the origin point to, but this can be changed to another origin point. For example, to the point c(1, 3, 5):
data.1 _ t <- translate (T=data _ 1, landmark=landmarkA, origin = c(1,3,5))
data.2 _ t <- translate (T=data _ 2, landmark=landmarkD, origin = c(1,3,5))
Please choose how to proceed: simple.rotation() OR double.rotation()