Dear Dr. Rendón,
Thank you for your interest. All R code to represent shape variation along pPCA axes was sourced from the Momocs package in R (*).
Because we empirically found that using pPCA on our Extension Range of Motion data resulted in a lamba value of 0, pPCA of these data yields equivalent axes to using non-phylogenetic PCA. Therefore, the code to plot major axes of Extension ROM (Figure 1E) simply used a combination of the `PCA()` and `plot.PCA()` functions from Momocs. Please refer to lines 97-121 our R script "03_FlightPhyloStaticDataImport.R", available in our Figshare repository.
For the wing shape data (Figure 1D), stronger phylogenetic signal was found and accordingly our pPCA was informed by a Brownian motion model. Please see line 236 of our R script "03_FlightPhyloStaticDataImport.R". To plot the major axes of shape variation in this pPCA, we instead used the Momocs function `PCA2shp_efourier()`, which provides the user with contours of shapes based on supplied PC axis values. The shapes plotted in the top half of Figure 1D were achieved via supplying the maximal values along each phylogenetic PC axis from our data while setting all other phylogenetic PC axes to zero.
We hope this answers your question. Please let us know if you have any additional questions.
Best regards,
Vikram Baliga and Doug Altshuler
* Momocs citation: Bonhomme V, Picq S, Gaucherel C, Claude J (2014). “Momocs: Outline Analysis Using R.” Journal of Statistical Software, 56(13), 1–24. https://www.jstatsoft.org/v56/i13/. https://github.com/MomX/Momocs.
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this
article to respond.