The Origin and Correlated Evolution of Symbiosis and Coloniality in Scleractinian Corals

Symbiosis and coloniality are ecologically important traits for corals of the order Scleractinia. Symbiotic (zooxanthellate) species are highly successful in shallow waters of tropical and subtropical seas and most of them are colonial. On the other hand, azooxanthellate species present wide distribution ranges and expand to the deep-sea at more than 6,000 m depth. These are mostly solitary, with only few species colonial that form extensive deep reefs. Each ecologically distinctive group encompasses half of the biodiversity of the order and they are not grouped into differentiated monophyletic clades. Paleontologists and evolutionary biologists have debated for decades whether modern scleractinian corals have evolved from symbiotic or colonial ancestors and how these traits have evolved and being involved in the diversification process in corals. Previous comparative analyses throw evidence in favor of coevolution of these characters and toward repetitive loss of symbiosis and coloniality. Nevertheless, the discovery of the origin of the group deep in the Paleozoic, with a deep divergent clade composed of only azooxanthellate corals has questioned these findings. With this work, we disentangle the patterns in the evolution of symbiosis and coloniality, testing if they are correlated and if they follow a gradual or episodic mode of evolution. To this end, we first produce the most complete time-calibrated phylogenetic tree for the order Scleractinia, including new sequences of never-before sampled species and genera. These novel sequences contribute to alleviate the current molecular under sampling of azooxanthellate species. Incorporating phylogenetic uncertainty, we obtained strong evidence in favor of a correlated and episodic model of evolution. This model led to the inference of an azooxanthellate and solitary most recent ancestor of scleractinians. Transition rates between the four different combinations of the two traits showed that while coloniality is gained and lost multiple times, symbiosis first appears around 282 Ma and is never lost. Also, coloniality seems to have appeared before symbiosis in azooxanthellate lineages. Thus, azooxanthellate corals, and especially colonial lineages, have been acting as a source of biodiversity for shallow zooxanthellate coral communities, highlighting the uniqueness of shallow and deep species and the need to preserve them.

Symbiosis and coloniality are ecologically important traits for corals of the order Scleractinia. Symbiotic (zooxanthellate) species are highly successful in shallow waters of tropical and subtropical seas and most of them are colonial. On the other hand, azooxanthellate species present wide distribution ranges and expand to the deep-sea at more than 6,000 m depth. These are mostly solitary, with only few species colonial that form extensive deep reefs. Each ecologically distinctive group encompasses half of the biodiversity of the order and they are not grouped into differentiated monophyletic clades. Paleontologists and evolutionary biologists have debated for decades whether modern scleractinian corals have evolved from symbiotic or colonial ancestors and how these traits have evolved and being involved in the diversification process in corals. Previous comparative analyses throw evidence in favor of coevolution of these characters and toward repetitive loss of symbiosis and coloniality. Nevertheless, the discovery of the origin of the group deep in the Paleozoic, with a deep divergent clade composed of only azooxanthellate corals has questioned these findings. With this work, we disentangle the patterns in the evolution of symbiosis and coloniality, testing if they are correlated and if they follow a gradual or episodic mode of evolution. To this end, we first produce the most complete time-calibrated phylogenetic tree for the order Scleractinia, including new sequences of never-before sampled species and genera. These novel sequences contribute to alleviate the current molecular under sampling of azooxanthellate species. Incorporating phylogenetic uncertainty, we obtained strong evidence in favor of a correlated and episodic model of evolution. This model led to the inference of an azooxanthellate and solitary most recent ancestor of scleractinians. Transition rates between the four different combinations of the two traits showed that while coloniality is gained and lost multiple times, symbiosis first appears around 282 Ma and is never lost. Also, coloniality seems to have appeared before symbiosis in azooxanthellate lineages. Thus, azooxanthellate corals, and especially colonial lineages, have been acting as a source of biodiversity for

