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

rate.mapR Documentation

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

Description

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)

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.

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).

Value

The function returns a list including:

  • $selected a list of PCs axes selected for higher evolutionary rates for each species.

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

Author(s)

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

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

  ## Not run: 
  data(DataSimians)
  DataSimians$pca->pca
  DataSimians$tree->tree
  dato<-pca$PCscores
  cc<- 2/parallel::detectCores()

  RRphylo(tree,dato,clus=cc)->RR

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

  
## End(Not run)

RRphylo documentation built on June 7, 2023, 5:49 p.m.