Calculation of network specialisation indices
Network specialisation was first calculated using the H2’ index (Blüthgen et al., 2007) in thebipartite package (all analyses were carried out in R 4.2.3; R Development Core Team;http://www.R-project.org). This measures the degree to which each species interacts with a restricted group of partner species, given the species pool of partners available. We chose this index as it gives an overall measure of specialisation of all species in the network, across upper and lower network levels. The H2’ index is calculated based on the deviation of the observed number of interactions per species from the expected number of interactions, given the marginal total abundances of each species (Bluthgen et al., 2007). However, since each network had a different structure in terms of size, species abundance, and sampling effort, which might affect H2’ independently of species specialisation per se , we also generated 1000 null models for each network, recalculated H2’ for each, and calculated a standardised effect size (H2’ z-score) to assess deviation from random expectation. We used the vaznull randomisation algorithm that maintains network connectance and total number of individuals (Ulrich et al., 2009) which is relatively conservative (Dorman et al., 2009). H2’ and H2’ z-score were calculated for all selected networks using thenetworklevel function of the bipartite package (Dormann et al., 2008). For the calculation of H2’ and H2’ z-score, we used all 74 interaction networks (see above).
We then tested whether networks were specialised in terms of resource phylogenetic relatedness, while accounting for resource abundance (Jorge et al., 2017), using the dsi* index in the dizzy package. Note that here “resource” indicates either ants or plants. This index is scaled by the null expectation of random resource use (in a similar manner to the H2’ standardised effect size calculations detailed above) and weighted by resource abundance. Plant abundance was calculated as the sum of occupied and unoccupied plant individuals for each plant species. For ants, only those found occurring on the plants were considered. This was because all networks were standardised through plant sampling, and hence no data were available on ant occurrences not associated with plants. Analyses were conducted both in terms of ant specialisation on plants (i.e., concerning plant partner phylogenetic relatedness; dsi*ants) and plant specialisation on ants (i.e. concerning ant partner phylogenetic relatedness; dsi*plants). For the former, we calculated dsi* only for networks comprising three or more plant families, and for the latter, we used networks with three or more ant genera. We calculated the phylogenetic distance of plants as resources using the Phylomaker package at species-level resolution. For ants, we downloaded sequence data from GenBank for all the ant genera from Moreau et al. (2006). We selected the 53 ant genera represented in our own networks and re-aligned the DNA matrices using MAFFT version 7 (Katoh and Standley, 2003) with maximum likelihood estimation (ML) using RAxML 8.2.9 (Stamatakis, 2014). Supplementary material provides further details on the construction of the phylogenetic ant tree at genus level (appendix 2) and Genbank accession numbers for all sequences used (appendix 3). We used the 64 networks for which resource (i.e plant) abundance was available to calculate dsi* (13 myrmecophytic, 14 myrmecophilic, 13 myrmecochorous, and 24 foraging).