INTRODUCTION
Reef-building scleractinian corals constitute the foundation for large ecosystems in the tropics, particularly in the Indo-Pacific, the Caribbean Sea and the Indian Ocean (Veron et al., 2015). Other scleractinians live in the dark abyss mainly as individual polyps, sometimes more than 6,000 m below sea level (Romano and Cairns, 2000;Cairns, 2007). Between these two extremes there is enormous diversity, scleractinians display a continuum of morphologies and adaptations to the highly different physical and biological environments. On one hand, shallow water coral species largely depend on the presence of obligate endosymbiotic zooxanthellae in their endodermal tissues (but see also Houlbrèque et al., 2004). Zooxanthellae provide these coral species with 95% of their photosynthates in exchange for inorganic nutrients (Stat et al., 2006). To form such a symbiotic relationship species require sunlight (consequently, clear oligotrophic waters, where they also are not outcompeted by algae or phytoplankton) and a strict range of temperature (Veron, 1995;Baker et al., 2008). Evolutionary success in shallow waters is evident, with ∼800 zooxanthellate and colonial species exploiting all available space and forming complex structures resulting in some of the most diverse ecosystems in the earth (Moberg and Folke, 1999). It has been advocated that coloniality has evolved as a consequence of competition for space (Jackson, 1979;Barbeitos et al., 2010), which is a limiting resource in marine hard substratum environments (Jackson, 1977). Beyond few existing solitary zooxanthellate species, which can also form aggregations, a continuum of growth forms and different levels of colonial integration exist in scleractinian corals. In general, colonial species are composed of morphologically similar polyps, with differentiation in only some species such as acroporids (Soong and Lang, 1992).
On the other hand, deep azooxanthellate species lack endosymbionts, rather they are heterotrophic and feed on a large range of food sources, such as dissolved organic carbon and plankton (Roberts et al., 2006). However, some azooxanthellate species can also be found in shallow waters, and moreover, a small number of species are facultative, meaning they present zooxanthellate and azooxanthellate populations and have the capacity to switch between states (also called aposymbiotic or apozooxanthellate species) (Schuhmacher and Zibrowius, 1985;Drake et al., 2019). Azooxanthellates are dominated by solitary species and only very few have the ability to form coloniesthe extensive deep reefs are dominated by single coral species as Desmophyllum pertusum.
Despite this variation, the presence of symbiosis and the capacity to form colonies are the most conspicuous characters in scleractinians. However, it is poorly understood what led to and maintains this diversity of forms. Owing to the fact that these characters play a pivotal role in coral distribution and ecology, understanding their mode of evolution is essential to disentangling the diversification process.
Symbiotic colonial species constitute roughly half of the known biodiversity of the group (about 1,600 species) and form polyphyletic clades within the phylogenetic tree of the order Scleractinia. Molecular information is mainly available for shallow-water zooxanthellates for obvious reasons of sampling accessibility and the high ecological and economic importance of tropical coral reefs (Kitahara et al., 2016). There is a growing appreciation of this potential bias and some recent studies have attempted to address this, but further work is needed. Extensive sampling of the order and the probabilistic inference of phylogenetic trees started only marginally over a decade ago (Fukami et al., 2008). Subsequently work has been extended to increase species sampling, particularly for deep-sea representatives (Kitahara et al., 2010;Stolarski et al., 2011), but also in the search for more informative molecular markers (Arrigoni et al., 2017). Previous inferred phylogenies (e.g. Palumbi, 1996, 1997;Veron et al., 1996;Romano and Cairns, 2000;Chen et al., 2002;Fukami et al., 2004) routinely report incongruences between traditional taxonomic characters and molecular information, resulting in most recognized families and genera showing polyphyly. Extensive morphological variation together with the lack of homologies in most phenotypic traits makes the understanding of the evolutionary paths even more challenging and intriguing.
Several genetic markers have been the subject of previous gene trees, with mitochondrial and nuclear data sets leading to similar results (Fukami et al., 2008). Also, Stolarski et al. (2011) join these two sources of information, concatenating the mitochondrial 16S and the nuclear 28S. Nevertheless, the taxon sampling in these studies is reduced compared to the recognized biodiversity of the order. For example, Fukami et al. (2008) concatenate two mitochondrial markers for 127 scleractinians, Kitahara et al. (2010) includes only the CO1 for 234 species, Stolarski et al. (2011) concatenate two rDNA markers for 121 species, and Arrigoni et al. (2017) use the 18S for 298 specimens. The only attempt to compile all the existent information, is a maximum likelihood genus-level phylogeny of 576 species (Kitahara et al., 2016), based on 12 DNA markers not time-calibrated. Barbeitos et al. (2010) questioned coloniality as a derived trait in the history of scleractinians, when they inferred transitions from being solitary to colonial and reversals as equally probable. They report the same result for symbiosis, suggesting that these are very labile characters as easy to acquire as to loss. Their results, although having low support, also suggest that scleractinians evolved from a zooxanthellate and colonial ancestor, which strongly implies that this group diversified from onshore into deeper waters. This evolutionary scenario is reported to be congruent with the fossil record, since representatives of the current scleractinians only date back to the Middle Triassic, and high levels of colonial integration are already recognized then, while symbiosis has been recognized in Upper Triassic corals (Stanley and Swart, 1995). Nevertheless, the high diversity that characterize these early assemblages suggests an "evolutionary history unrecognized or unrecorded in the fossil record" (Stanley, 2003). An important turning point occurred when the origin of Scleractinia was placed more than 400 Mya (Stolarski et al., 2011), and a first divergent clade (called "Basal") formed by strict solitary and azooxanthellate corals (Kitahara et al., 2010), was described. This led researchers to question previous findings and speculate that both symbiosis and coloniality have evolved multiple times from a solitary azooxanthellate ancestor, as the polyphyly for these characters might indicate.
Here we aim to reevaluate the evolution of the symbiosis and coloniality in scleractinian corals. To achieve this end, we first maximized taxon sampling building the most complete molecular phylogeny for the order, combining all available molecular information for the most common nuclear and mitochondrial DNA regions, with novel sequences for neverbefore sampled species and genera. Using this phylogeny, which increases taxon sampling from previous studies to 513 species [compared to 80 (Barbeitos et al., 2010)], we will test to what extent symbiosis and coloniality are evolutionarily correlated and the mode of evolution of these traits -gradual vs. episodic. From our analyses we uncover if symbiosis and coloniality have been acquired or lost multiple times through the scleractinian history, and if so when these events occurred. Simultaneously with these analyses, we will show if the ancestor was zooxanthellate and colonial (Barbeitos et al., 2010), azooxanthellate and solitary (Stolarski et al., 2011) or with a different configuration of these characters.

