Strain typing and molecular phylogenies
All wsp and MLST sequences were compared to those in the MLST data base to assess strain similarity. All sequences were assigned to the nearest matching allele. Final strain delimitation was based on i) consistency of allele assignation across MLST loci and wsp and ii) phylogenetic evidence. Separate phylogenetic trees were generated for each gene, including all existing MLST strains and wsp , to further assess the consistency of strain groupings across genes and verify that no two strains consistently formed a monophyletic group within the wider context of the MLST data base. The sequences were trimmed using BioEdit (Hall, 1999) and aligned using ClustalW (default settings) as implemented in BioEdit. All alignments were manually checked and edited and all MLST loci gained from each individual sample in this study were concatenated using Seaview (Gouy et al. 2010). Single gene trees were computed using RAxML (Stamatakis 2014) (CAT model) and the concatenated multi-gene phylogeny was estimated using ExaBayes (default settings for one run, majority rules consensus using a threshold of 50%). The phylogeny of pollinating wasps was estimated using genomic data taken from Souto-Vilarós et al. (2019) using ExaBayes (Aberer et al. 2014) as outlined above. The computation of phylogenetic analyses was performed employing resources of CIPRES Science Gateway (Miller et al. 2015).
Simulation of Wolbachia distribution among host species
We used Python programming to model our ‘contact contingency’ hypothesis and its proposed mechanism incorporating ecological contact and Wolbachia purging in a phylogenetic context (wolPredictor: https://github.com/ctdarwell/wolPredictor using the wolPredictor_xmeansDelim.py script). Our program divides fig wasp samples into putative species clusters according to co-phenetic branch-length distances (Sneath & Sokal 1973) via an inputted phylogeny using X-means in the ‘pyclustering’Python library (Novikov 2019). X-means derived species clusters were derived incrementally for species richness cut-offs between two (default minimum) and 100 (greater than a credible upper limit). wolPredictor then assigns Wolbachia infection statuses according to rules based on our working hypothesis (Fig. 1). Briefly: (i) across communities, distinct Wolbachia strains are assigned to each different putative fig wasp species cluster co-occurring in the same fig-host community (thus, our model represents bi-directional CI), unless only a single putative species occurs within a community upon which a non-infection is scored for these wasps; (ii) at each species clustering iteration, Wolbachia is purged according to incrementally increasing (starting from no purging) cut-off thresholds between putative species clusters within a community; and (iii) arbitrarily assigned strain names [i.e., from (i) and modified in (ii)] across all purging scenarios are then conservatively matched to the empirically derived wsp clade strains and recorded (see github documentation for a detailed breakdown of wolPredictor functionality including scripts provided for investigation of outputted files). We ran our analyses 20 times to account for variation in X-means species delimitation outcomes. Predictive success for the range of putative species delimitation clusters was then assessed by statistical comparison against a distribution derived from 1000 random predictions across the dataset and also from a set of 100 iterations of wolPredictor with predictions generated after randomly shuffling wsp clade associations.