High phenotypic plasticity at the dawn of the eosauropterygian radiation

The initial radiation of Eosauropterygia during the Triassic biotic recovery represents a key event in the dominance of reptiles secondarily adapted to marine environments. Recent studies on Mesozoic marine reptile disparity highlighted that eosauropterygians had their greatest morphological diversity during the Middle Triassic, with the co-occurrence of Pachypleurosauroidea, Nothosauroidea and Pistosauroidea, mostly along the margins of the Tethys Ocean. However, these previous studies quantitatively analysed the disparity of Eosauropterygia as a whole without focussing on Triassic taxa, thus limiting our understanding of their diversification and morphospace occupation during the Middle Triassic. Our multivariate morphometric analyses highlight a clearly distinct colonization of the ecomorphospace by the three clades, with no evidence of whole-body convergent evolution with the exception of the peculiar pistosauroid Wangosaurus brevirostris, which appears phenotypically much more similar to nothosauroids. This global pattern is mostly driven by craniodental differences and inferred feeding specializations. We also reveal noticeable regional differences among nothosauroids and pachypleurosauroids of which the latter likely experienced a remarkable diversification in the eastern Tethys during the Pelsonian. Our results demonstrate that the high phenotypic plasticity characterizing the evolution of the pelagic plesiosaurians was already present in their Triassic ancestors, casting eosauropterygians as particularly adaptable animals.


Craniodental data
Select the quantitative and discrete traits that are related to the craniodental region.

Exploration of the correlation between quantitative craniodental traits
Discrete features characterizing the morphology of the snout or the teeth are not taken into account in this correlation.

Postcranial data
We need to select the quantitative and discrete traits that are related to the postcranial region.

Scaling the dataset and computing the distance matrix
In the rest of this document, only the lines of code concerning the analyses performed with whole-body dataset will be displayed to show how major analyses have been realized.The procedure whould be the same for the craniodental and postcranial exclusive dataset by using the data sets produced beforehand in this document.

Computing the distance matrix
As the whole-body dataset contains continuous but also discrete traits, the Euclidean method is inapplicable and using the gower distance metric is more accurate.

Phylomorphospace generated with the PCoA
Prepare the tipinfo argument in the function ggphylomorpho by adding the name of the species in an additional column df_pcoa_whole_body_ratios <-cbind(as.data.frame(df_pcoa_whole_body),Species)

Compute the nMDS and the stressplot
The nMDS is generated with 2 dimensions.The stressplot shows the relationship between the dissimilarities among taxa present in the dissimilarity matrix and the ordination on the nMDS morphospace (maximum number of random starts = 100).

prepare data for plotting the morphospace occupation generated with the nMDS
df_nmds_whole_body is a dataframe containing the scores of the Nonmetric Multidimensional Scaling (nMDS) generated with 2 dimensions for each species.

Morphospace occupation for Western and Eastern Tethys during the Middle Triassic
In this section, the morphospace occupation are computed through the Middle Triassic for the Western and Eastern Tethys respectively by using the scores on the first two axes of the PCoA.The density displayed in the morphospace is the one that has been computed with the complete dataset in the section 6.3.1.Here is an example of the display of morphospace occupation of Western Tethys species during the overall Middle Tethys and also during the Bithynian (early Middle Triassic, Anisian).Computing the same analyses for an other time bin just require to change the name of the substage and analyses for the Eastern Tethys follow the same protocol.

Tanglegram
For generating a tanglegram, the first step is to transfom our phylogenetic tree (whole_body_tree_mbl) in an ultrametric tree (all tips are equidistant from the root) with our previoulsy .whole_body_dendro_phylo<-as.dendrogram(force.ultrametric(tree= ladderize(whole_body_tree_mbl), method="extend")) The next step is to extract cluster data from the cluster dendrogram analyses generated with the pvclust function.

Mantel test
The first step here is to define a distance matrix using our timescaled phylogenetic tree.
Compute the the phylogenetic distances between tips.

Computing total disparity
In the per-clade analyses, only total disparity of Pachypleurosauroidea and Nothosauroidea are computed, given the small number of pistosauroids.However, they are sampled in the Tethyan regional disparities analyses with the exception of Augustasaurus hagdorni which have been found in the East Panthalassa.

Disparity Pachypleurosauroidea vs Nothosauroidea
Firstly, set the number of boostraps.

number_bootstraps <-1000
Extract the scores on all axes of the PCoA for each taxon and remove the pistosauroids.Create subsets (split) of the dataset according the clade of the species.

Plotting the results of the disparity per-clade analyses
Create a dataframe by extracting the bootstrapped data generated with the dispRity function (this will be used for the geom_jitter function in ggplot).

Distribution of disparity per location
For these analyses, the number of bootstrap replications is set to 1000 as for the per-clade analyses.
Create a dataframe containing the scores on all axes of the PCoA and the location of each species.As only Augustasaurus has been found out from the Tethys ocean, it needs to be removed.Test for statistical differences between Eastern and Western Tethys by using a wilcoxon test. test.dispRity(whole_body_disparity_location,test=wilcox.test)

Plotting the results of the regional disparity analyses
Create a data frame extracting the bootstraped data from dispRity (this will be used for the geom_jitter function in ggplot).Visualize the result using ggplot.

Distribution of whole body nothosauroidean disparity per location
In this section, the disparity of Pachypleurosauroidea and Nothosauroidea will be respectively plotted per regional location.The number of bootstrap replications is set to 1000 as for the two previous analyses.The procedure shown here only concerns the distribution of pachypleurosauroids disparity in both eastern and Western Tethys and is the same for the nothosauroids according the correct selection of taxa.
Create a dataframe containing the scores on all axes of the PCoA and the location of each pachypleurosauroids.