Sample Collection and Sequencing
Four molecular markers, two nuclear and two mitochondrial, among those commonly used for Scleractinian corals were selected: the mitochondrial cytochrome oxidase c subunit 1 (CO1) and three partial ribosomal genes, the nuclear 28S and 18S, and the mitochondrial 16S. These were chosen because they are among the most used traditionally, accumulating more information to date, but also to have an equilibrium between nuclear and mitochondrial markers. Previously published sequences were retrieved from GenBank, while new sequenced specimens were deposited at the Museo Nacional de Ciencias Naturales (MNCN-CSIC, Madrid). New sequences corresponded to 41 taxa, of which 16 species and 5 genera were sequenced for the first time (Supplementary Material 1).
Small pieces of coral tissue preserved in alcohol were taken from each sample. DNA extraction was performed using the QIAGEN BioSprint 15 DNA Blood Kit (Qiagen Iberia S.L., Madrid) following the manufacturer's instructions, but with an extended period of proteinase K lysis (overnight incubation at 56 • C). The concentration of extracted DNA was measured for each specimen using a Nanodrop 1000 (Thermo Scientific). Each aliquot was then diluted at a concentration of 2 ng/µl in 50 ml of pure water.
Polymerase chain reactions (PCR) were carried out in a total volume of 50 µl, with 1xPCR Buffer (with final concentration of 2 mM MgCl 2 ), 0.2 mM of each dNTP, 0.14 µM of each primer, 1.5 U of Taq polymerase, 4 ng of template DNA and an additional 1 mM of MgCl 2 in the case of 28S. We used the following primers and PCR amplification conditions: (1) CO1 -The primers COIcoralF 5 -GATCATCTTTATAA TTGT-3 (Addamo et al., 2012) and HCO2198 5 -TAA ACTTCAGGGTGACCAAAAAATCA-3 (Folmer et al., 1994) were used to obtain a fragment of 538 bp. An initial denaturation step of 4 min at 94  Cuif et al., 2003) were used to amplify a fragment whose size varied between 757 and 787 bp. An initial denaturation step of 4 min at 94 • C, followed by 40 cycles of 1 min denaturation at 94 • C, 1 min annealing at 56 • C and 1 min extension at 72 • C, with final 10 min at 72 • C. (4) 18S -Two pairs of primers with different PCR conditions were used to amplify two parts of a fragment of 1,707-1,740 bp. First, A (forward1) 5 -AACCTGGTTCATCCTGCCAGT-3 and B (reverse1) 5 -TGATCCTTCTGCAGGTTCACCTAC-3 (Berntson et al., 2001). An initial denaturation step of 4 min at 94 • C, followed by 35 cycles of 45 s denaturation at 94 • C, 1 min annealing at 51 • C and 90 s extension at 72 • C, with final 5 min at 72 • C. This cycle was modified from Berntson et al. (2001). Second, 515F (foward2) 5 -GTGCCAAGCAGCCGCGGTAA-3 and 1209R (reverse2) 5 -GGGCATCACAGACCTG-3 (Giovannoni et al., 1988;Reysenbach et al., 1992). An initial denaturation step of 4 min at 94 • C, followed by 40 cycles of 1 min denaturation at 94 • C, 45 s annealing at 42 • C and 1 min extension at 72 • C, with final 10 min at 72 • C. The PCR thermal profile provided by Arrigoni et al. (2017) did not yield to the amplification of this fragment.
The amplified fragments were purified excising the corresponding bands from 1% agarose gels and filtering them. Sequencing was performed using a BigDye Terminator and an ABI PRISM 3730 DNA Sequencer (Applied Biosystems).

Alignment and Phylogenetic Analyses
A total of 87 new and 951 published sequences (Supplementary Material 1) were aligned separately for each gene using the online version 7 of the multiple sequence alignment algorithm MAFFT (Kuraku et al., 2013;Katoh et al., 2018), with later manual editing. For those species with more than one published sequence of the same gene, we selected the longest. Those sequences highly divergent were assessed using the online BLAST web interface (NCBI) and excluded from the final alignment when they clearly did not belong to scleractinians. Ricordea florida (order Corallimorpharia), a previously used outgroup (e.g., Fukami et al., 2008;Kitahara et al., 2010;Stolarski et al., 2011) with available information for the four markers, was incorporated. In preliminary analyses, we also included Heliopora coerulea (Subclass Octocorallia, order Helioporacea), but it was delated in later analyses to avoid external noise, even though the result did not vary.
Individual genes were tested for substitution saturation (Xia et al., 2003;Xia and Lemey, 2009) using the software DAMBE (Xia and Xie, 2001). 16S showed high levels of substitution saturation, while 28S, CO1 and 18S did not. In line with previous results (Stolarski et al., 2011), the joint alignment with 28S showed good phylogenetic signal. Then, all aligned genes were concatenated in a supermatrix without excluding the fast-evolving regions of 16S. Taxa with less than 10% of information were deleted from the supermatrix. Gene trees were also inferred and species with highly divergent sequences were deleted.
The phylogenetic tree was inferred using Bayesian inference with the software BayesPhylogenies (Pagel and Meade, 2006). This allows to obtain a sample of trees instead of a single tree to integrate over uncertainty in the posterior evolutionary analyses. We used gamma rate-heterogeneity (Yang, 1996) and a phylogenetic mixture model of evolution , which allow different sites of the alignment evolve in qualitatively distinct ways, but does not require prior knowledge of these patterns or partitioning of the data. This do not only allow to incorporate in the alignment genes with different rates of evolution without the necessity of partitioning the data, but also to detect fragments with different rates within the same gene. The number of patterns of evolution was estimated using Reversible-Jump Markov Chain Monte Carlo (RJ-MCMC) (Green, 1995). We used a Yule tree prior (Yule, 1925) and a relaxed clock of molecular evolution with a lognormal distribution (1,1) to date the phylogeny. The relaxed clock considers that rates differ among lineages assigning different rates to different branches (Yang, 2006). Five previously published calibration points based on the fossil record were used with a uniform prior distribution: genus Caryophyllia (153-167 Ma), family Dendrophylliidae (120-134 Ma), genus Flabellum (70-84.5 Ma) (Stolarski et al., 2011), genus Acropora (55.5-59.5 Ma) (Carbone et al., 1993) and family Acroporidae (98.5-102.5) (Wallace, 2012;Huang et al., 2017). The monophyly of the calibration points was not forced, but as the parameters of the model, these influence the topology.
We ran 10 RJ-MCMC chains of 80 million iterations sampled every 20,000 iterations with a burning of 60 million iterations. We randomly sampled 500 trees from the posterior distribution to account for phylogenetic and temporal uncertainty in our comparative analyses.

