conv.map: Mapping morphological convergence on 3D surfaces

View source: R/conv.map.R

conv.mapR Documentation

Mapping morphological convergence on 3D surfaces

Description

Given vectors of RW (or PC) scores, the function selects the RW(PC) axes which best account for convergence and maps convergent areas on the corresponding 3D surfaces.

Usage

conv.map(dataset,pcs,mshape,conv=NULL, exclude=NULL,out.rem=TRUE,
  show.consensus=FALSE, plot=TRUE,col="blue",names = TRUE)

Arguments

dataset

data frame (or matrix) with the RW (or PC) scores of the group or species to be compared.

pcs

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

mshape

the Consensus configuration.

conv

a named character vector indicating convergent species as (indicated as "conv" in dataset) and not convergent species (indicated as "noconv").

exclude

integer: the index number of the RW (or PC) to be excluded from the comparison.

out.rem

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

show.consensus

logical: if TRUE, the Consensus configuration is included in the comparison.

plot

logical: if TRUE, the pairwise comparisons are be plotted. For more than 5 pairwise comparisons, the plot is not shown.

col

character: the colour for the plot.

names

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

Details

conv.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). conv.map further gives the opportunity to exclude some RW (or PC) axes from the analysis because, for example, in most cases the first axes are mainly related to high-order morphological differences driven by phylogeny and size variations. conv.map finds and plots the strength of convergence on 3D surfaces. An output of conv.map (if the dataset contains a number equal or lower then 5 items) is an interactive plot mapping the convergence on the 3D models. In the upper triangle of the 3D multiple layouts the rows representing the reference models and the columns the target models. On the contrary, on the lower triangle the rows correspond to the target models and the columns the reference models. 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.

Value

The function returns a list including:

  • $angle.compare data frame including the real angles between the given shape vectors, the angles conv computed between vectors of the selected RWs (or PCs), the angles between vectors of the non-selected RWs (or PCs), the difference conv, and its p values.

  • $selected.pcs RWs (or PCs) axes selected for convergence.

  • $average.dist symmetric matrix of pairwise distances between 3D surfaces.

  • $suface1 list of coloured surfaces, if two meshes are given, it represents convergence between mesh A and B charted on mesh A.

  • $suface2 list of coloured surfaces, if two meshes are given, it represents convergence between mesh A and B charted on mesh B.

  • $scale the value used to set the colour gradient, computed as the maximum of all differences between each surface and the mean shape.

Author(s)

Marina Melchionna, Antonio Profico, Silvia Castiglione, Carmela Serio, 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. Melchionna, M., Profico, A., Castiglione, S., Serio, C., Mondanaro, A., Modafferi, M., Tamagnini, D., Maiorano, L. , Raia, P., Witmer, L.M., Wroe, S., & Sansalone, G. (2021). A method for mapping morphological convergence on three-dimensional digital models: the case of the mammalian sabre-tooth. Palaeontology, 64, 573–584. doi:10.1111/pala.12542

See Also

search.conv vignette ; relWarps ; procSym

Examples

  ## Not run: 
  data(DataSimians)
  DataSimians$pca->pca

  ## Case 1. Convergent species only
     dato<-pca$PCscores[c(1,4),]

     CM<-conv.map(dataset = dato,
                 pcs = pca$PCs,
                 mshape = pca$mshape,
                 show.consensus = TRUE)

  ## Case 2. Convergent and non-convergent species
     dato<-pca$PCscores[c(1,4,7),]
     conv<-c("conv","conv","noconv")
     names(conv)<-rownames(dato)

     CM<-conv.map(dataset = dato,
                  pcs = pca$PCs,
                  mshape = pca$mshape,
                  conv = conv,
                  show.consensus = TRUE,
                  col = "orange")
  
## End(Not run)

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