Dry habitats were crucibles of domestication in the evolution of agriculture in ants

The evolution of ant agriculture, as practised by the fungus-farming ‘attine’ ants, is thought to have arisen in the wet rainforests of South America about 55–65 Ma. Most subsequent attine agricultural evolution, including the domestication event that produced the ancestor of higher attine cultivars, is likewise hypothesized to have occurred in South American rainforests. The ‘out-of-the-rainforest’ hypothesis, while generally accepted, has never been tested in a phylogenetic context. It also presents a problem for explaining how fungal domestication might have occurred, given that isolation from free-living populations is required. Here, we use phylogenomic data from ultra-conserved element (UCE) loci to reconstruct the evolutionary history of fungus-farming ants, reduce topological uncertainty, and identify the closest non-fungus-growing ant relative. Using the phylogeny we infer the history of attine agricultural systems, habitat preference and biogeography. Our results show that the out-of-the-rainforest hypothesis is correct with regard to the origin of attine ant agriculture; however, contrary to expectation, we find that the transition from lower to higher agriculture is very likely to have occurred in a seasonally dry habitat, inhospitable to the growth of free-living populations of attine fungal cultivars. We suggest that dry habitats favoured the isolation of attine cultivars over the evolutionary time spans necessary for domestication to occur.


Introduction
During the past 10 000 years, humans have domesticated over 260 plant, 470 animal and 100 mushroom-forming fungal species [1][2][3]. Humans have modified these domesticates through diverse conscious or unconscious programmes of artificial selection that required, at least temporarily, reduced gene flow between populations of domesticates and those of their free-living progenitors [4]. Barriers to gene flow have included the isolation of domesticates in discrete garden plots and livestock pens accompanied by programmes of selective breeding, in some cases via asexual propagation, self-fertilization, and the propagation of reproductively isolated polyploid and translocation races. In a subset of cases, barriers to gene flow have also included the separation of domesticates from their free-living conspecifics by allopatry (i.e. by the transport, whether deliberate or incidental, of the domesticates to localities at the peripheries of or completely outside of their ancestral ranges) [5][6][7][8][9]. [ [10][11][12][13]. Here, we examine phylogenetic patterns of nonhuman domestication of fungi by ants that may provide insights into the dynamics underlying similar processes of domestication in other animal groups such as termites, bark beetles and even bees [14][15][16][17][18].
Fungus-farming 'attine' ants (Formicidae: Myrmicinae: Attini: Attina) are a monophyletic subtribe of approximately 250 described New World species that cultivate fungi for food [19]. Although the ants are obligate symbionts, their fungal cultivars (Agaricaceae: Leucocoprineae and Pterulaceae: Pterula) vary in symbiotic commitment in a pattern that is highly correlated with ant and fungal phylogenies [20][21][22][23]. The multiple species of fungi associated with the most primitive fungus-farming ants are, so far as is known, facultative symbionts (i.e. capable of a free-living existence outside of the symbiosis). Because these 'lower' attine fungi have been shown to be freely interbreeding members of larger, conspecific, free-living populations, they are usually regarded as non-domesticated [19,24,25]. In contrast, the clade of fungal cultivar species associated with so-called 'higher' attine ants, including the well-known leaf-cutting ant genera Atta and Acromyrmex, have become polyploid, obligate symbionts, and are no longer capable of living apart from their ant hosts. Higher attine fungi represent the best-confirmed case of domestication in attine ant agriculture and they have become the subjects of intensive study including proteomic and genomic investigation [26][27][28][29].
Ant agriculture is hypothesized to have arisen in the wet forests of tropical South America approximately 55-65 million years ago [16,23,27,[30][31][32][33]. Most subsequent attine agricultural evolution, including the domestication event that produced the ancestor of the higher attine cultivars, is likewise hypothesized to have occurred in South American rainforests because antcultivated fungi are thought to be native to such habitats and incapable of surviving elsewhere as free-living organisms [30,[34][35][36][37]. This 'out-of-the-rainforest' hypothesis is consistent with the observation that of all South American habitats (including deserts and seasonally dry habitats), wet Neotropical forests are home to the highest diversity and abundance of species in the fungal tribe Leucocoprineae, from which the ancestral attine cultivars arose [20,24,[38][39][40][41]. The hypothesis is also consistent with the fact that all known free-living close relatives of attine fungal cultivars, including conspecifics of ant-cultivated fungi, have been collected in the wet forests of Panama and Brazil [24]. The out-of-the-rainforest hypothesis presents a problem, however, for explaining the domestication event that resulted in the origin of higher attine fungi and for ant-fungus coevolution, more generally. If domestication requires reproductive isolation of the domesticate from its free-living progenitor, and if, in wet forests, an ant-cultivated fungal species is genetically connected to a larger population of a free-living fungal species, how could domestication have occurred?
Here, we describe the results of a phylogenomic analysis of the fungus-farming ants, in which we used hundreds of ultra-conserved element (UCE) loci to resolve outstanding ambiguities in attine ant phylogeny. This robust phylogeny permits the identification of major evolutionary transitions on specific lineages, including the transition from lower to higher agriculture, with greatly reduced phylogenetic uncertainty. This phylogeny also allows the reconstruction of the ancestral habitats and areas in which these transitions is likely to have occurred. We find that the out-of-the-rainforest hypothesis is supported with regard to the origin of attine ant agriculture; however, contrary to expectation, we find that the transition from lower to higher agriculture is very likely to have occurred in a seasonally dry habitat (cerrado or savannah), inhospitable, at least during the dry season, to the growth of free-living populations of attine fungal cultivars. We suggest that inhospitable habitats favoured the isolation of attine cultivars over the evolutionary time spans necessary for domestication to occur. We also identify the sister group of attine ants with high confidence, providing a new target for investigations into the biological traits that promoted fungus farming.

Material and methods (a) Taxon sampling
We chose a total of 119 taxa for inclusion in our study, representing a broad range of fungus-farming and non-fungus-farming ant species (electronic supplementary material, table S1). Within the fungus-farming ants, we included 78 species, covering all 16 genera and including the morphologically enigmatic taxa Mycetosoritis asper, M. explicatus and Paramycetophylax bruchi. For Cyphomyrmex and Trachymyrmex, two genera that are known to be non-monophyletic, we sampled broadly across all clades identified in a previous study [23]. Outside of the fungus-farming ants, we included 41 outgroup species, 29 from within the tribe Attini and 12 from outside of this group. We chose genus-level outgroups from within the Attini to match the extensive sampling of Ward et al. [42], missing only the genera Diaphoromyrma, Mesostruma and Talaridris.

(b) Library preparation, UCE enrichment and sequencing
We employed the UCE approach to phylogenomics [43,44], combining target enrichment of ultra-conserved elements (UCEs) with multiplexed, next-generation sequencing. For UCE enrichment, we used an RNA bait library for Hymenoptera that targets 1510 UCE loci [44]. The laboratory protocol we used closely follows the methods reported in [44], and we provide a detailed description of the protocol in electronic supplementary material, appendix A2.

(c) Bioinformatics and matrix preparation
The sequencing centres demultiplexed and converted raw Illumina data from BCL to FASTQ format. Starting with the FASTQ files, we performed all initial bioinformatics steps using the PHYLUCE v. 1.4 software package [45] and associated programs (see electronic supplementary material, table S2 for all sequencing and assembly statistics). We cleaned and trimmed raw reads using ILLUMIPROCESSOR [46] and assembled contigs de novo using TRINITY v. r2013-02-25 [47]. After assembly, we used several PHYLUCE scripts to identify and extract UCE contigs, remove potential paralogs, and add in data from two genome-enabled taxa (Atta cephalotes and Acromyrmex echinatior; see electronic supplementary material, table S3). We aligned the UCE loci using MAFFT v. 7.130b [48] and trimmed the alignments with GBLOCKS v. 0.91b [49,50] using reduced stringency settings. We filtered the master set of alignments for varying levels of taxon occupancy (percentage taxa required to be present in a given locus) and selected the 75% filtered alignment set as the main set for phylogenetic analysis ('Attine-118T-F75'; see electronic supplementary material,

(d) Phylogenetic analyses
Using the Attine-118T-F75 alignment set, we investigated the effects of inference method and data partitioning on results (see electronic supplementary material, appendix A2 for additional detail). Note that we excluded one taxon from this focal alignment set (Paramycetophylax bruchi) because it received few captured UCE loci (electronic supplementary material, table S2). We did, however, include this taxon in a separate, 119-taxon analysis, described below. For phylogeny estimation, we compared maximum likelihood (ML), Bayesian inference (BI) and species tree (ST) approaches. For concatenated ML analyses, we compared four partitioning schemes using RAxML v. 8 [51]: unpartitioned, partitioned by locus, partitioned by PARTITIONFINDER v. 2.0 using the rcluster algorithm (PF; data pre-partitioned by locus) [52,53], and partitioned by PF v. 2.0 using the kmeans algorithm [54]. For each analysis, we executed a rapid bootstrap plus best tree search ('-f a' option), and we used the GTR þ G model of sequence evolution (for both best tree and bootstrap searches). To address the concern that bootstrap scores can be misleading with phylogenomic data [55], we also performed a jackknifing analysis, in which we randomly sampled subsets of loci multiple times (100 replicates of 100 UCE loci). For BI analyses we used EXABAYES v. 1.4.1 [56], and performed unpartitioned and partitioned searches on the concatenated matrix. For the partitioned searches we used the same kmeanspartitioning scheme that we used with RAxML. We selected kmeans because the tree resulting from the kmeans-partitioned ML analysis had the highest likelihood score and reasonable branch length estimates (electronic supplementary material, table S5). For the partitioned BI searches, we performed two analyses, one with parsimony starting trees and one with random starting trees. We assessed run performance by examining log files with TRACER v. 1.6.0 [57]. We performed ST analyses using the program ASTRAL v. 4.8.0 [58,59]. First, we generated gene trees using RAxML and then we used only the 500 gene trees with the highest mean bootstrap scores (calculated in R v. 3.2.2 [60] using a script modified from [61]) as input into ASTRAL. We included this step to reduce noise introduced by including uninformative loci (see [62]), and we conducted the ASTRAL analysis with 200 multi-locus bootstrap replicates [63].
To explore our data for other potential biases, we generated two additional matrices. First, we used the program BACOCA [64] to identify any loci exhibiting significant deviations from base composition heterogeneity (x 2 test, p , 0.05). After removing biased loci (36 total), we concatenated the remaining 914 loci for analysis ('Attine-118T-F75-975'). Second, to control for either base composition heterogeneity or saturation, we converted the concatenated Attine-118T-F75 matrix to RY-coding ('Attine-118T-F75-RY'). We analysed both of the above matrices unpartitioned with RAxML.
To place Paramycetophylax bruchi (excluded due to poor UCE capture) in the attine tree we performed one additional analysis with this taxon included. We generated a new set of alignments filtered at 75% taxon occupancy ('Attine-119T-F75'), concatenated the loci, and then performed an unpartitioned analysis with RAxML.

(e) Divergence dating
We generated a time tree for the evolution of fungus-farming ants using BEAST v. 1.8.2 [65]. To calibrate the analysis, we used nine fossil calibrations, and one secondary calibration (electronic supplementary material, table S6). To decrease computation time we (i) used a constraint tree and turned off tree search operators, and (ii) used subsets of UCE loci rather than the entire matrix. For five separate matrices (each with 20 randomly selected UCE loci), we performed two independent BEAST runs, each progressing for 50 million generations. We assessed burn-in, convergence among runs, and run performance by examining log files with TRACER v. 1.6. We generated chronograms for each of the five matrices separately and for all runs combined. For additional detail, see electronic supplementary material, appendix A2.

(f ) Historical biogeography
We inferred the biogeographic history of the fungus-farming ants using the R package BioGeoBEARS (BGB) [66,67]. For the tree, we used the BEAST time tree pruned to include only the fungusfarming ants and their sister group. We coded taxa for the following areas: (A) Nearctic; (B) Middle America (including the Caribbean); (C) South America; (D) Afrotropics; and (E) Australasia. Using BGB, we compared six different biogeographic models: DEC [68], DEC þ J, DIVALIKE [69], DIVALIKE þ J, BAYAREA [70] and BAYAREALIKE þ J. For each model we performed a time-stratified analysis using the time periods 0-5 Ma, 5-35 Ma and 35-65 Ma, which correspond to post-closure of the Isthmus of Panama [71], pre-closure of the Isthmus of Panama and pre-glaciation of Antarctica [72], respectively. For additional detail, see electronic supplementary material, appendix A2.

(g) Ancestral state reconstruction
We performed trait reconstruction analyses to examine the evolution of attine ant (i) agriculture and (ii) habitat preference. In both cases, we used the same pruned BEAST tree that we used for biogeography. For agriculture, we coded taxa as practising (0) no agriculture, (1) lower agriculture, (2) coral-fungus agriculture, (3) yeast agriculture, (4) higher agriculture or (5) leaf-cutter agriculture (agricultural systems reviewed in [23]). We then used the 'ace' function from the R package APE [73] to test three different reconstruction models: equal rates (ER), symmetrical rates (SYM) and all rates different (ARD). For habitat preference, we coded taxa as occurring in: (A) continuously wet habitat (rainforest), which should be hospitable all year long to free-living populations of attine ant fungal cultivars; (B) seasonally dry habitat (e.g. cerrado, savannah, desert, dry scrub), which would be inhospitable, at least for part of the year, to free-living cultivars; or (AB) both wet and dry habitats. We inferred ancestral habitat preference using BGB, because it more realistically treats habitat AB as a combination of habitats rather than as a distinct, third character state. We performed six analyses comparing the same models used for biogeographic inference.

(h) Diversification rates
We investigated diversification dynamics in the fungus-farming ants using two approaches. We tested for significant shifts in diversification rates across the entire tree using the R package TreePar [74], which is an ML-based program that allows for non-constant diversification rates and incomplete taxon sampling. We also tested for rate shifts among lineages using the Bayesian program BAMM v. 2.5 [75][76][77][78] (see also [79,80]) and the accompanying R package BAMMtools [81]. A useful feature of BAMM is that it allows for non-random, incomplete taxon sampling via the input of a sampling probability file, which we incorporated into our analysis (electronic supplementary material, table S7). For additional detail, see electronic supplementary material, appendix A2. (referred to here as the subtribe Dacetina and including the genera Acanthognathus, Colobostruma, Daceton, Epopostruma, Lenomyrmex, Mesostruma, Microdaceton) as the sister group (figure 1; electronic supplementary material, figures S1-S11 and table S8), confirming a previous result [42]. Support for the monophyly of Dacetina was high (more than 90%) in all analyses except for the ST analysis (6%). Within the fungus-farming ant clade, there was no topological variability among analyses and nearly all nodes received maximum support. Most relationships are congruent with previous molecular studies [23,32,82], but we recovered a number of novel results within the neoattines. Most importantly, we confidently resolved the positions of major Cyphomyrmex lineages and several enigmatic species of Mycetosoritis for the first time (both genera are non-monophyletic). Relationships among remaining genera within the more inclusive tribe Attini were less well resolved. The tribe and several groups of genera within the tribe were recovered with high support, but most relationships among genus groups were poorly supported. We did not recover the sister group to the Dacetina þ Attina clade with high confidence, although most ML analyses suggested that the Blepharidatta group (Blepharidatta, Wasmannia, Allomerus) was sister to Dacetina þ Attina.

(b) Divergence dating of major transitions in ant agriculture
We recovered roughly identical divergence dates from the five different data subsets that we analysed and from the combined averaging of all results (electronic supplementary material, table S9). Additionally, our ancestral reconstructions of ant agriculture returned essentially identical results across the three different models that we tested, with the ER model being statistically favoured (electronic supplementary material, table S10 and figures S12-S14). Our date and trait inferences are largely congruent with previous studies [23,32], except that we recovered slightly older dates for the origin of higher fungus farmers.

(c) The biogeographic context of fungus-farming evolution
BioGeoBEARS model comparison favoured the DEC þ J model as the best-fitting model for the biogeographic data (figure 1; electronic supplementary material, figures S17, S18 and table S10), and most models inferred similar scenarios of ancestral range evolution (electronic supplementary material, figures S15-S26). The fungus-farming ants originated in South America and have maintained a strong presence in the region, as evidenced by the fact that most clades also have South American origins (59 out of 80 nodes). The ancestors of both yeast-farming attines and coral-fungus-farming attines evolved in South America. Several species and clades, however, dispersed from South America into Middle America and less often into the Nearctic. One major clade inferred to have had an origin in Middle America is the Cyphomyrmex wheeleri group, which includes one species that occurs far into North America (C. wheeleri).
Notably, the other major clade to originate in Middle America is nested inside of the higher fungus farmers and includes the leaf-cutter ants. This clade is composed of the Trachymyrmex intermedius group, the T. septentrionalis group, which is an exclusively Nearctic lineage, and the leaf-cutting ant genera Atta and Acromyrmex. The leaf-cutter ants also originated within Middle America with later dispersal into both South America (multiple times) and the Nearctic (at least twice). For habitat preference, BGB model comparison favoured the BAYAREALIKE þ J model, which produced results nearly identical to the next-most-favoured model, DEC þ J (figure 1; electronic supplementary material, figures S27-S38 and table S10). The ancestral fungus-farming ants evolved in continuously wet rainforest habitat; however, the two major clades of fungus farmers, the palaeoattines and neoattines, show very different trends, with the palaeoattines diversifying predominately in wet habitat, and the neoattines shifting into and diversifying predominately in dry habitat. Within the neoattines, there were two radiations that occurred predominately in wet habitat, one in the Cyphomyrmex rimosus plus C. wheeleri groups and one in the Trachymyrmex intermedius group. In addition to the general trend of neoattines diversifying in dry habitat, we found that both higher agriculture and leaf-cutter agriculture originated in dry habitat, contradicting the prevailing view that most evolution and domestication in the fungus-farming ant-fungus mutualism occurred in South American rainforest.

(d) Diversification dynamics of fungus-farming ants
The tree-wide diversification rate analysis using TreePar found one significant rate shift across the fungus-farming tree at 6.5 Ma ( p , 0.01, electronic supplementary material, table S11), with the net diversification rate showing a slight decrease. The among-lineages diversification rate analysis using BAMM found evidence for three rate increases (figure 1; electronic supplementary material, figures S39-S43), with the three-shift model receiving the highest posterior probability when compared with competing models (electronic supplementary material, table S12). The rate shifts occurred along the branches leading to Myrmicocrypta, Apterostigma (minus A. megacephala), and the neoattines minus several depauperate lineages (Cyatta, Kalathomyrmex, Mycetarotes). Counter to our expectations, none of these shifts directly corresponded with major shifts in ant agriculture; however, the neoattine shift is loosely correlated with climate change (see discussion below). However, in stark contrast to the consensus view that most subsequent evolution also occurred in South American rainforests (although see [86]), we found that the ancestors of most major attine lineages, including the ancestors of higher fungus farmers and leaf-cutter ants, probably evolved in dry or seasonally dry habitat (cerrado, savannah, desert etc.). This result is significant because it suggests a possible mechanism for the origin of the symbiotically obligate, highly derived, higher attine fungi. As in human-mediated domestication, the domestication of fungi by ants almost certainly required, at least temporarily, the genetic isolation of fungal cultivars from their free-living, wild-type conspecifics. Based on the results of our habitat-preference analyses, we hypothesize that the dispersal of fungus-farming ants into dry or seasonally dry habitats may have been the key factor driving fungal isolation and subsequent coevolution. Reduced fungal outcrossing by ant dispersal into dry habitat is supported by the observations that leucocoprineaceous fungi, the group that includes most attine ant cultivar species, are most abundant and diverse in rainforests [40,41], and that all free-living conspecifics of attine cultivars have been collected only in the rainforests of Brazil and Panama [20,24]. Unable to escape the humid confines of their host nests [87,88], selection would eventually have driven higher attine fungi to become obligate ant nest specialists.

Discussion
In addition to shifts into dry habitat, our results suggest fungus-farming ants expanded their range into Middle America and the Nearctic (figure 1) multiple times, with the earliest dispersal out of South America occurring around 27-22 Ma-well before the traditional estimate for the closure of the Isthmus of Panama (approx. 3 Ma) [71] (but see also [89][90][91]). Intriguingly, the sister group to the leaf-cutter ants is a lineage of completely Nearctic species in the Trachymyrmex septentrionalis group and the ancestor of the leaf-cutting ants probably originated in Middle America. If a shift into dry, inhospitable habitats provided the conditions for strict ant-fungus coevolution, it might also be the case that dispersal out of South America and into peripheral areas played a part as well. Movement into Middle America, and especially into the Nearctic, would have further isolated fungal cultivars from their parent populations and free-living progenitors. In the case of higher fungus farmers, geographical shifts would have the effect of isolating the ants from access to alternative species of higher attine fungi under cultivation by other higher attine species in the ancestral range.
Our results present a more detailed picture of the overall biogeographic history of fungus-farming ants. The tribe Attini, to which the fungus farmers belong, originated at about the same time as the K-Pg mass extinction event. Our phylogeny suggests that there was probably a burst of diversification at this time as evidenced by the short internodes subtending major clades and the fact that we could not confidently resolve relationships among most genus groups, even with genomescale data. The fungus-farming ants originated shortly after the K-Pg extinction event between 61 Ma and 57 Ma, possibly during the post-extinction-event recovery period [92] and shortly before the early Eocene climatic optimum. It is during this time that the ants began their symbiosis with leucocoprineaceous fungi and lost their ability to synthesize arginine [27,33], committing them to agrarian life. Transitions from lower to other agricultural systems (five systems total; see figure 1) occurred after the terminal Eocene event (TEE) at approximately 35 Ma. This event involved a major drop in global temperature, which brought glaciers to Antarctica and began the expansion of drier habitats throughout the New World [93,94]. Although dry habitats such as grasslands have been present since the early Eocene [94], several studies have noted significant expansions of C4 grasses starting around 30 Ma [95][96][97], remarkably close in time to the origin of higher agriculture. It is also notable that we inferred a diversification rate increase in the lineage that includes all neoattines, minus a grade of several depauperate groups (Cyatta, Kalathomyrmex, Mycetarotes and Mycetosoritis hartmanni), at about the same time as the TEE. Given that most genus-level lineages and all derived agricultural systems originated after the TEE, it is plausible that this global cooling event spurred both attine ant lineage diversification and ant-fungus coevolution.
A critical, long-standing problem for understanding the evolution of ant agriculture has been identifying the nonfungus-growing sister lineage of the fungus-farming ants. The identity of the sister group is important because it could provide critical information about the behavioural, physiological or ecological precursors to fungus farming. Twelve different lineages have been variously proposed and, of these, morphological studies have supported the cryptic leaf-litter ant Blepharidatta brasiliensis as the sister group [98][99][100]. More recent molecular studies, however, have provided low to moderate support for a sister-group relationship between the fungus-farming ants and the subtribe Dacetina [23,32,42]. Using phylogenomic data and fundamentally different analytical paradigms, we found nearly unequivocal support for a sister-group relationship between the fungus-farming ants and the subtribe Dacetina. Figure 1. (Overleaf.) Evolution and biogeography of the fungus-farming ants and their agricultural systems. The tree topology (left and right sides) matches the best tree topology recovered from all partitioned RAxML analyses of the Attine-118T-F75 matrix (950 UCE loci, 652 774 bp). We estimated divergence dates using BEAST and 10 node calibrations (electronic supplementary material, table S6). Left side: numbered nodes received less than 95% support in at least one of six analyses (raxml-rcluster/raxml-kmeans/raxml-jacknife/exabayes-kmeans/raxml-ry-coding/astral) and the colour of the node corresponds to the frequency with which that node was recovered across 10 analyses (electronic supplementary material, table S8; black ¼ 10/10, purple ¼ 8 -9/10, green ¼ 5 -7/10, sky blue ¼ , 5/10). The asterisk (*) signifies 100% clade support and the dash (-) signifies that the clade was not recovered in the best tree. We mapped the five distinct attine ant agricultural systems (lower agriculture, coral-fungus agriculture, yeast agriculture, higher agriculture and leaf-cutter agriculture) onto the tree using ML-based trait reconstructions. Right side: coloured squares indicate current or ancestral geographical ranges, with the ancestral ranges inferred using the program BioGeoBEARS (DEC þ J model). We used the following ranges: (A, blue) Nearctic, (B, green) Middle America, (C, yellow) South America, (D, purple) Afrotropics and (E, orange) Australasia. Coloured branches indicate current and ancestral habitat preference (blue, wet habitat; red, dry habitat; turquoise, wet and dry habitats), with ancestral preference inferred using BioGeoBEARS (BAYAREALIKE þ J model). Both sides: The bars at the bottom of each chronogram provide stem-and crown-group ages for each agricultural system. Dotted lines correspond to the 95% HPD of the BEAST divergence date estimates. The wavy, light grey line depicts average global temperature (adapted from [72]). For reference, major global events are highlighted on the geological timeline (EECO, Early Eocene Climatic Optimum; TEE, Terminal Eocene Event; MMCO, Mid-Miocene Climatic Optimum). The three vertical black bars on nodes mark rate shifts identified by BAMM (all rate increases). rspb.royalsocietypublishing.org Proc. R. Soc. B 284: 20170095 The dacetines form a group of largely specialized predatory ants that occur in the Neotropical (Acanthognathus, Daceton, Lenomyrmex), Afrotropical (Microdaceton) and Australasian (Colobostruma, Epopostrma and Mesostruma) regions. Most of the genera have elongate, trap-jaw mandibles. Biological information for the dacetines is surprisingly limited, with the best-studied genera being Acanthognathus and Daceton [101][102][103][104][105][106][107][108]. Importantly, these ants have no known associations with fungi. The Dacetina and Attina do, however, share a few morphological and behavioural traits [104,109]. Most notably, both sister clades are highly specialized, the Dacetina specialized predators and the Attina specialized agriculturalists. Although these are behavioural extremes, it is possible they share a common historical origin. Given that both of these lineages evolved from generalized hunter-gatherers during the 'nuclear winter' that followed the K-Pg extinction event (figure 1) [92,110], it is possible that a reduction of generalized resources drove them to specialize, one on live prey and the other on fungi. As noted by Janzen [110], the best survivors of the K-Pg nuclear winter were probably those whose food did not directly depend on immediate photosynthesis. Specialization on fungi by the Attina may have been driven both by a reduction in generalized prey as well as by a proliferation of fungi [111].

Conclusion
The importance of animal and plant domestication to the rise of modern human civilization is well understood. Through a variety of mechanisms, including selective breeding and genetic isolation, humans increased food yield and nutritional value, fuelling the growth of civilizations. Similarly, in fungusfarming ants, the evolution of agriculture and subsequently of high-yield domesticated crops resulted in the rise of the ecologically dominant leaf-cutting ants, which form 'superorganism' colonies composed of millions of individuals. Unlike human agriculture, however, an explanation for how ants unconsciously domesticated their fungal cultivars has been highly uncertain. Our results provide the first evidence that fungal domestication occurred in dry habitats, suggesting an explanation for how fungal cultivars may have evolved into domesticated mutualists obligately dependent on their ant hosts.
Data accessibility. For all newly sequenced samples, raw sequence reads and TRINITY contig assemblies representing UCE loci are available from the NCBI Sequence Read Archive and GenBank, respectively, under BioProject accession PRJNA379607. Additional data, including alignments, alignment supermatrices, tree files, partitioning files, BEAST xml files, trait and biogeography data files, and tables are available from Dryad (http://dx.doi.org/10.5061/dryad.d7pr6) [112].