Comparative Analyses
All species incorporated in the phylogeny were classified as zooxanthellate, azooxanthellate (also called z-corals and az-corals, respectively; Rosen, 2000), or facultative (apozooxanthellate) species. They were also classified as either solitary, colonial or facultative based on the ability to asexually produce one or more connected calices. This information was mainly retrieved from the Coral Traits Database 1 and from Corals of the World 2 (Supplementary Material 1).
We used a reversible-jump continuous time Markov model of correlated evolution for discrete traits (Pagel, 1994;Pagel and Meade, 2006) to test if symbiosis and coloniality have coevolved through the history of the order Scleractinia. This model is implemented in BayesTraits  as Discrete, and can be run under two models of evolution, Discrete Independent, which assumes that the two traits evolve independently, and Discrete Dependent, which assumes that the traits are correlated and the rate of change in one trait is dependent on the state of the other (Pagel, 1994). While the Independent model has four rate parameters corresponding with the transition rates between the two states of each trait (azooxanthellate ↔ zooxanthellate and solitary ↔ colonial), the Dependent model has eight parameters, as there are four possible combinations of traits (azooxanthellate and solitary, azooxanthellate and colonial, zooxanthellate and solitary, zooxanthellate and colonial) and only the change in one trait is allowed in a single step (Pagel, 1994). Preference for independent or correlated evolution was established computing the log marginal likelihoods of the two models and comparing them using Bayes Factors (BF) as: log BF = 2(log marginal likelihood Dependent model − log marginal likelihood Independent model). Values of log BF above 2 are considered as positive evidence in favor of the complex model (Raftery, 1996), which in this case is the Dependent model.
This approach allowed to incorporate the sample of 500 trees previously obtained (Supplementary Material 2) instead of the a single tree, in order to estimate the posterior probability distributions of the parameters in the model while accounting for phylogenetic uncertainty (Pagel and Meade, 2006). The outgroup was pruned before running the comparative analyses. Facultative species were accounted for by coding both states of the trait in the data matrix. We ran four independent RJ-MCMC chains for 100 million iterations sampling every 1,000 iterations after burning for 100 thousand iterations. We used an exponential (0, 10) hyperprior. Marginal log likelihoods in every run were obtained using stepping stone sampling (Xie et al., 2010) over 1,000 stones at 10,000 iterations per stone. We use the RJ-MCMC procedure as it returns the best-fitting models of trait evolution in higher proportions (Pagel and Meade, 2006) over the different possibilities explored in every sample of the chain.
We also tested if the rate of evolution of symbiosis and coloniality changes through the tree. This was tested using the on/off Covarion model (Tuffley and Steel, 1998) also implemented in BayesTraits . This model alternates between times of invariability where the states do not change (turned off) and times where states are "available" to change (turned on). Thus, evolution under this model is episodic, occurring in bursts after a time of stasis. The Covarion model incorporates one additional parameter, the switching rate between the on/off states, but it does not proportionate information about when this event happened. Same priors and settings were used to fit this model, and log BF was used to assess fitting of this model compared to its absence.
Results indicated that only 10-40% of the trees were being sampled. Among these, most of the trees were only sampled once, indicating poor mixing in the chain due to improved likelihood for some trees. Since we were highly interested in incorporating phylogenetic uncertainty given the low posterior probabilities values obtained in many nodes, we ran another set of analyses with the three models in each of the 500 trees in the sample (complete sampling). In this case, we decreased the number of iterations to 1 million to obtain 1,000 samples per tree. Marginal log likelihoods in every run and tree were obtained using stepping stone sampling (Xie et al., 2010) over 100 stones at 10,000 iterations per stone. Results of each tree were combined to obtain the more frequent transition model and the parameter values.
Finally, we reconstructed the ancestral states for each node in the Maximum Clade Credibility (MCC) tree to visualize the results over the branches of the tree. We selected the Covarion model for this aim since it showed significantly better fit in previous runs. Four independent RJ-MCMC chains were run for 10 million iterations sampling every 1,000 iterations after burn-in for 100 thousand iterations. We used an exponential (0, 10) hyperprior. For each node, we obtained the median posterior probability (Pp) of each of the four states (azooxanthellate and solitary, azooxanthellate and colonial, zooxanthellate and solitary, zooxanthellate and colonial). Because uncertainty differed within symbiosis and coloniality in different nodes, the two traits were separated in the results summing the two median values of Pp where each state appears. For example, if Pp (azooxanthellate, solitary) = 0.4 and Pp (azooxanthellate, colonial) = 0.5, then Pp (azooxanthellate) = 0.9. To assign a state to a node, we considered a threshold median Pp of 0.75, which is double the probability that a state can be reconstructed by chance alone (Kubo et al., 2019); or otherwise, double Pp for one state than the other, since as these are median values, they are more representative of the sample of Pp, but do not sum one. By comparing the states of the ancestral and descendant nodes in the MCC tree, we found those branches where the two states were identical, assigning to that branch a specific state and those where there was a transition from one state to another. Branches where the state of one of the nodes (ancestor or descendent) could not be determined because the posterior probability was under the established threshold were classified as uncertain (Kubo et al., 2019). The R package phytools (Revell, 2012) was used during the postprocessing of these results.

