Learn R Programming

RRphylo (version 3.0.0)

rate.map: Mapping rate and direction of phenotypic change on 3D surfaces.

Description

The function is deprecated, please check the new version of rate.map in package RRmorph.

Given vectors of RW (or PC) scores, the function selects the RW(PC) axes linked to highest (and lowest) evolutionary rate values and reconstructs the morphology weighted on them. In this way, rate.map shows where and how the phenotype changed the most between any pair of taxa.

Usage

rate.map(x, RR, PCscores, pcs, mshape, out.rem = TRUE,
  shape.diff=FALSE, show.names=TRUE)

Value

The function returns a list including:

  • $surfaces a list of reconstructed coloured surfaces of the given species and of the most recent common ancestor.

Arguments

x

the species/nodes to be compared; it can be a single species, or a vector containing two species or a species and any of its parental nodes.

RR

an object generated by using the RRphylo function

PCscores

PC scores.

pcs

RW (or PC) vectors (eigenvectors of the covariance matrix) of all the samples.

mshape

the Consensus configuration.

out.rem

logical: if TRUE mesh triangles with outlying area difference are removed.

shape.diff

logical: if TRUE, the mesh area differences are displayed in an additional 3d plot.

show.names

logical: if TRUE, the names of the species are displayed in the 3d plot.

Author

Marina Melchionna, Antonio Profico, Silvia Castiglione, Gabriele Sansalone, Pasquale Raia

Details

After selecting the PC axes, rate.map automatically builds a 3D mesh on the mean shape calculated from the Relative Warp Analysis (RWA) or Principal Component Analysis (PCA) (Schlager 2017) by applying the function vcgBallPivoting (Rvcg). Then, it compares the area differences between corresponding triangles of the 3D surfaces reconstructed for the species and surface of the mrca. Finally, rate.map returns a 3D plot showing such comparisons displayed on shape of the mrca used as the reference.The colour gradient goes from blue to red, where blue areas represent expansion of the mesh, while the red areas represent contractions of the mesh triangles. In the calculation of the differences of areas we supply the possibility to find and remove outliers from the vectors of areas calculated on the reference and target surfaces. We suggest considering this possibility if the mesh may contain degenerate facets. Additionally, rate.map allows to investigate the pure morphological comparison of shapes by excluding the evolutionary rate component by setting the argument show.diff = TRUE. In this case, a second 3D plot will be displayed highlighting area differences in terms of expansion (green) and contraction (yellow).

References

Schlager, S. (2017). Morpho and Rvcg-Shape Analysis in R: R-Packages for geometric morphometrics, shape analysis and surface manipulations. In: Statistical shape and deformation analysis. Academic Press. Castiglione, S., Melchionna, M., Profico, A., Sansalone, G., Modafferi, M., Mondanaro, A., Wroe, S., Piras, P., & Raia, P. (2021). Human face-off: a new method for mapping evolutionary rates on three-dimensional digital models. Palaeontology. doi:10.1111/pala.12582

See Also

RRphylo vignette ; relWarps ; procSym

Examples

Run this code
  if (FALSE) {
  data(DataSimians)
  DataSimians$pca->pcasim
  DataSimians$tree->treesim
  cc<- 2/parallel::detectCores()

  RRphylo(treesim,pcasim$PCscores,clus=cc)->RRsim

  Rmap<-rate.map(x=c("Pan_troglodytes","Gorilla_gorilla"),RR=RRsim, PCscores=pcasim$PCscores,
                 pcs=pcasim$PCs, mshape=pcasim$mshape, shape.diff = TRUE)

  }

Run the code above in your browser using DataLab