*2.1. show.asymmetry*

The *show.asymmetry* algorithm is a landmark-based procedure embedded in the Arothron R package [35]. The function works with multiple landmark sets. As the first step, *show.asymmetry* splits each configuration in a left (L) and a right (R) half, following the specified indices for bilateral pairs of landmarks. The two halves are superimposed to each other via generalized Procrustes analysis (GPA) to exclude the non-shape-related differences and compute the rotation matrix to mirror, scale, and align the left side onto the right side or vice versa. By setting the argumen<sup>t</sup> *scale.sides*, the user may decide to apply the scaling process of the two halves during the Procrustes superimposition (see Table 1 for the detailed explanation of all arguments). As the default, scaling is not performed. The amount of shape difference that is not removed through the GPA process between the two halves is a measure of the shape differences between both sides. Asymmetry is computed as the square root of the sum of the squared distances between each landmark pair (L and R) as follows:

$$\text{asymmetry} = \sqrt{\sum\_{i=1}^{n} \left(\mathbf{L\_i} - \mathbf{R\_i}\right)^2}$$

where L and R are the superimposed left and right landmark configurations and *n* is the number of landmarks per side. If the samples differ in terms of dimension (i.e., they belong to different species or genera, or they greatly vary in size), it may be useful to standardize the amount of asymmetry to unit size to compare them directly. Thus, in *show.asymmetry*, the total amount of asymmetry is divided by the maximum interlandmark distance of the sample configuration. This correction is triggered by the function's argumen<sup>t</sup> *scale.size*. In the case of specimens under analysis falling under discrete groups, *show.asymmetry* automatically retrieves the mean shapes for the groups indicated by the user.

The asymmetry pattern is automatically visualized on one half of the object surface by using *meshDist* function in 'Morpho' R package, [32], with the asymmetry values used as distance vector. The function also displays the two superimposed surfaces and, eventually, the local area differences between the two halves by using the algorithm embedded in the *localmeshdiff* function ('Arothron' R package, [35]). The area difference range for all the given specimens is rescaled into the 0–1 range to make them comparable. If no reference surface is provided, *show.asymmetry* uses the function *vcgBallPivoting* in 'Morpho' to reconstruct both L and R halves for visualization.

*show.asymmetry* further gives the possibility to perform a principal component analysis (PCA) on a new set of landmarks obtained by subtracting the mean from the left and mirrored right (or the other way around) side. The output from the PCA is used to decompose the total variance in two components describing the percentage of variation attributed respectively to DA (mean difference between sides) and FA (average differences around mean of asymmetry) (for details, see [31,36]).

The function retrieves the asymmetry vectors, the local area differences vector, the surfaces with levels of asymmetry mapped on a color scale, the PCA results, the asymmetric component of shape variance, and the percentage of DA and FA (see Table 2 for a detailed explanation).


**Table 1.** Explanation of the arguments of *show.asymmetry*.

**Table 2.** *show.asymmetry* value illustration.