Phylogenetic Tree
The final alignment was a supermatrix containing 4,041 sites and 513 scleractinian coral species, which represent ∼32% of the total biodiversity of the order. The taxon occupancy of the supermatrix is of 59.92%. Representatives of 32 of the 33 current recognized families were included. Only representatives of the deep-sea family Schizocyathidae (three monospecific genera) continue to be lacking due to difficulties associated with their small size and location (Kitahara et al., 2010). All novel sequences of 16 species and 5 genera included in the analyses contribute to the undersampled group of az-corals, except for one z-coral. The complete matrix of species and sequences included in the analyses are provided in Supplementary Material 1. Despite the efforts made by this and every previous study, species in the molecular phylogeny of Scleractinia are less than 28% of az-corals and 31% of solitary representatives, representing each of these groups approximately half of the recognized current biodiversity of the order.
For the four gene fragments included, 5 and 6 patterns of evolution were identified by reversible jump (13.89 and 86.11% of the posterior, respectively), which means that the chain converged to these two optimal distributions. This reflects differences in evolutionary rates beyond the distinction between mitochondrial, nuclear or the four individual genetic markers. The global rate of evolution was 5.50e-5 (substitutions/site/unit time). It places the origin of Scleractinia 415.8 ± 15.4 Ma (mean ± SD of the posterior distribution). The Basal clade diverged at 406.6 ± 15.3 while the Complex and Robust clades diverged at 382.4 ± 16.8 Ma. These divergence times are very close to those obtained by Stolarski et al. (2011) and Arrigoni et al. (2017), which were 445/479 (origin), 425/NA (Basal), and 415/418 (Robust/Complex) Ma, respectively. Three recognized major clades, i.e., Complex, Robust, and Basal, were recovered with a posterior probability (Pp) support of 1, with the first divergence of Basal and a clade comprising Robust and Complex (Supplementary Materials 3-5). This divergence pattern was also obtained with the concatenated 16S and 28S (Stolarski et al., 2011) or the recent genus-level phylogeny including 12 DNA markers (Kitahara et al., 2016), while independent analyses with CO1 show the divergence of Robust within Complex (Kitahara et al., 2010;Addamo et al., 2012).
In general, this topology agrees with previous phylogenetic hypotheses recently put together in Kitahara et al. (2016), but some relevant differences emerge. Regarding the monophyly at the family level, Meandrinidae is the only one within Robust, as previously stated (Kitahara et al., 2016) after Fukami et al. (2008) and Kitahara et al. (2010), when the genus Ctenella was moved to Euphylliidae. Within Complex, the monophyly of Acroporidae, Siderastreidae, Poritidae and Fungiacyathidae is maintained (Kitahara et al., 2016) and well supported. Nevertheless, Kitahara et al. (2010) found one species of the genus Alveopora questioning the monophyly of Poritidae. On the other hand, the monophyly of Dendrophylliidae is questioned in our results for the first time with the inclusion in this clade of some species of the genus Madracis (Pocilloporidae), two new sequenced genera (species Polymyces wellsi and Labyrinthocyathus facetus, families Flabellidae and Caryophylliidae, respectively) and one new sequenced species (Javania borealis, Flabellidae), with high support. The genus Madracis has previously belonged to Robust (Kitahara et al., 2016), but only the species Madracis myriaster was included by Stolarski et al. (2011) and Madracis asanoi by Kitahara et al. (2010). These, together with Madracis formosa and Madracis carmabi, were also more related to other Pocilloporidae members within Robust in our tree, while Madracis decactis, Madracis senaria, Madracis Kirbyi, and Madracis pharensis formed a sister clade, with the new sequenced Thecopsammia socialis, to others dendrophyllids. It is important to highlight that this unexpected result was obtained although we used a calibration point for Dendrophylliidae, but unlike Stolarski et al. (2011), we did not force the monophyly of the members of this family. The inclusion of J. borealis and P. wellsi in this clade also questions the monophyly of Flabellidae. Certainly, these results will require more attention in the future. Regarding the lack of monophyly specially among the Robust families, Kitahara et al. (2010) already gave evidence for the necessity of large taxonomical revisions in some of them.
A clade composed by some members of Anthemiphylliidae and Caryophylliidae, including the new sequenced genus Paraconotrochus, appeared diverging in the root of Complex, contrasting with Kitahara et al. (2016), who placed them more related to Robust. Nevertheless, the first diverging clade of Robust in our tree included other Anthemiphylliidae and part of the representatives of Deltocyathidae. Stolarski et al. (2011) also shows this division for the genus Anthemiphyllia between both clades, while the other species appear more related to Robust. The genus Deltocyathus also appears divided between the deeper diverged clades of Robust and Complex here and in Kitahara et al. (2016).
We believe that these results will be very useful in future studies regarding the systematics of Scleractinia, but as this is not the focus of this work, we will not discuss species or genera specific relationships. Overall, the inference of the coral evolutionary history through more than 400 Ma is a challenging task. Most difficulties associated with them are widely known among specialists, including low informative power of commonly used genes. Ribosomal genes are very useful to disentangle deep speciation events, and so deeper clades appear well supported in our results. This is also supported by the addition of CO1, since even though it is preferred for not having indels, producing very clean alignments (Kitahara et al., 2010), scleractinians as other anthozoans show slow evolutionary rates in mitochondrial loci (Kitahara et al., 2016).
The resultant phylogenetic mixture model from our analyses is more complex compared to any other model of sequence evolution previously used in scleractinians. This is expected to result in lower posterior support in some clades; however, it is also more likely to reflect the reality of molecular evolution . Increased uncertainty in the results can also be related to gaps in the data matrix (Xi et al., 2016). Of the 513 species included, 381 had information for CO1, 182 for 16S, 258 for 28S and only 216 for 18S (Supplementary Material 1). Thus, efforts toward wider sampling on these markers are necessary, while inclusion of other faster evolving markers would provide higher resolution at the specific and generic level. We did not include other genes here because, despite leading to greater species representation or higher resolution, it would create more gaps in the matrix that may affect negatively the topology. Although detailed molecular and taxonomic revisions regarding the species included in our analyses are needed, this is a robust tree that incorporate previous and new molecular information with resolution at the species level. However, comparative questions must be addressed over a sample of trees in order to account for the high existing phylogenetic uncertainty.

Symbiosis and Coloniality Evolution
Symbiosis and coloniality were highly correlated, as shows the higher support of the Discrete Dependent model compared to the Independent model. This result is consistent for the analyses carried out for the sample of trees (where 10-40% of the trees were sampled) and in the joint results for each of the 500 trees in the sample independently (complete sampling). Log Bayes Factors (BF) of 61.79 offer very strong evidence in favor of the Dependent model (Supplementary Material 6), while BF = 52-83 for the complete sampling highly confirm this pattern (Supplementary Materials 7, 8). Barbeitos et al. (2010) also reported correlation between symbiosis and coloniality (BF = 20-30).
We also found strong support for the Covarion model of correlated evolution (BF = 6.22). For the complete sampling, less than 0.6% of the trees did not show a significant result. Evidence in favor of this mode of evolution was obtained with BF = 2-29 (Supplementary Materials 7, 8). This model is evidence of an episodic mode of evolution owing to some functional or structural constraints that prevent some changes to occur (Tuffley and Steel, 1998). Evolutionary constraints in this context where four different combinations of traits are possible (az-coral and solitary, az-coral and colonial, z-coral and solitary, and z-coral and colonial) means that the pool of variable states changes with time (Tuffley and Steel, 1998). Instead, a gradual evolution through the tree entails that all the states are equally likely to be acquired and lost at any given time. This scenario fits the evolution of these traits given the ecological restrictions that z-corals and az-corals face regarding light, turbidity, temperature or depth. For example, a speciation event occurring in the deep-sea cannot give rise to a new symbiotic species because the environmental conditions are not appropriate.
The Covarion model showed strong support for the state of the most recent common ancestor (MRCA) of Scleractinia to be azooxanthellate and solitary (median values: P as = 0.99, P ac = 0.00, P zs = 0, and P zc = 0), as hypothesized by Stolarski et al. (2011) and strongly refuting previous evaluations that led to opposing ideas (Barbeitos et al., 2010). This evolutionary model (Figure 1) shows that probabilities of losing and gaining a trait differ from one another, contrary to the results obtained by Barbeitos et al. (2010) for symbiosis and coloniality separately. The strong support of correlated evolution means these characters can no longer be studied independently -this is demonstrated by the fact that the results from the Dependent model are different in terms of rates, proportional differences in rates and ancestral states compared to the independent models. Beyond the phylogenetic sampling differences (from 80 to 513 species here) or the low representation of azooxanthellate and solitary corals (19 az-corals and 17 solitary of their 80 total), our study shows that the Covarion model is a better fit to the data showing a distinct mode of evolution for symbiosis and coloniality.
The acquisition of coloniality occurs many times in the history of scleractinians, as reflected in the high transition rates in both az-corals and z-corals (median values: q as > ac = 4.29 and q zs > zc = 4.38). The loss of coloniality is also a frequent step in az-corals (q ac > as = 4.38), but not in z-corals (q zc > zs = 0.14). This indicates that this trait is only highly labile in az-corals, as proposed by Barbeitos et al. (2010), but z-corals rarely evolve toward individuality of the polyps. Also, symbiotic species mostly originate as colonial (median values: q ac > zc = 4.29, q as > zs = 0.12). Solitary species contribute in a tiny proportion to the high diversity of z-corals, so this strategy does not appear to be advantageous in current shallow tropical and subtropical seas. Solitary z-corals are also not restricted to colder or deeper waters. For example, Balanophyllia europaea is a Mediterranean species, but Cynarina lacrymalis is extended in the Indo-Pacific until the Red Sea 2 ; the former distributed between 0 and 50 m depth (World Register of Marine Species, Hoeksema and Cairns, 2019) and the second 1 between 3 and 70 m. There is not evidence that this group could have been better represented in the past.
Transitions rates to non-symbiotic solitary and colonial species are almost non-existent (q zs > as = q zc > ac = 0). This can also be observed in the most frequent transition models in the posterior (Figure 2), which were consistent through the replicate runs. In 27% of the posterior sample, these transition rates (q zs > as = q zc > ac ) are zero, in 20% only q zs > as is zero, in 15% only q zc > ac is zero and in 12% all rates are non-zero. These four models represent 73% of the sample, others (more than 400 different models) appear in less than 5%.
Some of the models obtained include the loss of symbiosis, but the transitions are zero in 58 and 51% of the posterior over the first 10 more common models in solitary and colonial species, respectively. Besides, in those models where these rates were different from zero, they always were very low (Figure 1). This shows that once symbiosis is acquired, a reversal is highly improbable if not impossible. Thus, z-coral lineages are constrained to remain in shallowwaters and never diversify into deeper waters, losing this symbiotic association and adapting to an entirely heterotrophic feeding strategy.
The ancestral state reconstruction provides evidence for the timing of the multiple origins of coloniality and symbiosis from the solitary and azooxanthellate ancestor. Beyond the strictly solitary and non-symbiotic members of the Basal clade, the MRCA of the Robust and Complex clades also presented these states (Figure 3). It was not until the end of the Paleozoic that the first z-corals appeared (282.8 ± 16 Ma), around 50 Myr before the older known fossils of scleractinians, which date back to the Triassic period, about 237 Ma (Stanley and Fautin, 2001). The first clearly colonial corals can also be found in these lineages, and another 22 different origins of symbiotic lineages can be recognized along the tree during the Mesozoic and Cenozoic. Rosen (2000) recognized in the fossil record 11 z-like genera survivors of the Cretaceous-Paleogene mass extinction event, while all Triassic taxa are believed to be lost and replaced after the Triassic-Jurassic mass extinction (Stanley, 2003). However, our results point to the survival of two symbiotic and colonial lineages after the Permian mass extinction event, leading to the most highly diversified symbiotic family Acroporiidae and some members of Euphylliidae and Agariciidae. These and other two lineages in the Robust clade also survived the Triassic-Jurassic mass extinction, while the symbiotic lineages survival after the Cretaceous-Paleogene is much higher. Certainly, ecologically relevant morphological features, as porous skeletons quick to regenerate in Cenozoic corals (Stanley, 2003), differentiate the first symbiotic corals from their modern counterparts. Lastly, caution must be taken due to the facts that phylogenetic uncertainty is lacking in the MCC tree and even though most families are represented in our tree, only approximately 1/3 of the recognized biodiversity is present. Also, the oldest calibration point that we could incorporate (genus Caryophyllia, 153-167 Mya) is much younger than the MRCA of scleractinians, which could bias the inferred origin times for the different clades.
The highly diverse shallow coral reefs we see today originated by a two-step process, through the origin of coloniality and the origin of symbiosis from the solitary az-coral ancestor (Figure 1). Recently, Dishon et al. (2020) found that deep-sea (>100 m), non-symbiotic and solitary corals or with small FIGURE 1 | Reversible-jump continuous time Markov model of correlated evolution for symbiosis and coloniality in scleractinian corals. Results from each tree in a sample of 500 trees with 513 species. The four pictures represent an example of the four states included in the model: az-corals/solitary ("as," up left -Leptosammia pruvoti), az-corals/colonial ("ac," up right -Dendrophyllia ramea), z-corals/solitary ("zs," down left -Balanophyllia europaea) and z-corals/colonial ("zc," down right -Cladocora caespitosa). Arrows indicate transitions among the four states. Histograms of transition rates across the posterior samples are drawn in a scale 0-10, with arrows pointing toward greater values. Rate values above 10 (0-0.83% of the posterior) were excluded from the histograms to enhance visualization of the results. Pink lines mark median values of transition rates (q as > ac = 4.29, q as > zs = 0.12, q ac > as = 4.38, q ac > zc = 4.29, q zs > as = 0, q zs > zc = 4.38, q zc > ac = 0, q zc > zs = 0.14). Photographs are courtesy of Luis Sánchez Tocino.
colonies, among other studied traits, are associated with the survival during the Cretaceous-Paleogene mass extinction event and will have more chances of survival in a nearfuture. On the other hand, every cycle of reef collapse in the past (Stanley, 2003) involved a different degree of loss of symbiotic and colonial forms with posterior recovery and diversification of the survivor lineages, but also with new origins of symbiotic and colonial forms from solitary and azcoral ancestors (Figure 3). This means that in an evolutionary timescale, az-corals, and especially colonial lineages (high q ac > zc FIGURE 2 | Most frequent transition models in the posterior of the Discrete Dependent Covarion model. RJ-MCMC analyses were run over a sample of 500 trees with 1,000 samples per tree. The four states represented in pictures are: azooxanthellate/solitary ("as"), azooxanthellate/colonial ("ac"), zooxanthellate/solitary ("zs"), and azooxanthellate/colonial ("ac"). Arrows represent non-zero transition rates between states. Colors in arrows identify equal rates, with those in gray smaller than those in black. The four models sum 73% of the sample, while other models not represented appear in less than 5% of the sample. Photographs are courtesy of Luis Sánchez Tocino. compared to q as > zs ), are acting as a source of biodiversity for shallow ecosystems.
Coloniality was acquired 14 times through the MCC tree, it was lost twice and in almost 10% of the branches it was not possible to differentiate between solitary and colonial lineages. This trait hides a great complexity compared with the presence or absence of zooxanthellae, and it better represents a continuum. In plocoid or phaceloid colonies, a simple level of colonial integration, corallites maintain their own walls, while in high integrated configurations they are almost indistinguishable from one another, as in meandroid (brain corals) or coenosteoid colonies (Veron, 1986;Stanley, 2003). There is also variation among solitary species, for example Desmophyllum dianthus is gregarious and "actively contributes to the accretion of coldwater coral build-ups" (Addamo et al., 2016). Apozooxanthellate species are colonial with a simple integration of corallites (Stanley and Fautin, 2001), but among these species, Heteropsammia cochlea may present multiple corallites in a single calice (Hoeksema and Matthews, 2015). For this reason, it was classified as solitary. Other examples are mushroom corals (family Fungiidae), which present one single corallite, but a single mouth (called "monostomatous" or "monocentric") or multiple mouths ("polystomatous" or "polycentric") (Hoeksema, 1989), so they are not proper solitary or colonial species. Nevertheless, we agreed to keep the distinction made in Corals of the World 1 .
Branches to which we could not assign the presence or absence of symbiosis/coloniality may represent facultative lineages. In the case of symbiosis, they only appear close to terminal branches, suggesting that this combination, even though it could also appear in the past, is not maintained for a long evolutionary time. This is not the case of coloniality, since this trait could have been originated as early as in the Carboniferous (Figure 3) as plocoid or phaceloid colonies. Thus, as also evidenced by transition rates (Figure 1), coloniality could most of the times have been acquired in first place, and then, colonial species develop symbiosis. Coates and Jackson (1987) pointed that symbiosis is strongly correlated with some morphological configurations such as multiserial growth and highly integrated small corallites, suggesting that some changes may have been necessary in older uncertain/facultative lineages (Figure 3) prior to establishing symbiosis. Higher and more complex levels of organization could have been acquired in az-corals through successive steps FIGURE 3 | Ancestral state reconstruction for symbiosis (left) and coloniality (right) from a Covarion model of correlated evolution. Branches states are represented according to the ancestral and descendent values assigned to the nodes. Nodes states are assigned when median Pp > 0.75 or double for one state than the other. When two nodes defining a branch had the same state, it was assigned to the branch. If the state differed, the branch was classified as transition from the ancestral state to the descendant. If one or the two nodes was uncertain (because it did not meet the criteria), the branch was also considered uncertain. This category can also correspond with a facultative species, in which the two states are present, and the Pp are similar. Time frames correspond to geological periods: Devonian (Dev), Carboniferous (Carb), Permian (Perm), Triassic, Jurassic, Cretaceous, Paleogene (Paleo), Neogene (Ne), and Quaternary (Quat). The three colors represent the Paleozoic, Mesozoic, and Cenozoic geological eras. but with reversals in some cases, as revealed by the high transition rate q ac > as . Stolarski et al. (2011) propose that fossils of "scleractiniamorphs" from the Paleozoic could be the oldest scleractinians in the fossil record, which were solitary or phaceloid. These only appear during the Ordovician period, while other scleractinian fossils reappear 245 Ma (Drake et al., 2019). If coloniality effectively evolved first in az-corals, it is not surprising that by the time that symbiosis appears around 283 Ma, colonies already show high levels of complexity as recognized in the fossil record of the mid-Triassic (Stanley, 2003;Drake et al., 2019).
With the MRCA azooxanthellate and solitary, an onshoreoffshore diversification trend cannot be assumed in the evolution of scleractinians (Barbeitos et al., 2010), but neither can the opposite, because az-corals span to shallow distributions. On the other hand, it has been suggested that coloniality is adaptive when competition for space is present (Jackson, 1977;Barbeitos et al., 2010) and coloniality seems to have evolved before symbiosis. Then, if competition has a role triggering coloniality, this should happen even before the species are zooxanthellate and able to colonize shallow oligotrophic environments. If shallow waters were colonized from the deep-sea, the stability at bathyal depths has been proposed to promote both competition and predation, generating high diversity (Rex et al., 1993). Deep-water azcoral reefs formed for example by D. pertusum, occur in the upper bathyal zone throughout the world (Rogers, 1999;Le Goff-Vitry et al., 2004a), and is at this depth that az-corals diversity is thought to be higher (Cairns, 2007). A deepsea origin has been already inferred in other corals, as stylasterid corals (Lindner et al., 2008), and it would also explain the big time-gap in the fossil record from the Paleozoic "scleractiniomorphs" to the mid-Triassic scleractinians (Stolarski et al., 2011;Drake et al., 2019).
Finally, az-corals originated more than 100 Ma before z-corals. Although they had more time to diversify, the current known biodiversity of both groups is similar. This is an indication of subsampling in the deep-sea or differential diversification rates on shallow-waters and the deep-sea, i.e., low speciation rate and/or high extinction rate in az-corals. It has been hypothesized before that accelerated rates of evolution and speciation are proper of areas with high energy (e.g., Rohde, 1992;Mittelbach et al., 2007). In fact, z-corals receive orders of magnitude more energy than az-corals due to the presence of zooxanthellae, reflected in fast metabolism and higher calcification rates (Stanley, 2003;Stanley and van de Schootbrugge, 2009).
Overall, these results reinforce the need for further deep-sea research to both mitigate the undersampling of azooxanthellate and solitary corals and to achieve a proper understanding of the diversification process in scleractinians. The new sequences provided here aim to contribute to the sampling at the molecular level and to progressively palliate the bias toward zooxanthellate species. Nevertheless, evolutionary relationships between species, genera and families certainly require further attention. On the other hand, our results reveal that not only shallow-water scleractinian corals form fragile ecosystems under the current global change scenario, but also that deep-sea corals are very susceptible due to their long history of association with the temporarily stable deep environment. Even though deep-sea lineages have survived major oceanic changes over the Phanerozoic, ocean acidification together with deep-sea human activities as bottom trawling or mining are causing considerable destruction of these communities worldwide (Roberts and Hirshfield, 2004). Thus, the evolutionary relevance that deep coral species have shown highly emphasizes the equally urgent need of protection and management policies as for their shallowwater counterparts.

DATA AVAILABILITY STATEMENT
New sequences were deposited in GenBank (https://www.ncbi. nlm.nih.gov/). Accession codes of these and other sequences used are provided in Supplementary Material 1. The inferred sample of phylogenetic trees and species traits are also provided.

AUTHOR CONTRIBUTIONS
This work was realized under the collaboration of all authors. AA collected the samples. AC, AA, and AnnM carried out the sequencing and post-processing of the sequences. AC, AndM, and CV performed the phylogenetic and comparative analyses. AC, AA, AnnM, AndM, MR, CH, and CV participated in the discussion of the results and wrote the manuscript. All authors approved the final version. The views expressed are purely those of the writers and may not in any circumstance be regarded as stating an official position of the European Commission. , and V. Polonio (IEO) for providing access to coral collections. We acknowledge to the contributors and maintainers of the CoralTraits, WoRMS, and Corals of the World databases. Finally, a warm thank to Luis Sánchez Tocino, who had the courtesy of sending us his wonderful coral photographs (https://litoraldegranada.ugr.es/).