Science, Faculty of
Zoology, Department of
DSpace
UBCV
Kaur, Katrina Minasha
Doctor of Philosophy - PhD
University of British Columbia
The causes of the diversity differences that are apparent across taxonomic groups in the tree of life remain a key question in biology. This question has been investigated from the perspective of antagonistic, competitive, and mutualistic interactions. The evidence of macroevolutionary implications of mutualistic interspecific interactions, in which two species benefit from each other, has been based on differing methodologies, and some methods have been later shown to be prone to error. In my thesis I investigated how mutualistic interactions can affect the processes of speciation and extinction and consequently diversification (the difference between speciation and extinction). In Chapter 2, I used a variety of phylogenetic trees from different taxonomic groups with known mutualisms and several phylogenetic comparative approaches to assess if and how mutualism influenced diversification. I found that mutualism tends to have no effect or a positive effect on diversification, with only a few cases showing a negative effect; the pattern may be context dependent or influenced by the type of mutualism and how dependent partners are on each other. Chapter 3 also considered a mutualistic interaction, but in this case, I specifically focused on the interaction between a host and its microbial partners to assess if host-microbe mutualisms, where symbionts live within a host, also influence diversification. Using sister group comparisons, I found that engaging with a host partner decreased diversification on a large-scale bacterial phylogeny suggesting that mutualism hinders diversification or that host-microbe interactions behave differently than other mutualisms. In Chapter 4, I use ancestry-based approaches and apply them outside of species interactions, to the interaction between an antibody and antigen to ask if trees can be used to delimit antibody clonal families based on their diversification histories from one ancestral clone. I suggest that ancestry-based approaches can be used in the study of antibody clones to reconstruct ancestors but there are limitations to using tree-based methods to classify clonal families. Overall, my thesis demonstrates how mutualisms likely do not have a consistent influence on the macroevolutionary trajectories of the interacting species and the difference in how similarity-based and ancestry-based approaches classify antibody clones into families.
Using phylogenetic data to investigate how interspecific interactions affect diversification dynamics by Katrina Minasha Kaur B.Sc., The University of British Columbia, 2016 M.Sc., The University of Toronto, 2018 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF Doctor of Philosophy in THE FACULTY OF GRADUATE AND POSTDOCTORAL STUDIES (Zoology) THE UNIVERSITY OF BRITISH COLUMBIA (Vancouver) July 2022 © Katrina Minasha Kaur, 2022 ii The following individuals certify that they have read, and recommend to the Faculty of Graduate and Postdoctoral Studies for acceptance, the dissertation entitled: Using phylogenetic data to investigate how interspecific interactions affect diversification dynamics submitted by Katrina Minasha Kaur in partial fulfilment of the requirements for the degree of Doctor of Philosophy in Zoology Examining Committee: Matthew Pennell, Associate Professor, Zoology, UBC Supervisor Laura Parfrey, Associate Professor, Botany, UBC Supervisory Committee Member Sean Graham, Professor, Botany, UBC University Examiner Patrick Keeling, Professor, Botany, UBC University Examiner Additional Supervisory Committee Members: Sally Otto, Professor, Zoology, UBC Supervisory Committee Member Mary O’Connor, Professor, Zoology, UBC Supervisory Committee Member iii Abstract The causes of the diversity differences that are apparent across taxonomic groups in the tree of life remain a key question in biology. This question has been investigated from the perspective of antagonistic, competitive, and mutualistic interactions. The evidence of macroevolutionary implications of mutualistic interspecific interactions, in which two species benefit from each other, has been based on differing methodologies, and some methods have been later shown to be prone to error. In my thesis I investigated how mutualistic interactions can affect the processes of speciation and extinction and consequently diversification (the difference between speciation and extinction). In Chapter 2, I used a variety of phylogenetic trees from different taxonomic groups with known mutualisms and several phylogenetic comparative approaches to assess if and how mutualism influenced diversification. I found that mutualism tends to have no effect or a positive effect on diversification, with only a few cases showing a negative effect; the pattern may be context dependent or influenced by the type of mutualism and how dependent partners are on each other. Chapter 3 also considered a mutualistic interaction, but in this case, I specifically focused on the interaction between a host and its microbial partners to assess if host-microbe mutualisms, where symbionts live within a host, also influence diversification. Using sister group comparisons, I found that engaging with a host partner decreased diversification on a large-scale bacterial phylogeny suggesting that mutualism hinders diversification or that host-microbe interactions behave differently than other mutualisms. In Chapter 4, I use ancestry-based approaches and apply them outside of species interactions, to the interaction between an antibody and antigen to ask if trees can be used to delimit antibody clonal families based on their diversification histories from one ancestral clone. I suggest that ancestry-based approaches can be used in the study of antibody clones to reconstruct ancestors but there are limitations to using iv tree-based methods to classify clonal families. Overall, my thesis demonstrates how mutualisms likely do not have a consistent influence on the macroevolutionary trajectories of the interacting species and the difference in how similarity-based and ancestry-based approaches classify antibody clones into families. v Lay Summary Why some groups are more diverse than others is a central question in biology. One key factor determining diversity is species interactions; my thesis specifically explored mutually beneficial interactions, or mutualisms in which two species provide either a service or resource to one another. I considered whether mutualisms can drive diversity by influencing long-term evolutionary processes using phylogenetic trees, which depict relationships between species. I found that mutualisms do not uniformly influence species in the same way and can sometimes have neutral, positive, and negative influences on species diversity. I also used approaches taken from the study of species interactions, such as building phylogenetic trees, and applied those to the interaction between antibodies and antigens. I demonstrated that trees may not correctly identify antibody families but can be used if provided with separated antibody families to reconstruct the ancestor of each. vi Preface Chapter 2 was written with the mentorship of Matt Pennell. I designed the methods, collected data from the literature, and conducted analyses with guidance from Matt Pennell. I wrote an initial draft while working closely with comments and revisions from Matt Pennell. A version of Chapter 2 will be submitted for publication shortly after this thesis is submitted. Chapter 3 was written with the guidance of Florent Mazel and Matt Pennell. The study design was developed with the mentorship of Florent Mazel, Matt Pennell, and Laura Parfrey. Laura Parfey provided additional advice on sequence alignment and tree building processes. I conducted analyses and wrote the first manuscript draft. The final manuscript was written by me with revisions incorporated from Florent Mazel and Matt Pennell. A version of Chapter 3 will be submitted for publication shortly after this thesis is submitted. Chapter 4 was developed with advice from Rituparna Banerjee and Matt Pennell. Rituparna and I worked together in deciding on the methodology and tools to use with the guidance of Matt Pennell. All simulation and tree analyses were conducted by me, and I also wrote the first draft of the chapter and later incorporated edits from Rituparna Banerjee and Matt Pennell. vii Table of Contents Abstract ......................................................................................................................................... iii Lay Summary ................................................................................................................................. v Preface ........................................................................................................................................... vi Table of Contents ......................................................................................................................... vii List of Tables .................................................................................................................................. x List of Figures ............................................................................................................................... xi List of Supplementary Files ........................................................................................................ xii Acknowledgements ..................................................................................................................... xiv Dedication .................................................................................................................................... xvi Chapter 1: Introduction ................................................................................................................ 1 1.1 Why is diversification important and how do we measure it? ....................................... 2 1.2 What are strengths and weaknesses of available phylogenetic comparative approaches? ......................................................................................................................................... 3 1.3 How are species interactions hypothesized to influence diversification? ....................... 5 1.4 Do mutualistic or symbiotic associations influence diversification? .............................. 6 1.4.1 Mutualistic interactions as a driver of diversification ................................................ 6 1.4.2 Host-microbe interactions as a driver of diversification ............................................. 7 1.5 Viral-antigen interactions as a driver of diversification .................................................. 9 1.6 Research goals of this thesis .......................................................................................... 10 Chapter 2: Diversification patterns of mutualism across a collection of phylogenetic trees .... ....................................................................................................................................................... 13 2.1 Introduction ................................................................................................................... 13 viii 2.2 Methods ......................................................................................................................... 17 2.2.1 Data collection ........................................................................................................... 17 2.2.2 Diversification analyses ............................................................................................. 19 2.3 Results & Discussion ..................................................................................................... 22 Chapter 3: Host association does not promote microbial diversification on a large-scale bacterial phylogeny ..................................................................................................................... 37 3.1 Introduction ................................................................................................................... 37 3.2 Methods ......................................................................................................................... 41 3.2.1 Tree Building ............................................................................................................. 42 3.2.2 Metadata .................................................................................................................... 43 3.2.3 Sister Contrasts .......................................................................................................... 45 3.3 Results & Discussion ..................................................................................................... 46 Chapter 4: Ancestry-based and similarity-based approaches for analyzing simulated B cell clonal families and their ancestral sequences ........................................................................... 59 4.1 Introduction ................................................................................................................... 59 4.2 Methods ......................................................................................................................... 62 4.2.1 Sequence simulation .................................................................................................. 62 4.2.2 Tree building and ancestral sequence reconstruction ................................................ 62 4.2.3 Clonal classification methods .................................................................................... 63 4.2.3.1 Ancestry-based .............................................................................................. 63 4.2.3.2 Similarity-based ............................................................................................. 63 4.2.3.3 Monphyletic family analysis ......................................................................... 64 4.2.4 Reshuffling (Misclassification) ................................................................................. 64 ix 4.2.5 Sequence similarity ................................................................................................... 64 4.2.6 Phylogenetic distance ................................................................................................ 65 4.3 Results & Discussion ..................................................................................................... 66 Chapter 5: Discussion .................................................................................................................. 78 5.1 Mutualistic interactions across taxonomic groups ........................................................ 78 5.2 The influence of phylogenetic comparative methods on biological interpretations ..... 79 5.3 Using popular tree building approaches to applications outside of species trees .......... 80 5.4 Broad implications of my thesis work ........................................................................... 81 Bibliography ................................................................................................................................. 84 Appendices ................................................................................................................................. 101 Appendix A Supplementary Information Chapter 3 ............................................................... 101 A.1 Supplementary Methods .......................................................................................... 101 A.2 Supplementary Results ............................................................................................ 101 A.3 Supplementary Tables & Figures ............................................................................ 105 Appendix B Supplementary Information Chapter 4 ................................................................ 139 B.1 Supplementary Figures ............................................................................................ 139 x List of Tables Table 2.1 Summary of best fitting HiSSE model results, sister contrasts, and the tree and trait combination data sets .................................................................................................................... 28 Table 2.2 Maximum likelihood model parameters and constraints .............................................. 32 Table 3.1 Summary of contrast results for all comparisons ......................................................... 54 Table 4.1 Median percent similarities for all levels of reshuffling ............................................... 71 xi List of Figures Figure 1.1 Ancestral verus derived characters for sister groups ................................................... 12 Figure 2.1 Two-state unconstrained HiSSE model results grouped by class ............................... 33 Figure 2.2 Two-state unconstrained HiSSE model results grouped by mutualism type .............. 34 Figure 2.3 RevBayes HiSSE results grouped by class for (A) extinction-estimated models and (B) extinction-constrained models ................................................................................................ 35 Figure 2.4 RevBayes HiSSE results grouped by mutualism type for (A) extinction-estimated models and (B) extinction-constrained models ............................................................................. 36 Figure 3.1 Phlylum level cladogram showing relationships of EMP sequences .......................... 55 Figure 3.2 Schematic describing pruning algorithms ................................................................... 56 Figure 3.3 Sister contrast summary for all comparisons (clade size and number of clades) ........ 57 Figure 3.4 Sister contrast summary for all comparisons (number and magnitude of contrasts) .. 58 Figure 4.1 Schematic representing the approaches used for clonal delimitation ......................... 72 Figure 4.2 Distributions of (A) median family size and (B) number of families across clonal delimitation methods ..................................................................................................................... 73 Figure 4.3 Distributions of (A) median family size and (B) number of families across clonal delimitation methods for trees where each family is monophyletic .............................................. 74 Figure 4.4 Percent sequence similarity at different levels of reshuffling ..................................... 75 Figure 4.5 (A) The dip.test and (B) GMM results for different levels of reshuffling .................. 76 Figure 4.6 Phylogenetic distance distributions for different levels of reshuffling ....................... 77 xii List of Supplementary Materials Supplementary Material 2.1. List of literature used to collect mutualistic tree and trait information. The citation or link for each data source, values and sources used to determine sampling fractions, sister contrast p-values, HiSSE model patterns, and notes regarding any changes made to published data sets are available. Supplementary Material 2.2. Branch length frequency and diversification rate estimates from corHMM stochastic mapping and two-state unconstrained HiSSE models. Supplementary Material 3.1 Summary of the sister clades, median number of samples, median % animal-associated, taxonomy breakdown in both sisters for the gut-associated vs free-living samples strict contrasts. Supplementary Material 3.2 Summary of the sister clades, median number of samples, median % animal-associated, taxonomy breakdown in both sisters for the gut-associated vs free-living samples not strict contrasts. Supplementary Material 3.3 Summary of the sister clades, median number of reads, median % animal-associated, taxonomy breakdown in both sisters for the gut-associated vs free-living reads strict contrasts. Supplementary Material 3.4 Summary of the sister clades, median number of reads, median % animal-associated, taxonomy breakdown in both sisters for the gut-associated vs free-living reads not-strict contrasts. Supplementary Material 3.5 Summary of the sister clades, median number of samples, median % animal-associated, taxonomy breakdown in both sisters for the gut-associated vs surface-associated samples strict contrasts. Supplementary Material 3.6 Summary of the sister clades, median number of samples, median % animal-associated, taxonomy breakdown in both sisters for the gut-associated vs surface-associated samples not-strict contrasts. Supplementary Material 3.7 Summary of the sister clades, median number of reads, median % animal-associated, taxonomy breakdown in both sisters for the gut-associated vs surface-associated reads strict contrasts. Supplementary Material 3.8 Summary of the sister clades, median number of reads, median % animal-associated, taxonomy breakdown in both sisters for the gut-associated vs surface-associated reads not-strict contrasts. Supplementary Material 3.9 Summary of the sister clades, median number of samples, median % animal-associated, taxonomy breakdown in both sisters for the animal-associated vs free-living samples strict contrasts. xiii Supplementary Material 3.10 Summary of the sister clades, median number of samples, median % animal-associated, taxonomy breakdown in both sisters for the animal-associated vs free-living samples not-strict contrasts. Supplementary Material 3.11 Summary of the sister clades, median number of reads, median % animal-associated, taxonomy breakdown in both sisters for the animal-associated vs free-living reads strict contrasts. Supplementary Material 3.12 Summary of the sister clades, median number of reads, median % animal-associated, taxonomy breakdown in both sisters for the animal-associated vs free-living reads not-strict contrasts. xiv Acknowledgements First and foremost, I would like to thank my PhD advisor, Matt Pennell, for his dedication to my development as a critical thinker of biology. I thank him for helping me to feel confident in my reasoning and hypotheses. I am grateful to him for both being available to provide me with his insights and advice and for nurturing my ability to be an independent researcher. I could not have completed this thesis without the support of my committee members Sally Otto, Mary O’Connor, and Laura Parfrey. I felt honoured to have the guidance from my committee and I thank them for their insightful comments and ideas over the course of my PhD. Each chapter of this thesis would not have been possible without others. I thank all the researchers I reached out to if I had a question about a method or a dataset. I would also like to thank those I worked with closely in developing my thesis chapters; I am grateful to Laura Parfrey and Florent Mazel for being instrumental in the development of my third chapter and to Rituparna Banerjee for working with me in developing my fourth chapter. I thank the Natural Sciences and Engineering Research Council of Canada (NSERC) for awarding me a Postgraduate Scholarship-Doctoral (PGS D). I would also like to acknowledge the current and former members of the Pennell Lab, for your advice and help with everything from coding roadblocks to conference presentations over the past four years. I thank Barbara Neto-Bradley, Mauro Sugawara, Francisco Henao Diaz, Fiel Dimayacyac, and Rituparna Banerjee for your sincere friendship. I am grateful to the graduate students that I have shared an office with over the past few years, Barbara Neto-Bradley, Anwar Al-Qattan, and Stephanie Blain. Thank you for ensuring that our office was a place where we could talk about science and share in the experiences of being graduate students together. xv I am extremely grateful to my friends and family for being a source of strength and support while I have pursued my PhD. I thank Amber Campbell, Riyanka Minhas, Tia Harrison, and Veronica Chong for being there to cheer me on. I thank my best friend, Qi Guan, for her continued encouragement, especially over the course of the pandemic when we haven’t been able to see each other in person. I thank my family in England for always telling me how proud they are and for supporting my goals from across the world. I will forever be grateful to my little brother, Adam, who brightens up every day, for taking an interest in my work and asking me about all the new things I am learning. Lastly, I thank my mum, who has taught me the power of hard work and perseverance; without her I would not have been able to achieve any of my goals. I feel so fortunate to have always had her support, guidance, and love. xvi Dedication To my grandma and grandpa, for telling me long ago, that I had the courage and ability to pursue all my goals, including one day earning my doctorate. 1 Chapter 1 Introduction Some groups are much more diverse than others, and the mechanisms driving diversity differences have been widely investigated in the literature. The question of why there are so many or so few species of a certain type repeatedly appears in the literature (e.g., Crepet & Niklas, 2009; Dykhuizen, 1998; Novotny et al., 2006; Ranker & Sundue, 2015). For example, perhaps one of the most famous being Darwin’s abominable mystery or the question of why there are so many angiosperm species when compared to their sister group, gymnosperms (Crepet & Niklas, 2009; Friedman, 2009)? This type of question can further be broken down into thinking about the processes that are responsible for such diversity and the mechanisms generating differences in those processes across groups. The processes of speciation and extinction are responsible for the vast discrepancies in species numbers (Hembry & Weber, 2020; Rabosky, 2009; Ricklefs, 2007). Speciation and extinction are macroevolutionary processes, which are occurring at or above the species level. Macroevolutionary processes are commonly investigated by using phylogenetic trees, which are branching trees representing relationships among species (Morlon, 2014). Phylogenetic trees, or phylogenies, can be used to infer the difference between speciation and extinction rates and provide an estimate of diversification to further our understanding of biodiversity. Diversification estimates can be used to study how biodiversity differs through time or space (e.g., Losos & Ricklefs, 2009; Mittelbach et al., 2007). Diversification rates influence species richness and so are key in investigating discrepancies in species richness across groups (Rabosky, 2009). 2 Many potential drivers of diversification have been proposed, such as novel key innovations; a key innovation is a trait that spurs diversification, explaining why some groups have much higher diversity than others (e.g., De Queiroz, 2002). Another widely studied proposed mechanism of species diversification involves interactions between species (Simpson, 1945). Species interactions are prevalent, and range from being detrimental to beneficial for the interacting partners. My thesis work is focused on studying the processes of speciation and extinction to estimate the diversification of species that are involved in interactions using phylogenetic tools and approaches. In addition, my thesis applies phylogenetic tools to study interactions between B cells and antigens. 1.1 Why is diversification important and how do we measure it? Speciation and extinction occur on a scale of thousands to millions of years and so can be difficult to study and evaluate correctly. Patterns of species richness represent the balance between macroevolutionary processes. Speciation estimates have been successfully obtained from the fossil record, but the scarcity of fossils in some taxonomic groups makes it impractical to use fossils for rate estimations across the tree of life (Morlon, 2014). An alternate approach in estimating speciation rates is to first build phylogenetic trees for clades of interest, and recent advances in the availability of molecular data has spurred the formulation of dated molecular phylogenies. A wide range of methods exist to build phylogenies including maximum likelihood (e.g., RAxML, iQTree, FastTree, ASTRAL) and Bayesian inference (e.g., RevBayes, BEAST1, BEAST2) (Kapli et al., 2020). Furthermore, recent advances in the availability of dated molecular phylogenies has also driven the development of methods that can be used to make 3 inferences about diversification rates from trees. There is a subset of methods that consider a trait or character and can detect diversification rate differences in taxa with different trait values. By using sister clades that differ with respect to the trait of interest but are of the same age, we can ask whether the trait is associated with a difference in clade size (Slowinski & Guyer, 1993). To conduct a sister group test, sister clades of the same age (Mitter et al., 1998; Slowinski & Guyer, 1993) must be identified and assigned a trait value. When a set of sister groups differs in terms of the focal trait, it can be used as one pair in a sister comparison test; thus, a sister comparison test will involve several paired values and can be analyzed slightly differently depending on the method chosen (e.g., sign test, Slowinski-Guyer test, Wilcoxon signed-rank test) (Vamosi & Vamosi, 2005b). Sister comparisons have been used to research many traits and have shown that dioecious angiosperm clades are larger than their non-dioecious sister groups (Vamosi & Vamosi, 2005a but see Käfer & Mousset, 2014), plant feeding insects have higher diversity than non-plant feeding insects (Mitter et al., 1988), and plants that have ants disperse seeds are more diverse than plants that do not have seed dispersal by ants (Lengyel et al., 2009). Sister comparisons do not consider rates, in contrast to speciation state extinction (SSE) models. Binary Speciation State Extinction (BiSSE) models were developed to estimate the effect of a binary trait’s character states on speciation and extinction rates while jointly estimating transition rates between the trait states (Maddison et al., 2007). BiSSE has also been extended to traits with more than two-character states (such as Quantitative and Multistate SSE models) (Fitzjohn, 2010; Fitzjohn, 2012). 1.2 What are strengths and weaknesses of available phylogenetic comparative approaches? 4 Sister group comparisons can even be used in cases where phylogenies are not resolved to the species level provided that overall species numbers are known for each trait state (e.g., Lengyel et al., 2009). Sister clade comparisons are one of the originally developed methods for trait dependent diversification inference but can be prone to falsely identifying a difference in clade size. Sister clade comparisons were first employed using a sign test (Mitter et al., 1988) and are contingent upon the condition that sister groups are of the same age, so they both have had the same time to accrue diversity (Felsenstein, 1985). Therefore, sister group comparisons are susceptible to falsely showing a difference in species richness if one sister clade is younger (Käfer & Mousset, 2014). The sister group with the derived trait is younger and has had less time to diversify because the equally old common ancestor did not possess this trait (Figure 1.1). Additionally, sister clade methods do not distinguish speciation or extinction rates, and typically ignore taxa with mixed trait states, and so this information is lost during the analysis. SSE models have many advantages over sister group comparisons because they estimate the effect of a character on rates, not only whether a trait and clade size are correlated, and they can incorporate more than two trait states (e.g., Fitzjohn, 2012). However, Maddison & Fitzjohn (2015) emphasize that BiSSE can show a strong correlation between a trait state and elevated diversification rates even if there is only a single rate shift associated with a character state. Rabosky & Goldberg (2015) further warn that BiSSE is prone to spuriously associating a character with diversification rate differences even if the trait is neutral when other processes are generating diversification rate heterogeneity. BiSSE models are prone to attributing whatever diversification heterogeneity exists to a trait because the assumption is that rates are otherwise constant (Beaulieu & O’Meara, 2016). 5 To overcome the pitfalls of BiSSE, Hidden Speciation State Extinction (HiSSE) models (Beaulieu & O’Meara, 2016) have been developed. HiSSE models are less prone to linking neutral traits to diversification because HiSSE models can allow for variation in the null model, unlike BiSSE (Beaulieu & O’Meara, 2016), but assumes only binary traits. HiSSE can distinguish this by attributing a difference in rates to an unknown (“hidden”) character that is not measured, instead of only asking if the focal trait is correlated with rates or if rates are equal among trait states, two additional cases that it can also detect (Beaulieu & O’Meara, 2016). Both sister group comparisons and SSE models can also be used to investigate the effect of a species interaction on diversification, if the interaction is considered a trait with trait states. 1.3 How are species interactions hypothesized to influence diversification? Species interactions are hypothesized to influence diversification patterns of the interacting partners. A wide range of interactions in the environment have been studied from a macroevolutionary perspective using simulations or empirical data, including predator-prey (e.g., Foisy et al., 2019), antagonistic or competitive (e.g., Yoder & Nuismer, 2010), viral-antigen (e.g., Enav et al., 2018), parasitic (e.g., Hay et al., 2020), and mutualistic (e.g., Weber & Agrawal, 2014) interactions. However, a recent review by Harmon et al. (2019) suggests that testing how species interactions influence diversification empirically poses challenges because mechanisms are focused on short-term processes. Hypotheses have been heavily focused on negative or antagonistic interactions, such as escape-and-radiate co-evolution, which focuses on an arms race between plant species evolving to evade herbivores and herbivorous species evolving to overcome plant defences, resulting in diversification (Ehrlich & Raven, 1964). Similarly, virus-antibody interactions can also be 6 considered as an “arms race” in which an antibody matures to have better binding affinity to a viral antigen, and an antigen evolves to evade an immune response (Fera et al., 2014; Liao et al., 2013). Considered more broadly, species diversify as a consequence of adapting to outperform others (Thompson, 1989). 1.4 Do mutualistic or symbiotic associations influence diversification? 1.4.1 Mutualistic interactions as a driver of diversification Mutualisms are interactions in which both species benefit from each other (Bronstein, 1994). Surprisingly, mutualisms are not often prone to cheaters or parasitism and are relatively stable (Frederickson, 2017; Sachs & Simms, 2006). If mutualists shift to a novel life history it is more commonly a reversion to free-living rather than to exploitation (Sachs & Simms, 2006). Furthermore, mutualisms are context dependent and the balance of benefits can shift based on abiotic conditions (Chamberlain et al., 2014); for example, legumes may depend more on their nitrogen-fixing rhizobial partners under low nitrogen conditions, while rhizobia could be benefiting at a higher rate from their plant partners when nitrogen is high (Heath & Tiffin, 2007). Mutualisms can range in their strength from obligate to facultative interactions (Dean, 1983; Bronstein, 1994). One of the most charismatic examples of a facultative mutualism is the relationship between ants and plants where plants provide “bed and breakfast” for the ant defenders (Weber et al., 2012). The interaction between ants and plants is a quintessential example of a facultative interaction, because both the ant and plant can successfully survive in the absence of its partner. In contrast, the mutualism between figs and fig wasps is one commonly studied obligate interaction as figs are reliant on fig wasps for their pollination, and fig wasps only lay eggs in figs (Rønsted et al., 2005); obligate interactions may be more prone to 7 extinction than facultative interactions given the reliance of species on each other (Yoder & Nuismer, 2010). Mutualisms across this spectrum have been investigated for their potential impact on diversification in a wide array of associations – plants, insects, primates, marine invertebrates, and fungi to name a few (e.g., Afkhami et al., 2018; Bruun-Lund et al., 2018; Joy, 2013; Litsios et al., 2012; Lengyel et al., 2009; Lorion et al., 2013; Gómez & Verdú, 2012; Weber & Agrawal, 2014; Sachs et al., 2014; Scott, 2018; Smith et al., 2008). Though much of the preceding empirical evidence shows that mutualism enhances diversification, previous studies have not used a consistent set of methods or have employed sister contrasts and SSE methods that have been later shown to have limitations, which makes it difficult to formulate unifying conclusions about mutualism-associated diversification. In my thesis I aim to analyze available phylogenetic trees using a consistent set of newly developed methods across different mutualistic interactions to test if mutualism influences diversification. Not only will this allow for comparisons of diversification rate estimates between different systems, newly developed methods such as HiSSE can overcome several limitations of previously used methods. By using methods that are not susceptible to spuriously suggesting that a trait of interest, such as mutualism, influences diversification, I test whether mutualism has a consistent and predictable effect on diversification. 1.4.2 Host-microbe interactions as a driver of diversification Microbial-host interactions are ubiquitous in nature, yet their impact on diversification patterns remains relatively understudied. Host-microbe interactions are considered symbiotic associations; the interaction between hosts and their gut symbionts, for example, is critical for the healthy functioning of the host gut. Gut microbiota are responsible for metabolic functions 8 and also influence the development of the immune system (Dethlefsen et al., 2007; Nicholson et al., 2012). Some microbial partners living within a host may only be producing a by-product as a result of an essential process (Mushegian & Ebert, 2015), but the by-product could be a resource that a host can use, and the interaction is still mutually beneficial (Sachs & Simms, 2006). However, many mutualistic benefits that bacteria are suggested to provide their hosts have not been directly measured (Drew et al., 2021; Garcia & Gerardo, 2014; Mushegian & Ebert, 2015). There are also several alternative hypotheses explaining the nature of the relationship between hosts and their symbionts including that the relationship is an inverted parasitism; in this case, the host is exploiting its symbiont (Drew et al., 2021). Therefore, when considering the microbiome, it can be difficult to disentangle true mutualists from commensals and parasites given that symbiotic interactions are complex; there can be hidden costs or benefits as well as a shift in the interaction over time with changing environmental conditions (Leung & Poulin, 2008). Nonetheless, several mechanisms that maintain mutualisms with bacteria have been proposed including by-product cooperation as mentioned above and partner-fidelity feedback or partner choice in which harmful symbionts are not rewarded and beneficial symbionts are rewarded (Sachs et al., 2011). Evidence suggests that microbes rarely abandon a mutualism (Sachs et al., 2014) and interactions between a microbe and host can be stable and long-lived (Moeller et al., 2016). Interactions with bacterial symbionts have been investigated from the perspective of the host, suggesting that the interaction does not influence diversification (Afkhami et al., 2018; Lorion et al., 2013). However, host-microbe interactions are relatively understudied from the perspective of the symbiont (but see Sachs et al., 2014). 9 Under the assumptions that (1) interactions between microbial symbionts and their hosts evolve repeatedly from free-living ancestors (2) that there are mechanisms in place that can prevent exploitation resulting in long-term interactions between host and their microbes (Sachs & Simms, 2006), in my thesis I investigate whether the relationship between hosts and their bacterial symbionts drives diversification. 1.5 Viral-antigen interactions as a driver of diversification Recent advances in available phylogenetic methods may also be applicable to questions outside of species diversification. These methods include the reconstruction of the ancestral sequence that gave rise to the tips of a phylogeny and using groups of gene sequences to identify species. Genes have been used to delimit species in phylogenies using the Generalized Mixed Yule Coalescent (GMYC) method (Fujisawa & Barraclough, 2013). Ancestral sequence reconstruction has been used to identify important adaptations and functions (Garcia et al., 2017; Su et al., 2021). Specifically, they can be applied to help answer important questions for the interaction between the entities of B cells and antigens. The interaction between B cells and antigens does not occur between two interacting species, but species interactions such as mutualism have been investigated from the perspective of interacting metapopulations in variable environments which may or may not diversify after interacting with one another (Yoder & Nuismer, 2010). Similarly, the relationship between B cells (which give rise to antibodies) and viral antigens shapes the diversification of B cell clones in a similar fashion to interactions between species influencing diversification (Liao et al., 2013). After premature B cells go through a round of recombination, they give rise to an ancestral B cell clone, which subsequently mutates via somatic hypermutation (SHM) and undergoes a process 10 of affinity maturation (Kepler et al., 2014). Through affinity maturation, B cell antibodies diversify from an ancestral clone and only clones that bind successfully to viral antigens proliferate (Meyer et al., 2006). Antibodies generated through diversification via affinity maturation from the same ancestral B cell are classified into the same clonal family (Dhar et al., 2018). B cell clonal families can be grouped to build phylogenetic trees to infer the unmutated ancestral sequence. Grouping B cells into clonal families is largely performed by methods developed specifically to analyze B cell repertoires. However, phylogenetic approaches such as the GMYC method may be able to identify clonal families in a phylogeny. Once clones are built into phylogenies and grouped into families, the trees can be used to reconstruct the ancestor. Identifying the unmutated ancestral sequence has implications for targeting therapies, specifically for a group of broadly neutralizing antibodies (bnAbs), because a therapy could target multiple strains of a pathogen (Bonsignori et al., 2011; Burton & Hangartner, 2016). Thus, phylogenetic programs such as GMYC (Fujisawa & Barraclough, 2013) and RAxML (Stamatakis, 2014) could be applied to B cell clones in identifying the ancestral clonal sequence. Given that B cell clones diversify and give rise to antibodies in a similar fashion to the processes underlying species diversification, the principles applied to reconstruct species trees can be applied to clonal families. In my thesis I will apply both phylogenetic reconstruction methods and species delimitation methods to build B cell clonal trees to classify clones into families and to assess whether reconstruction methods are susceptible to error in classifying clones. 1.6 Research goals of this thesis 11 The hypotheses explaining the drivers behind the potential influence of beneficial interactions on diversification are hard to test empirically because proposed mechanisms take place on shorter time scales than macroevolutionary studies. Therefore, numerous empirical studies have investigated the correlation between diversification and mutualistic interactions but have used methods with several limitations that have been identified recently. I therefore aim to consider mutualistic interactions from two perspectives – broadly using a variety of systems employing multiple phylogenetic comparative methods including new approaches that can overcome past limitations (Chapter 2), and through a novel large-scale bacterial analysis to assess if interactions with bacterial symbionts affect diversification (Chapter 3). In addition, my objective is to apply approaches from the phylogenetic methods field to study other sources of diversification arising from interactions; specifically, to expand the use of phylogenetic approaches to the interaction between B cells and antigens, which spurs diversification in antibodies (Chapter 4). 12 Figure 1.1. In the case of a derived trait, even though sister groups have an equally old common ancestor, the age of the clade with the derived trait will be younger and will have had less time to accrue diversity. Thus, despite having an equally old common ancestor, a sister group comparison will suggest that the clades with the derived trait are smaller and so the trait of interest is not associated with species richness (Käfer & Mousset, 2014). 13 Chapter 2 Diversification patterns of mutualism across a collection of phylogenetic trees 2.1 Introduction Mutualistic interactions, in which two species benefit from each other by providing services or resources (Bronstein, 1994), have been hypothesized to shape the diversification patterns of the partners involved across a variety of different systems. Diversification encompasses the processes of speciation and extinction and is how species richness is generated. Species can diversify as a consequence of the arms race to avoid antagonistic interactions, or escape-and-radiate (Ehrlich & Raven, 1964), and species engaging in mutualism may also promote diversification by broadening adaptive zones and thus accelerating speciation rates. Mutualisms can range from facultative interactions where partners can live without each other to obligate interactions where partners are completely reliant on each other for survival (Bronstein, 1994). Mutualistic interactions are also context dependent and the magnitude of benefits can depend on abiotic factors (Chomicki et al., 2019); an interaction can also shift in how facultative or obligate it is based on the context. Therefore, it is unlikely that all mutualisms would affect species richness in the same way because mutualistic interactions vary greatly in how much the partners benefit and how strict the interaction is (Hembry & Weber, 2020; Weiblen & Treiber, 2015). One hypothesis suggests that mutualisms are a driver of diversification. Several mechanisms have been proposed as to why mutualism enhances diversification such as increasing ecological opportunity by broadening niches and adaptive zones or reducing extinction rates via 14 increased range size and enhanced survival rates (Chomicki et al., 2019; Hembry et al., 2014). A contrasting view argues that mutualisms act as an evolutionary dead-end and should hinder diversification because each species is more constrained by its partner species. If the fate of one species is tied to its partner, in an obligate mutualism for example, it may have a higher extinction risk (Kiers et al., 2010; Chomicki et al., 2019). Diversification may also be lower in mutualists than antagonists due to stabilizing selection, where trait evolution is restricted in trait-matching mutualisms (Hembry et al., 2014; Maliet et al., 2020; Yoder & Nuismer, 2010). Speciation is impeded in situations where it is beneficial to have trait-matching, when intermediate phenotypes are favoured over extremes because intermediate phenotypes have higher success in finding a partner that also has common phenotypes (Raimundo et al., 2014). Mutualisms may also promote stability because mutualists rarely diversify to transition to other lifestyles (Sachs et al., 2014). The proposed hypotheses regarding mutualism and diversification include explanatory mechanisms that are difficult to directly link to diversification rates with current methods and approaches (Hembry et al., 2020) but macroevolutionary approaches in the literature have focused on using the correlation between diversification and mutualism. Empirical work has focused on using phylogenetic comparative methods to assess macroevolutionary evidence by comparing non-mutualistic and mutualistic groups to summarize the patterns of how mutualisms spur or hinder diversification in many systems. Several empirical studies have shown that mutualism may spur diversification (Bruun-Lund et al., 2018; Joy, 2013; Litsios et al., 2012; Lengyel et al., 2009; Gómez & Verdú, 2012; Weber & Agrawal, 2014). These systems include facultative mutualisms with ant seed-dispersers (Lengyel et al., 2009) and ant-defenders (Weber & Agrawal, 2014), which enhance diversification for angiosperms. The interaction between plants and frugivorous primates also spurs rates of diversification in primates 15 (Gómez & Verdú, 2012). Obligate mutualisms have also been shown to spur diversification in figs and fig wasps (Bruun-Lund et al., 2018) and clownfish and sea anemones (Litsios et al., 2012), contrary to the hypotheses that extinction risk increases in interactions where the fate of partners is closely tied. The mutualisms that are positively correlated with diversification fall under a wide range of taxonomic groups but involve benefits or services that may increase the available niches or ameliorate a previously uninhabitable niche, resulting in diversification. However, the empirical evidence also shows that in the mutualism between a host and its bacteria, bacteria have decreased diversification (Sachs et al., 2014). Though the interaction is not necessarily obligate, bacterial symbionts live within their host and their success is directly influenced by the success of the host. Several other studies also find no relationship between mutualism and diversification in groups including legumes, insects, and primates (Afkhami et al., 2018; Scott, 2018; Smith et al., 2008); however, some of the interactions involving these groups have been shown to spur diversification in other studies (see Gómez & Verdú, 2012 and Scott, 2018). The interacting species investigated in the literature belong to groups across the Tree of Life, which could also explain why mutualism may not always be associated with a change in diversification despite the evidence of a correlation in some groups. Investigating fossils versus phylogenies of living taxa has been suggested as a source of variation (Jablonski, 2017), but different taxonomic groupings have been understudied in mutualism as a source of variation. A key factor that must also be taken into consideration when comparing the patterns of correlations between mutualism and diversification across studies are the various methods used. Many of the above empirical studies use Speciation State Extinction (SSE) (Maddison et al., 2007) (specifically binary - BiSSE and multi-state - MuSSE) models to investigate the link between mutualism and diversification. SSE models require a phylogenetic tree and corresponding trait 16 information for each tip on the tree classifying each tip into different trait categories; in the case of a BiSSE model assessing mutualism-associated diversification, the trait categories for each tip are mutualistic or non-mutualistic. SSE models are prone to associating a neutral trait with diversification if there are other sources of rate variation (Rabosky & Goldberg, 2015). Past studies may also be susceptible to finding an association between a trait and diversification even if the pattern is only seen in one clade or if there are few trait transitions (Maddison & Fitzjohn, 2015) such as in the phylogenetic evidence used to investigate the clownfish-anemone (Litsios et al., 2012) and plant defence (Weber & Agrawal, 2014) mutualisms. The BiSSE model’s null assumption is that rates are equal across states (Beaulieu & O’Meara, 2016). BiSSE models consequently suggest that a trait affects diversification because its alternative assumption is better fitting than its null assumption (Caetano et al., 2018). Newer SSE models such as Hidden Speciation State Extinction (HiSSE) models can allow for variation, even in null models (Beaulieu & O’Meara, 2016). HiSSE can distinguish between cases where rates are equal across states or can allow for variation in rates across states in trait-dependent models and trait-independent models (where diversification is not associated with the focal trait), due to the addition of a “hidden” character (Beaulieu & O’Meara, 2016). HiSSE can attribute diversification to this hidden trait instead of to the focal trait (Beaulieu & O’Meara, 2016). The empirical evidence shows that in different cases mutualism has been shown to spur, hinder, or not influence diversification – even within the same taxonomic group or mutualistic system. Current comparisons between studies investigating similar groups or mutualisms are incompatible because they use different model parameters and phylogenetic comparative methods have since developed. We therefore synthesize the available phylogenetic evidence to assess 17 whether the evidence correlating mutualism to diversification changes is a true reflection of differences in taxonomic groups or mutualism types, or a result of different approaches and methods. We also aim to identify if characteristics of mutualisms are repeatedly associated with diversification trends. We use (1) HiSSE models (Beaulieu & O’Meara, 2016), which can detect if diversification is linked to our binary trait of interest, to a “hidden” trait, or if it is not related to our trait of interest and (2) sister group contrasts to test for a correlation between engaging in mutualism and diversification patterns. The final data set includes 35 tree and trait combinations that we use to examine whether mutualism-associated diversification follows a consistent pattern across various taxonomic groups. By using the same set of methods to analyze different tree and trait combinations from the literature, we can resolve whether variation in patterns observed across studies in the literature is a result of true differences between mutualistic interactions or caused by differences among phylogenetic comparative methods such as different SSE models, which make current comparisons incompatible. We analyze empirical evidence with consistent methods and parameters and use both sophisticated models and traditional trait-dependent diversification approaches to overcome methodological pitfalls and investigate how engaging with a partner influences diversification across different mutualistic interactions. 2.2 Methods 2.2.1 Data Collection We collected 28 studies from the literature; the main criterion to select studies was whether they included trait information for mutualistic traits and/or phylogenetic information overlapping with the taxa for which there is available trait information (selected literature information is available in Supplementary Material 2.1). Examples of mutualistic traits include when a plant species is 18 visited by an ant defender, when an animal is frugivorous and disperses seeds, or when a symbiont lives within a host and performs a metabolic function. We excluded data sets that included only mutualists because they did not allow us to make a comparison between mutualistic and non-mutualistic species. Non-strict trait information was only addressed if the original source provided information on whether a taxon is only a mutualist in some cases. Ambiguity in the trait was provided in 3 trait data sets; we addressed the uncertainty in the trait by including a not-strict and strict version of the trait. If a taxon was listed as sometimes engaging in mutualism it is coded as a mutualist (“not-strict”) or if a taxon only engages in mutualism it is coded as a mutualist (“strict”) (see Supplementary Material 2.1). We also removed taxa with unknown trait information or changed categories of symbiosis to a binary system where values of ‘0’ represent non-mutualistic taxa and ‘1’ represent mutualistic taxa (Supplementary Material 2.1 includes details for which taxa were removed from the tree due to a lack of trait information). All other trait data sets only provided information on whether a taxon was mutualistic or not-mutualistic and did not account for fluctuation in the behaviour or frequency of engaging in mutualism. Once tree and/or trait information was collected for a given mutualism, we used the same tree or trait data set in multiple combinations (i.e., if we collected two phylogenies and three trait data sets for the same taxonomic group, we had a total of six tree and trait combinations in our analysis) (Table 2.1 details the pairs of tree and trait information). In some cases, we used the available trait and tree information from the same source, and in other cases we combined data from multiple sources (Table 2.1). It is also possible that taxon overlap between trees from different sources. A phylogeny was used with a trait data set if there was at least 50% overlap between the taxa in the tree and taxa with available trait information. 19 In total we had 35 tree and trait combinations resulting from 28 studies for a range of taxonomic classes and families: 14 land plant (including Fabaceae, Moraceae, and angiosperms broadly), 4 Insecta (or more specifically Formicidae), 4 Aves, 2 Proteobacteria, 1 Anthozoa, 2 Bivalvia and 8 Mammalia (including Noctilionoidea and Primate) data sets. 2.2.2 Diversification analyses Once we collected the data, each tree and trait combination was analyzed using HiSSE models and/or sister group contrasts if the data was available in the required format. HiSSE models include a hidden trait with multiple states (for example states A and B), which can also be considered as different rate classes or different background rates on the tree. We ran a total of seven HiSSE models under a maximum likelihood approach using the R package hisse v 1.9.18 (Beaulieu & O’Meara, 2016): (1) BiSSE-like HiSSE model, (2) null BiSSE model, (3) Character Independent (CID) model with one binary hidden trait (states A and B), (4) Character Independent (CID) model with one hidden trait with four states (A, B, C, and D), (5) HiSSE with one hidden trait with one state only to test cases where the trait is rare, (6) HiSSE with constrained rates between the A and B hidden trait states, and (7) a two-state HiSSE model with no constraints between hidden trait states (see Table 2.2 for assumptions of each). We name models where diversification is not linked to our trait of interest as character independent, or CID, to follow the naming scheme of HiSSE models in the literature (e.g. Economo et al., 2019; Nelsen et al., 2018). We chose the best model based on the Akaike information criterion to determine whether mutualism is influenced by diversification, is character independent, or indistinguishable across trait states. SSE models require a sampling fraction parameter that provides an estimate of how much taxonomic information is missing from the phylogeny. Past studies have used different methods to calculate this value, which include assuming the phylogeny includes 50% of all species (see 20 Weber & Agrawal, 2014) or dividing the number of tips in the tree by the estimated taxa in the clade (see Scott, 2018). We used the latter approach of a global sampling fraction; the total number of tips in the tree was divided by the estimated total taxa in the clade of interest for both the ‘0’ and ‘1’ states. We used a global sampling fraction to take into consideration phylogenetic under-sampling. Clade size estimates were gathered from the literature or the following databases: The Open Tree of Life (https://tree.opentreeoflife.org/curator), AntWeb (https://www.antweb.org), The Plant List (http://www.theplantlist.org), and BirdTree (https://birdtree.org). We also used a Bayesian approach to HiSSE models in RevBayes (Höhna et al., 2016). By incorporating this additional HiSSE approach, we were able to force extinction to be dependent on speciation, similar to the methods implemented by Zenil-Ferguson et al. (2021). By forcing the extinction rates, we aim to overcome the unreliability of estimating speciation and extinction rates from phylogenies, by focusing only on the diversification pattern differences in models with extinction-constrained compared to models with extinction-estimated (Zenil-Ferguson et al., 2021). Focusing on diversification patterns rather than diversification rate point estimates addresses the potentially congruent likelihoods in time-dependent models (Louca & Pennell, 2020). If mutualists still influence diversification in extinction-constrained models, the pattern is strong enough to infer despite bounded extinction. We thus ran an extinction-estimated model and an extinction-constrained model where extinction was constrained to 0.8 ∗ " + # where " is speciation and # is a random variable. Speciation had a log normal prior with a rate mean of ln(ln(number of tips in phylogeny/2.0)/root age of phylogeny), following the methods of Zenil-Ferguson et al. (2021), which is the expected net diversification rate. One global sampling fraction was provided, which was the number of tips in the tree divided by the total number of known taxa in the clade, following the protocol of previous studies when using RevBayes (Meseguer et al., 21 2022; Zenil-Ferguson et al., 2021). We ran a Markov chain Monte Carlo (MCMC) for 10,000 generations. In addition to the HiSSE models, we used an alternative approach to test for signals of the impact of mutualism on macroevolution: sister-group contrasts (Mitter et al., 1998; Slowinski & Guyer, 1993). Specifically, we collapsed the phylogenies into clades that shared traits (collapsed clades that are mutualistic versus non-mutualistic) and used the Wilcoxon signed-rank test to evaluate clade size differences in non-mutualist clades versus mutualist clades. We also used the Käfer & Mousset (2014) resampling test to overcome unequal ages between a clade with a derived trait and its sister group with the ancestral trait; the derived group will on average contain less species since it is younger. We did not include sister contrast results if there were less than six contrasts in a phylogeny due to the small sample size. We used the transition rate matrix from the best fitting HiSSE models to conduct stochastic character mapping (1,000 character maps) with the R package corHMM v 2.7 (Beaulieu et al., 2017). The proportion of branch lengths in each trait state was extracted from the stochastic character maps and multiplied by the diversification rates for each hidden trait state from the two-state unconstrained HiSSE model across all the data sets where a time-calibrated phylogeny was available (Supplementary Material 2.2). The proportion of branch lengths in each state multiplied by the diversification rates were summed for both the A and B states of the hidden trait to calculate a weighted diversification rate. As the stochastic character maps from corHMM estimates the rates of speciation and extinction independently, we also use stochastic character maps built in RevBayes to estimate them based on the HiSSE analysis (Höhna et al., 2016). The proportion of branch lengths were multiplied by the diversification rates for every fifth step of the MCMC excluding burnin for either states 0 and 1 or for each hidden trait state depending on whether the 22 map showed two or four states total across all the data sets where a time-calibrated phylogeny was available. 2.3 Results & Discussion We collected mutualistic trait information and phylogenies from the literature for 35 data sets. We found that HiSSE maximum-likelihood approaches, HiSSE Bayesian approaches, and sister contrasts suggest that mutualism can have a positive, negative, or no influence on diversification depending on the taxonomic groups involved in the mutualistic interaction (Table 2.1). However, the most prominent patterns across mutualistic systems and our approaches showed that mutualism has no influence or a positive influence on diversification. Of the 35 data sets, 30 were used in HiSSE models due to the availability of a phylogeny (Table 2.1). 17 of the 30 data sets suggested that a character independent HiSSE model was the best fitting model under the global sampling fraction, 1 suggested that diversification was equal across states, 8 data sets showed a positive, and 4 data sets showed a negative relationship between mutualism and diversification. 43% of data sets investigated with HiSSE models involved land plants, and 50% of the models (4 of 8) that showed a positive relationship between mutualism and diversification were in angiosperm data sets with facultative defence mutualisms. A recent review by Chomicki et al. (2019) suggests that the influence of mutualisms on species richness is dependent on the type of interaction and several environmental factors. Our HiSSE best-fit model results that show a positive influence of mutualism on diversification suggest that defence mutualisms may spur diversification, potentially because the interactions decrease the extinction threat faced by the plants (Weber & Agrawal, 2014). However, one commonality in our datasets where the best-fitting HiSSE model shows a positive effect is that there are only 1-2 transitions on 23 the phylogeny; the lack of evolutionary replication makes it difficult to be confident about the association between the rate shift and the trait in question (Maddison & Fitzjohn, 2015). Of the 30 data sets used in the HiSSE models, a subset of 24 datasets included a time-calibrated phylogeny. The patterns of the weighted diversification rate differences across all taxonomic groups for the two-state HiSSE models are shown in Figure 2.1 and for mutualistic systems are shown in Figure 2.2. A total of four results are excluded from the figure, as the diversification estimates between the trait states differed by at least four orders of magnitude, suggesting that the HiSSE model did not converge. The HiSSE patterns suggest that the relationship between mutualism and diversification is neutral in 57% of the models (17/30). Many previous studies showed that mutualism spurred diversification in angiosperms with ant defenders and ant seed dispersers, in primates that disperse seeds, and in figs pollinated by fig wasps (Bruun-Lund et al., 2018: Lengyel et al., 2009; Gómez & Verdú, 2012; Weber & Agrawal, 2014). Compared to previous empirical studies we found fewer tree and trait combinations that showed that mutualism increased diversification and therefore less overall support for the hypotheses that mutualism spurs diversification by increasing ecological opportunities. Though we did not directly compare our results from HiSSE to BiSSE models because we did not run BiSSE analyses, our results show an association between mutualism and diversification in fewer data sets likely because HiSSE allows for variation in the null model. Rabosky & Goldberg (2015) suggested that BiSSE attributes diversification to a trait spuriously whenever other sources of rate heterogeneity exist, causing trait-dependent diversification to be favoured over the null hypothesis that rates across trait states are constant. As mentioned above, of the 30 data sets used in the HiSSE models, 24 datasets included a time-calibrated phylogeny and were analyzed using RevBayes (1 data set for the constrained model 24 did not reach 10,000 MCMC steps with over 384 hours of run time and a 10 GB memory request). The results from the Bayesian HiSSE MCMCs models suggest that seven data sets show that mutualism negatively impacts diversification, three show no impact on diversification, and 14 show that mutualism positively impact diversification for the extinction-estimated models (sign test p = 0.0002772) (Figures 2.3A and 2.4A). For extinction-constrained models, four data sets show mutualism hinders diversification, five show no impact on diversification, and 15 suggest that mutualism spurs diversification (sign test p = 0.006611) (Figures 2.3B and 2.4B). Only two of the simmaps from RevBayes detected the four rate classes (0A, 1A, 0B, 1B); this suggests that the hidden rate class is rare, as only a small fraction of time (in the case of the simmaps, 0 branch lengths) is spent in the hidden rate class. The RevBayes results supporting the hypothesis that mutualism hinders diversification belong to seed-dispersal, chemosymbiosis, resource, mycorrhizal, and pollination mutualisms involving Aves, Bivalves, Insecta, and Moraceae (Figures 2.3-2.4). Mutualism also spurs diversification in seed-dispersal, chemosymbiosis, resource, and nitrogen fixing mutualisms in Mammals, Bivalves, Insecta, and Fabaceae. There is congruence between the extinction-estimated and extinction-constrained model patterns, as the median weighted diversification rates are correlated (Spearman rank correlation rho = 0.5861 and p = 0.003117); the patterns are thus robust to the extinction parameter. The trait data sets used in our study may be biased to include well known mutualisms with a propensity to enhance diversification, as they were chosen by authors hypothesizing that mutualism should influence macroevolutionary processes to explain diversity in the chosen clade. However, it is also likely that uncertainty in the trait data is a result of false negatives - if a taxon is seen to engage in mutualism it will be coded as a mutualist but it is harder to know what taxa 25 are truly non-mutualists. Having a higher chance of false negatives in the trait data should lead to an overrepresentation of non-mutualists on the phylogenies, and thus both the HiSSE models and sister contrasts could underestimate the influence of mutualism on diversification. The data sets were also not chosen specifically identifying obligate or facultative mutualisms. As the frequency of engaging in a mutualism was not provided in most of the data sets, testing for the obligate or facultative nature of the interaction was not possible. Consequently, it is not possible here to test specific hypotheses involving the differences between obligate and facultative interactions and how they may influence diversification. An additional consideration is that our SSE models are investigating a potential correlation between mutualism and diversification rates; it is also possible that mutualism arises in already diversifying clades. An investigation of ant-plant mutualisms showed that mutualism evolved in clades that were rapidly diversifying, but once mutualism evolved, diversification slowed down (Kaur et al., 2019). When mutualism evolves in otherwise non-mutualistic clades, and in the case where the non-mutualistic clade is rapidly diversifying, mutualism could negatively influence diversification if success is now dependent on a partner. Even though HiSSE models do not misleadingly link a neutral trait to diversification, as seen in previous SSE models, Louca & Pennell (2020) demonstrate the difficulty in estimating speciation and extinction rates from time-calibrated trees, which are consistent with an infinite number of diversification histories, including those which are qualitatively different from one another (Louca & Pennell, 2020). This lack of model identifiability can explain the preponderance of low extinction estimates in many previous studies (Louca & Pennell., 2021). Diversification estimation methods converge to a scenario that is statistically identical to a congruent scenario but is further from the true diversification process (Louca & Pennell, 2020). We aimed to overcome 26 this issue by implementing extinction-constrained models to identify if the patterns of speciation and extinction are consistent with extinction-estimated models. We found that most estimates showed a consistent pattern between the extinction-constrained and extinction-estimated HiSSE models, and conclude that the patterns are robust to the extinction prior. In our case of associating diversification with mutualism, we focused on the trends of negative and positive associations, rather than the point estimates of speciation and extinction, similar to the approach used by Zenil-Ferguson et al. (2021). Many of the sister contrasts suggest that there is no relationship between mutualism and diversification (Table 2.1). Sister contrasts could not be conducted for each data set depending on whether there were too few sister group pairs; sister group comparisons were run for 17 data sets. The Wilcoxon signed-rank test suggested no difference in clade size between non-mutualists and mutualists in 13 data sets, suggested that non-mutualist groups are larger in two data sets (one Insecta data set and one Proteobacteria data set), and suggested that mutualist clades are larger in two land plant data sets. Considering many of the Wilcoxon sign-rank test results showed that there is no significant difference in sister group clade sizes and that mutualism is a derived trait, we used the Käfer & Mousset (2014) resampling test to assess if mutualist sister groups are actually significantly larger than expected given the waiting time delay to evolve mutualism. Under the resampling test, many of the data sets showing no clade size difference under the Wilcoxon signed-rank test showed a positive effect of mutualism on diversification. The two data sets suggesting that mutualist groups were more diverse, were also significant under the resampling test. However, the two data sets suggesting that mutualist groups were less diverse, were likely false differences because the resampling test detected that there were no significant differences in size when considering that mutualists have had less time to accrue diversity. Even though sister group 27 comparisons are a lower power test as they only consider number of species and do not estimate speciation and extinction rates, they are not susceptible to the issues of linking neutral traits to diversification or congruent model classes. Our results provide little support for the hypothesis that mutualism is an evolutionary dead-end and instead suggest that mutualism spurs diversification, or does not correlate to differences in diversification between non-mutualist and mutualist taxa. Mutualisms likely do not influence diversification in the same way when comparing taxonomic groups involved or the type of interactions. We conclude that the effect of mutualism on diversification is likely context dependent—influenced by the specific services provided in the interaction or variation in the groups and not variation in techniques and phylogenetic comparative methods used. 28 Table 2.1. Summary of best fitting HiSSE models and the inferred diversification patterns. “X” represents equal rates between states, “CID” suggests that diversification is character independent, “-” suggests that non-mutualist clades have higher diversification, and “+” suggests that mutualist clades have higher diversification. Sister contrast summary for the Wilcoxon signed-rank test and Käfer & Mousset (2014) resampling method. “X” represents no difference detected in clade sizes between mutualists and non-mutualists, “-” suggests that non-mutualist clades are larger, and “+” suggests that mutualist clades are larger. Mutualism (Investigated partner listed first) Shared Tree? Shared Data? Best fitting HiSSE model Pattern Sister Contrast (Signed Rank Test) Sister Contrast (Käfer & Mousset) Anthozoa Zooxanthellae symbiosis (coral - unicellular symbionts) NA NA Two-state unconstrained HiSSE + X + Bivalvia Chemosymbiosis (mussel - sulphur oxidizing symbiont) Shared tree NA BiSSE like HiSSE - few contrasts Bivalvia Chemosymbiosis (mussel - methanotrophic symbiont) NA BiSSE like HiSSE + Aves Pollination (nectivorous bird - plant) NA Shared data CID-2 CID NA CID-2 CID Aves Seed dispersal (frugivorous bird - plant) Shared tree strict & not-strict BiSSE like HiSSE + Constrained rates between two hidden states HiSSE - 29 Insecta Seed dispersal or resource (ant - plant) Shared tree NA Two-state unconstrained HiSSE - - X NA CID-2 CID few contrasts Mammalia Seed dispersal (frugivorous primate - plant) Shared tree Shared data A CID-2 CID X + Shared data B Two-state unconstrained HiSSE - X X Shared tree Shared data A CID-2 CID X X Shared data B CID-2 CID X X Shared tree Shared data A CID-2 CID X X Shared data B CID-2 CID X + Mammalia Pollination (bat - plant) Shared tree strict & not-strict CID-2 CID few contrasts Two-state unconstrained HiSSE + Land plants Nitrogen fixation (Fabaceae - rhozobia) Shared tree NA CID-4 CID X X Land plants Nitrogen fixation (Fabaceae - rhozobia) NA CID-4 CID X + Land plants Mycorrhizae (angiosperm - fungi) NA CID-4 CID X + Land plants NA CID-4 CID 30 Mycorrhizae (angiosperm - fungi) few contrasts Land plants Mycorrhizae (angiosperm - fungi) Shared data CID-4 CID Land plants Mycorrhizae (land plant - fungi) NA CID-4 CID + + Land plants Pollination (Moraceae - fig-wasp) NA NA CID-4 CID few contrasts Land plants Resource (angiosperm - ant) NA NA BiSSE like HiSSE + Land plants Resource (angiosperm - ant) NA NA BiSSE like HiSSE + Land plants Resource (angiosperm - ant) NA NA BiSSE like HiSSE + Land plants Resource (angiosperm - ant) NA NA Null BiSSE X Land plants Resource (angiosperm - ant) NA NA One hidden state HiSSE + Land plants Resource (angiosperm - ant) NA NA CID-2 CID 31 Land plants Pollination (Boraginaceae - animal) No time calibrated tree X X Land plants Resource (angiosperm - ant) No tree available X + Land plants Resource (angiosperm - ant) No tree available + + Proteobacteria Microbial symbiosis (microbe - eukaryotic host) No time calibrated tree X X Proteobacteria Microbial symbiosis (microbe - eukaryotic host) No time calibrated tree - X 32 Table 2.2. Breakdown of the maximum likelihood HiSSE model parameters and constraints, where τ=turnover, ε=extinction fraction, 0=non-mutualistic, 1=mutualistic, and A, B, C, D are states of the hidden trait. Speciation = τ / (1+ε) and extinction = (τ*ε) / (1 + ε). Model Hidden States Number of Hidden States Assumptions BiSSE like HiSSE (trait-dependent) no 0 τ0 ¹ τ1 and ε0 ¹ε1 Null BiSSE (trait-independent) 0 τ0 = τ1 and ε0 = ε1 Character Independent (CID)-2 HiSSE (binary hidden trait) yes 2 τ0A = τ1A, ε0A = ε1A, τ0B = τ1B, ε0B = ε1B Character Independent (CID)-4 HiSSE (four-state hidden trait) 4 τ0A = τ1A, ε0A = ε1A, τ0B = τ1B, ε0B = ε1B, τ0C = τ1C, ε0C = ε1C, τ0D = τ1D, ε0D = ε1D One hidden state HiSSE (unconstrained) 2 for A 1 for B 0A, 1A, 1B states only (omit 0B) and are not constrained for τ or ε Constrained rates between two hidden states HiSSE 2 τ0A=τ0B, ε0A=ε0B, τ1A=τ1B, ε1A=ε1B Two-state unconstrained HiSSE 2 0A, 1A, 0B, 1B are not constrained for τ or ε 33 Figure 2.1. Two-state unconstrained HiSSE model results for all data sets that include a time-calibrated, ultrametric phylogeny for all taxonomic groups. Open circles represent data sets where the two-state unconstrained model was not the best fit (and therefore are non-significant data points). Horizontal dashed line is at 0 diversification difference weighted by states. Colours represent different taxonomic class of interactions. Hollow circles represent data points where the best fitting model was not a two-state unconstrained HiSSE model. −0.20.00.20 5 10 15 20 25DatasetsWeighted Difference in Diversification RatesTaxonomyAnthozoaAvesBivalviaFabaceaeInsectaMammaliaMoraceaeVarious land plant groups−10120 5 10 15 20DatasetsWeighted Diversification in Diversification Rate−0.20.00.20 5 10 15 20 25DatasetsWeighted Difference in Diversification RatesTaxonomyAnthozoaAvesBivalviaFabaceaeInsectaMammaliaMoraceaeVarious land plant groups−0.3−0.2−0.10.00.10.20.30 5 10 15 20 25DatasetsWeighted Difference in Diversification RatesA−0.20.00.20 5 10 15 20 25DatasetsWeighted Difference in Diversification RatesB 34 Figure 2.2. Impact of the type of mutualistic interaction on diversification. Colours represent different mutualism types. See Figure 2.1 for additional definitions. −0.20.00.20 5 10 15 20 25DatasetsWeighted Difference in Diversification RatesMutualism Typechemosymbiosismycorrhizanitrogen−fixationpollinationresource (food / shelter)seed−dispersalseed−dispersal / pollinationzooxanthellae symbiosis−10120 5 10 15 20DatasetsWeighted Diversification in Diversification Rate−0.20.00.20 5 10 15 20 25DatasetsWeighted Difference in Diversification RatesTaxonomyAnthozoaAvesBivalviaFabaceaeInsectaMammaliaMoraceaeVarious land plant groups−0.3−0.2−0.10.00.10.20.30 5 10 15 20 25DatasetsWeighted Difference in Diversification RatesA−0.20.00.20 5 10 15 20 25DatasetsWeighted Difference in Diversification RatesB 35 −0.20.00.20 5 10 15 20 25DatasetsWeighted Difference in Diversification RatesTaxonomyAnthozoaAvesBivalviaFabaceaeInsectaMammaliaMoraceaeVarious land plant groups−0.3−0.2−0.10.00.10.20.30 5 10 15 20 25DatasetsWeighted Difference in Diversification RatesA−0.20.00.20 5 10 15 20 25DatasetsWeighted Difference in Diversification RatesB Figure 2.3. RevBayes HiSSE results for data including a time-calibrated, ultrametric phylogeny for A) the extinction-estimated model and the B) extinction-constrained (where extinction = 0.8 ∗ " + #) model. Points are medians and bars are 25% and 75% lower and upper quantiles. Hollow circles represent data points where bars overlap with zero. The median weighted diversification rates are correlated (Spearman rank correlation rho = 0.5861 and p = 0.003117). Colours represent different taxonomic class of interactions. 36 −0.20.00.20 5 10 15 20 25DatasetsWeighted Difference in Diversification RatesMutualism Typechemosymbiosismycorrhizanitrogen−fixationpollinationresource (food / shelter)seed−dispersalseed−dispersal / pollinationzooxanthellae symbiosis−0.3−0.2−0.10.00.10.20.30 5 10 15 20 25DatasetsWeighted Difference in Diversification RatesA−0.20.00.20 5 10 15 20 25DatasetsWeighted Difference in Diversification RatesB Figure 2.4. Impact of the type of mutualistic interaction on diversification. Colours represent different mutualism types. See Figure 2.3 for additional definitions. 37 Chapter 3 Host-association does not promote microbial diversification on a large-scale bacterial phylogeny 3.1 Introduction Microbes associate with many hosts and provide them with a suite of benefits or services, aiding in defence and metabolism as well as playing a role in immunity (Douglas, 2010; McFall-Ngai et al., 2013; Sommer & Bäckhed, 2013). Microbial communities are diverse and their composition differs between host-associated and non host-associated habitats: for example data from the Earth Microbiome Project (EMP, Thompson et al., 2017) suggests that animal-association is an important trait in distinguishing microbial communities. In particular, mammalian gut microbiota are distinct from non-gut microbiota (Ley et al., 2008; Seedorf et al., 2014; Thompson et al., 2017). The ecological assembly of host-associated microbial communities is influenced by the characteristics of their hosts such as body size, phylogeny, diet and morphology (Ley et al., 2008; Mazel et al., 2018). On a macroevolutionary scale, microbes may also be influenced by their host partner; for example, Sachs et al. (2014) summarizes data on a restricted set of well-known bacterial-eukaryotes symbioses to suggest that this mutualistic interaction negatively influences microbial diversification, but the extent to which host association drives diversification in microbes on a larger scale and for microbes living in complex communities like the gut microbiota is relatively unknown. Host associated bacteria originated from free-living ancestors (Sachs et al, 2012) and the novel interaction can vary from beneficial to harmful (Drew et al., 2021). There is also evidence to suggest that in cases of obligate endosymbionts, free-living strains evolve to form symbioses 38 with hosts with pre-existing symbioses and thus replace the original partner (Boscaro et al., 2017). Given the transitions to symbioses and the shifting nature of microbial associations, we aim to characterize and explain variation in microbial diversification by comparing animal-associated and free-living microbes on a large-scale bacterial phylogeny. This approach, in addition to the synthesis analysis conducted in Chapter 2, assesses the potential influence of species interactions on diversification from two different perspectives. Species interactions with direct evidence of being mutually beneficial (mutualisms), in which two species depend on each other for common benefits such as protection or nutrition, are hypothesized to influence diversification (Jablonski, 2008; Vermeiji, 1978; Harmon et al., 2019). Macroevolutionary studies of mutualistic systems suggest that mutualisms can act as a promoter of diversification (Lengyel et al., 2009; Marazzi & Sanderson, 2010; Gómez & Verdú, 2012; Litsios et al., 2012; Joy, 2013; Weber & Agrawal, 2014; Bruun-Lund et al., 2018;). The mechanisms involved in mutualism-associated diversification are difficult to pinpoint (Hembry et al., 2020), but the beneficial relationship between two partners is suggested to increase niche breadth and geographic range or decrease extinction risk, for example (Weber & Agrawal, 2014). Mutualisms can thus inform hypotheses surrounding diversification dynamics, as the gain of mutualism is hypothesized to increase ecological opportunity and consequently diversification for the involved partners (Weber & Agrawal, 2014; Chomicki et al., 2019). However, there is also some evidence that suggests there is no effect of mutualism on diversification (Afkhami et al., 2018; Lorion et al., 2013; Scott, 2018; Smith et al., 2008), that mutualism evolves more in the rapidly diversifying clades but tends to slow their diversification down (Kaur et al., 2019), and that mutualism hinders diversification (Sachs et al., 2014); see also Chapter 2 for further examples where mutualism hinders diversification. An experimental evolution study involving 39 microbes showed that mutualists became stable over time (Hillesland & Stahl, 2010), and an analysis of multiple interactions suggests that diversification is lower in mutualistic versus antagonistic networks due to stabilizing selection (Maliet et al., 2020). Lastly, theoretical work has shown that mutualism is an evolutionary dead end and clades involved in mutualisms are prone to extinction, specifically in obligatory or trait-matching interactions (Hembry et al., 2014, Yoder & Nuismer, 2010). Though interactions with microbes can improve conditions for the host to allow them to survive and adapt to otherwise unsuitable habitats (Afkhami et al., 2014; Losos & Mahler, 2010), the macroevolutionary framework of testing trait driven mutualism-associated diversification is not applicable to microbes generally because the extent of the potential benefit received by the bacterial symbiont is unknown. When investigating symbioses on a large scale, it is unclear if the interactions are truly mutually beneficial (Chamberlain et al., 2014). We therefore do not make the assumption that all animal-associated microbes are mutualists given that a commensal is indistinguishable from an apparent mutualist or parasite if the benefit or harm is low, respectively (Leung & Poulin, 2008), and that animal-associated bacteria tend to be part of a large microbial community, which makes it difficult to demonstrate which bacteria are beneficial (Mushegian & Ebert, 2015). Species interactions where only one species receives a benefit, or commensalism, have also been shown to hinder diversification. In habitats with high heterogeneity, there is evidence to suggest that commensalisms hinder diversification (Li et al., 2016). Similarly, commensal caridean shrimp have lower diversification than their free-living relatives (Davis et al., 2018). Competitive and antagonistic interactions are suggested to increase diversification in theoretical work – specifically, interactions that are costly if phenotypes match influence 40 diversification (Yoder & Nuismer, 2010). In addition, competition between species using the same resources is also suggested to promote diversification due to character displacement (Schluter, 2000). On the other hand, competition has also been suggested to hinder diversification if niches are already occupied by resident species (Brockhurst et al., 2007; Price et al., 2014). Competition may only be a driver of diversification at the beginning of the interaction but may not play a strong role in shaping macroevolutionary dynamics long-term (Hembry & Weber, 2020). Interactions between herbivores and plants, where plants evolve defenses against herbivorous insects, are suggested to influence diversification (Ehrlich & Raven, 1964), though the mechanism has not been directly tested in subsequent literature (Hembry et al., 2014). Similarly, antagonistic interactions between hosts and parasites where parasites evade host immunity spur diversification (Yoder & Nuismer, 2010). Parasites that are directly transmitted were found to have elevated diversification rates and host shifts are not always associated with a change in diversification (Hay et al., 2020). Host-parasite interactions may not always have an effect on diversification; in some cases, the diversification patterns between parasitic and non-parasitic groups were similar (Weinstein & Kuris, 2016). Despite the uncertainty around the nature of the animal-microbiota symbiosis, there is evidence to suggest that the microbial partner evolves independently many times from a non-mutualist state and only rarely abandons the interaction to return to a parasitic or free-living state (Sachs et al., 2014). Gut bacterial lineages for example have maintained exclusive interactions with their host, have been shaped by host driven processes, and can be involved in long-lived and specific interactions with their hosts (Moeller et al., 2016). The structure of tight clusters of related bacteria in gut microbiomes also suggests cooperation with the host (Bäckhed et al., 2005). Additional studies have shown that microbes may co-diversify with their hosts or 41 diversify in parallel with their hosts (Degnan et al., 2012; Hayward et al., 2021; Hongoh et al., 2005) which can be due to allopatric speciation of the host (Groussin et al., 2020) or host filtering (Mazel et al., 2018, but see Boscaro et al., 2022 as this pattern may not be common across different host taxa). Given the empirical evidence that many plant and animal interactions can influence diversification and past studies that demonstrate that microbes evolve long-lived interactions many times, see also Chapter 2, we test the prediction that animal-associated microbes diversify faster than free-living microbes. We specifically compare microbes between (1) gut-associated and free-living, (2) gut-associated and host surface-associated, and (3) generally animal-associated (which includes gut and surface microbes) and free-living communities. We include the host surface environment as this may reflect symbiotic microbes and/or free-living microbes due to the transient nature of this environment (Ross et al., 2018). We build a large-scale, 167,685 Amplicon Sequence Variant (ASV) bacterial phylogeny using an iterative process with 16S rRNA sequences from the Genome Taxonomy Database (GTDB), Earth Microbiome Project (EMP), and SILVA. We test our hypothesis that animal-associated groups will be larger than free-living groups using sister group contrasts. Sister group comparisons do not require complex models or branch lengths but can still evaluate whether a trait influences diversification by comparing clade sizes (Mitter et al., 1988 but see Käfer & Mousset, 2014 discussed below). Though sister contrasts do not detect diversification rates directly, we use them to detect differences in clade sizes. We use sister group contrasts to evaluate if animal-associated clades are larger than free-living clades, which would suggest that host associated microbes have higher diversification than free-living microbes. 3.2 Methods 42 3.2.1 Tree Building We compiled 16S rRNA sequence information from three databases: (1) Genome Taxonomy Database (GTDB) (16,398 sequences - varying lengths (1,139-3,862 base pairs)) (Parks et al., 2018; Parks et al., 2020; Parks et al., 2021; Rinke et al., 2021) (https://gtdb.ecogenomic.org), (2) SILVA (219,168 sequences - core alignment obtained via personal communication with the authors of Louca et al., 2020) (Quast et al., 2012; Yilmaz et al., 2014, Glöckner et al., 2017), and (3) Earth Microbiome Project (EMP) (186,695 error-filtered sequences - 150 base pairs of the V4 region) (Thompson et al., 2017). We also used a starting phylogeny from the GTDB as a constraint backbone tree (16,398 tips). Using the sequence information from the three databases, we built a larger phylogeny using an iterative process. We used the template-based aligner PyNAST (Caporaso et al., 2010) and 16S rRNA from SILVA clustered at 97% (Quast et al., 2012) to align these sequences (16,398 sequences) from the GTDB. We joined the aligned sequences from the GTDB and SILVA and filtered at 90% and converted any spacer characters in the alignment to gaps. With the new alignment, we built a larger backbone tree using the RAxML-VI-HPC rapid hill climbing algorithm where the GTDB tree acted as the constraint tree (Stamatakis, 2014). We chose RAxML as the tree building method because we were able to insert short reads (150 base pair long 16S rRNA sequences) onto a constraint tree built using several genes and proteins. After a 672 hour period of building the backbone tree on 10 cores (with a 100 GB memory request), we downloaded the resulting tree to use for the iterative tree building. From here onwards, the tree built with the GTDB and SILVA sequences is referred to as the new backbone tree. 43 Using the same methods, we aligned 186,695 sequences from the EMP and joined the newly aligned EMP sequences to the existing alignment. We built a second tree for a total of 56 days (two 672 hour periods), requesting 100 GB memory and 10 cores each time, where the new backbone tree acted as the constraint tree for the RAxML rapid hill climbing algorithm (Stamatakis, 2014). Given that after 56 days, the tree was not the final output tree, but an intermediate output tree by RAxML, we ran the same downstream analyses on the resulting tree after several earlier time periods (28, 37, 45, and 53 days) to ensure the results were robust. The 56-day tree includes 235,566 ASVs with the new backbone sequences. After removing the new backbone sequences, the monophyly of each phylum in the final tree was investigated. Sequences were excluded from the tree if they were placed in the incorrect phylum or if they were polyphyletic except for two phyla; Fusobacteria and Tenericutes within Firmicutes were not removed as evidence suggests they can cluster in or out of Firmicutes (Hug et al., 2016; Wolf et al., 2004). After removing the new backbone and misplaced sequences, the final tree includes 167,685 ASVs from the EMP (Figure 3.1). 3.2.2 Metadata For different communities (n=24,259), we used the number of samples or number of reads from the EMP data to determine habitat preference of each unique 16S rRNA sequence (obtained using the deblur software (Amir et al., 2017)) representing a tip of the phylogeny (which will be referred to as an Amplicon Sequence Variant or ASV). ASVs can be resolved fully and show single nucleotide differences in the sequenced gene region and are not defined by dissimilarity thresholds (100% sequence similarity): here we used the non-rarefied “deblurred” EMP table (available at https://zenodo.org/record/890000#.Yktf2y8r1pR, ‘emp_deblur_150bp.release1.biom’ file) that has been produced using the Deblur algorithm 44 (Amir et al., 2017). The data was pruned three different ways to include the following set of communities as classified by the EMP Ontology (EMPO): Comparison 1) EMPO_3 “animal distal gut” + “animal proximal gut” vs. EMPO_1 “free-living”, Comparison 2) EMPO_3 “animal distal gut” + “animal proximal gut” vs. “animal secretion” + “animal surface”, and Comparison 3) EMPO_3 “animal distal gut” + “animal proximal gut”+ “animal secretion”+ “animal surface” vs. EMPO_1 “free-living”. After the dataset was pruned to the communities listed above, the total number of samples or reads for host or free-living environments was converted to percent host-associated values (Figure S3.1). For example, in comparison 1, an ASV is considered as a gut-associated ASV if 90-100% of its total samples or total reads were found in gut environments. An ASV was considered as a non-gut ASV if only 0-10% of its samples or reads were found in gut-associated environments. Any ASVs which fell in the 11-89% threshold were removed prior to any trait analyses (Figure S3.2), and analyses were run separately on trait information retrieved from sample information and read information. Prior to converting the total samples and reads counts to percentages, ASVs were also removed if they had a total read count less than 5. ASVs that were 0-10% gut-associated were coded as ‘0’ and ASVs that were 90-100% gut-associated were coded as ‘1’ in order to convert the data into a binary trait value. For comparison 2 we treated surface habitats as free-living in order to distinguish between host environments that are transient. For comparison 3 we grouped all host environments (gut and surface) together to determine if the gut or surface habitats were driving the diversification patterns. For comparison 1 samples, 17,402 ASVs (9.5% of total) were removed as they fell under the 11-89% threshold, and for reads, 14,147 ASVs (7.7% of total) were removed. For comparison 2 samples, 37,314 ASVs (19.8% of total) were removed as they fell under the 11- 45 89% threshold, and for reads, 31,723 ASVs (16.9% of total) were removed. For comparison 3 samples, 11,199 ASVs (16.6% of total) were removed as they fell under the 11-89% threshold, and for reads, 8,699 ASVs (12.9% of total) were removed. To verify that our results are robust to various technical factors, we run all the subsequent analysis for the full dataset (using EMP non-rarefied samples, presented first in the main text) as well as multiple reduced datasets. The reduced data sets include subsets of the full set of samples; 100 random samples or 50 free-living and 50 gut-associated samples were rarefied and only the ASVs present in the 100 rarefied samples are included in the phylogeny and analyzed in sister groups (see Appendix A for additional information). The 100 sub-samples included anywhere from 7,535 to 9,724 tips. 3.2.3 Sister Contrasts Once each ASV was assigned a binary trait value based on the environment, we pruned the phylogeny into clades that shared a trait value, for the full and reduced datasets independently. We used two different methods to collapse the phylogeny (Figure 3.2). The first method, or the strict method, collapses ASVs into clades if they all share a trait value. That is, each monophyletic group with the same trait was collapsed to a representative tip, with the number of sequences represented by that tip recorded. The second, or non-strict method, collapsed all clades that share a trait value, but allowed for one ASV within the clade to be of the other trait (majority rule collapsing allowing for one outlier). In this case, each collapsed tip represents a clade where all but one ASV shares the same trait. The strict method results in a higher number of contrasts but clades are homogenous and the non-strict method allows for limited heterogeneity of a trait within a clade. After we collapsed the tips into clades, we extracted sister clades where one sister clade is animal-associated and the other is free-living. Because the final output tree with the short reads 46 did not have branch lengths, sister contrasts were the ideal approach to assess diversification as they only require clade size information of equally old groups (Felsenstein, 1985). We used a Wilcoxon signed-rank test to assess if clade sizes differed based on the binary trait. Sister contrasts only account for clade sizes and also do not include all the tips on the tree if they do not have a direct sister group; therefore, sister group comparisons are prone to Type II error as they are a low power test. Käfer & Mousset (2014) point out the fact that a clade with a derived trait may have a longer stem branch than its sister group. With an equal diversification rate, the clade with the derived trait will on average be younger and thus contain fewer species (Käfer & Mousset, 2014). Therefore, though sister groups branch from the same ancestral node, the contrast of the trait is not the same as the age of the ancestor (Käfer & Mousset, 2014). We therefore used a sister contrast test developed by Käfer & Mousset (2014) to overcome this issue in which the sister pairs are resampled, and trait states are reassigned based on the ratio of the number of species in the sister groups. We also assessed how potential trait reversions can influence the conclusions of the resampling test. Using the diversitree R package (Fitzjohn, 2012), we simulated a 1,000-tip tree with 1,000 data sets permitting trait transitions between both directions (at a rate of 0.1) for a binary trait and 1,000 data sets not permitting trait reversions back to the ancestral state. We used the strict pruning method to collapse the tree and the Wilcoxon signed-rank test and Käfer & Mousset (2014) resampling test to run sister group comparisons. In addition to sister group information, we ran a parsimony reconstruction using the castor R package (Louca & Doebeli, 2018) to provide an overall number of trait transitions across the tree. 3.3 Results & Discussion 47 We built a large-scale bacteria phylogeny using an iterative tree building approach with partial and full length 16S rRNA sequences from three databases (GTDB, SILVA, EMP) and assigned a habitat value to each tip of the phylogeny (each tip represents an ASV) using EMP metadata. The final 167,685-ASV tree consisting of partial 16S RNA (150 bp) sequences from the EMP was used to assess (i) how many times microbes transitioned between habitats, and (ii) whether animal-associated bacteria have higher diversification rates than free-living bacteria. We accounted for phylogenetic uncertainty by ensuring taxa were monophyletic to the phylum level (with the exception of Fusobacteria and Tenericutes within Firmicutes). We did not investigate taxonomy at a finer resolution, consequently any remaining uncertainty in taxon placement will influence the interpretations of the sister comparisons because they are conditional on the tree. The majority of EMP ASVs could be assigned unambiguously to a habitat: 83.1-92.3% of the ASVs were found to be mostly present in one single type of habitat (i.e. >=90% of their reads or sample counts in that habitat). This suggests that the commonly used microbial unit definition employed here (150 bp ASV) provides enough genetic resolution to distinguish between broad habitat categories. By removing ASVs with ambiguous habitats (between 11-89% host-associated) we ensure the remaining ASVs are more likely representing their true habitat. Even with the relatively strict thresholds of <=10% and >=90%, only 7.7-19.8% of ASVs were removed. The relative proportions of free-living vs host-associated taxa varied greatly between different phyla, as expected from their ecology (Ley et al., 2008; Thompson et al., 2017). For example, Lentisphaerae, Tenericutes, and Firmicutes were the top three phyla that were found to 48 be mainly composed of gut-associated clades across the comparisons, while Protobacteria were mostly found outside of the gut environment (Figures S3.3-S3.14). Our parsimony habitat reconstructions show there are between 2,973 to 4,660 trait transitions across our comparisons. Most transitions were observed in the Proteobacteria phylum across all comparisons (Figures S3.15-S3.20). The number of trait transitions reflects how often an association with a host is lost or gained. Though we are unable to quantify transition rates between host-association and free-living due to the missing branch length information, our results suggest that bacteria can easily switch between habitats contrary to evidence that bacterial mutualists are stable (Sachs et al., 2014). This difference is likely due to the fact that our assessment relies on a very large database covering hundreds of thousands of bacterial clades while previous studies were limited to several hundred clades. It is also possible that some of the transitions we recovered are not true transitions due to uncertainty in the phylogeny or if we assigned an ASV as free-living due its transient presence in some samples (Taberlet et al., 2018). However, given that our data do not include the majority of animal diversity, we may also have underestimated the diversity of animal-associated bacteria and thus transition numbers into this habitat (Louca et al., 2019; Thompson et al., 2017). It remains to be seen how our results will be influenced by the inclusion of more bacterial clades (Louca et al., 2019). In any case, the high number of transitions between free-living and host-association represent “natural experiments” that can be harnessed to compare diversification rate in these two habitats by comparing the sizes of two sister groups (Figure 3.2, see also a summary including the median number of reads, median number of samples, median percentage host associated, and a taxonomy breakdown for each sister contrast for all three comparisons in the Supplementary Materials 3.1-3.12 and Figure S3.21). 49 The first comparison between gut and free-living habitats demonstrated that free-living groups are significantly larger than their gut-associated sister clades (there are, on average, 29% more contrasts where the free-living group is larger, with the exception of the non-strict pruning method when reads were used to assign the trait value, which shows no difference in clade sizes) (Table 3.1, Figures 3.3-3.4). The second comparison between host gut and host surface environments suggested that regardless of the method, the gut sister groups are always significantly larger than their surface-associated sister groups (40% more contrasts where the gut-associated group is larger) (Table 3.1, Figures 3.3-3.4). Lastly, when we combined gut and surface habitats together into a broad animal-associated category to compare clade sizes to free-living environments, the free-living sister clades are significantly larger except for the strict method under the resampling sister group test when samples were used to assign the trait value, which is non-significant (on average there are 47% more contrasts where the free-living group is larger) (Table 3.1, Figures 3.3-3.4). Our results are robust to (1) the way we assign habitat preferences (using prevalence, the proportion of samples found in a habitat, or abundances, the proportion of reads found in a habitat, see Table 3.1), (2) rarefaction of the data (see Appendix A Supplementary Rarefied Methods and Supplementary Results and Table S3.1), (3) the way we delineate sister clades (strict or non-strict pruning method, see Table 3.1). The results were consistent between assigning tips based on reads or samples with only one exception (as discussed above for the non-strict pruning methods when reads were used to assign the trait in the gut vs free-living comparison). In terms of rarefied data, the results were robust when using rarefied data to assign traits and when taking a random set of samples and rarefying the data. In all cases the results of rarefied data where an equal number or a random number of samples for free-living and gut- 50 associated habitats were included suggested that there is either no difference in clade sizes or that free-living groups are larger. These results hold in the case of having both an equal and unequal number of samples between free-living or gut-associated groups. Therefore, the deeper sampling of free-living habitats and including more free-living taxa is unlikely to introduce bias and cause the pattern of free-living groups being larger than host-associated groups, especially because the equal sample results still showed that free-living groups were larger in 8 of 10 tests. Lastly, the difference in significance values and patterns between the strict and non-strict methods is likely because there are overall fewer clades and fewer sister contrasts and the non-strict method removes contrasts where one sister group is represented by one tip (ie. contrasts of one vs many or one vs few are removed). Despite the removal of such contrasts, in many of the non-strict tests there is still a difference in clade sizes. The resampling test of Käfer & Mousset (2014) is not reliable when there are many trait reversions because what is considered the ancestral or derived clade will switch with a trait reversal. Although we did not reconstruct transitions in each direction (count how many next-closest relatives of a sister-group pair were free-living or host-associated), there are 2,973 - 4,660 trait transitions across all the comparisons. Using simulations, we demonstrated that trait reversions can cause tests with significantly different clade sizes under the signed rank test to be interpreted as non-significant under the resampling test, likely because there are many trait transitions on the tree, and either sister group could contain the derived trait (Figure S3.22). Across the three comparisons, the resampling contrast test results are consistent with the signed-rank test results. Both tests show there is a significant difference in clade size with one exception (animal-associated versus free-living strict samples test). 51 The majority of the contrasts were in the Proteobacteria, Bacteroidetes, and Firmicutes phyla (see Figures S3.23-S3.34), which are also the more ASV rich phyla. Within these three phyla the families with the highest number of contrasts for the broad animal-associated vs free-living comparison were: Sphingomonadaceae (Proteobacteria), Flavobacteriaceae and Chitinophagaceae (Bacteroidetes), and Lachnospiraceae and Ruminococcaceae (Firmicutes). The sister contrasts reflect the transitions found within these groups as there is evidence to suggest they are found across habitats. For example, Sphingomonadaceae are found as free-living in environments such as soil or water (Glaeser & Kämpfer, 2014) as well as in the guts of invertebrates and herbivores (Holt et al., 2020; Muratore et al., 2020). Flavobacteriaceae are abundant across many habitats including free-living and animal-associated environments (McBride, 2014). Chitinophagaceae are found in soils and water (Whitman et al., 2016) but also have been studied in human gut microbiomes (Barandouzi et al., 2020; Kashinskaya et al., 2018). Studies have also found Lachnospiraceae and Ruminococcaceae in free-living and animal-associated environments (Biddle et al., 2013; Huang et al., 2019; Meehan et al., 2014). Despite gut clades being on average larger than their sister groups from surface-associated habitats, when considered alone (gut vs free-living) or combined (gut and surface combined vs free-living), free-living clades are almost always significantly larger. There are on average 38% more contrasts in which the free-living clade is larger compared to when the host-associated clade is larger across the comparisons. This suggests that there can be discrepancies within host associated habitats because gut microbes have higher diversification rate than surface microbes, but free-living environments still have the highest diversification. Gut and surface habitats may be subject to different selection pressure. For example, it is possible that the gut habitat provides a more diverse array of environmental conditions (pH, Oxygen levels, 52 antimicrobial levels) compared to the host surface that facilitates microbial diversification in distinct niches. In addition, surface microbiota tend to be more transient than gut microbiota (Degnan et al., 2012; Hongoh et al., 2005; Ross et al., 2018). Although there are several instances where mutually beneficial interactions in plants and animals were found to spur diversification in empirical studies, for example in seed-dispersal and resource mutualisms in Chapter 2, there is also substantial evidence that mutually beneficial interactions may hinder diversification (Sachs et al., 2014; Yoder & Nuismer, 2010). However, we cannot be certain that gut or surface microbial associations are true mutualists that are providing a benefit to their host (Hammer et al., 2019). Mutualist partners may not always be providing a benefit as this can depend on the context and on the presence of other microbes (Gould et al., 2018). There is also evidence to suggest that commensalism decreases diversification (Davis et al., 2018; Li et al., 2016); because microbes are not all benefiting from their host interaction, the patterns in previous studies investigating mutually beneficial may not apply or hold in microbial systems. Decreased diversification has also been found in competitive interactions as niches are occupied (Brockhurst et al., 2007; Price et al., 2014). Therefore, if a high proportion of the bacterial symbionts are not receiving benefits, associating with a partner could decrease the available resources or niche, resulting in a decrease in diversification in comparison to mutualists that may allow expansion into a novel niche. The bacterial symbionts could also be exploiting their host, but in doing so are susceptible to the mechanisms hosts use to deter cheaters such as not rewarding harmful symbionts (Sachs et al., 2011). Bacterial symbionts may also be competing with other bacteria for resources, resulting in overall decreased diversification. Furthermore, the fate of the host and its microbial partners is more closely tied because microbes live within their host (Dethlefsen et al., 2007). Microbial 53 diversification may be limited because biogeography is host dependent, for example, and so microbial interactions could have different macroevolutionary implications to plant-animal interactions that have been previously studied. Given that we find that animal-associated groups are not larger than free-living ones, it is possible that host-association in bacteria decreases diversification. As we are likely capturing mutualists, parasites, and commensals in our “animal-associated” category, we cannot conclude what type of interaction specifically is driving the decrease in clades that are interacting with hosts. However, due to a high prevalence of commensal bacteria (Artis, 2008; Hooper & Gordon, 2001) that are not receiving a direct benefit from their host, the discrepancy in clade size may be a result of decreased diversification due to commensalism. We found that bacteria often switch between habitats due to the high number of transitions between our trait states of animal-association and free-living. Due to the high levels of transitions, the diversification of host-associated bacteria could be hindered due to lack of stability or lack of heterogeneous habitats once host-association evolves (see Li et al., 2016). In conclusion, we detected that free-living groups were consistently larger than animal-associated groups, contrary to our hypothesis that associating with a host would spur diversification. 54 Table 3.1. Summary table of contrasts, p values of contrast test and resampled contrast test per method for all three comparisons. Data ASVs in Tree Transitions Method P-value Sign Rank Test P-value Resample Number of Contrasts Contrasts Tied Number of Contrasts Total Contrasts ASVs in Contrasts Comparison 1 Gut Larger Free-living Larger Gut vs Free-living Samples 139,639 2,973 Strict 3.27 x 10-12 0 407 1,124 629 2,160 9,231 Non-strict 0.01245 0 305 283 338 926 7,348 Reads 142,569 3,653 Strict 2.16 x 10-12 0 501 1,358 746 2,605 10,450 Non-strict 0.09169 0 387 369 389 1,145 9,436 Comparison 2 Gut Larger Surface Larger Gut vs Surface Samples 50,912 4,120 Strict 1.37 x 10-5 0 760 1,459 603 2,822 10,156 Non-strict 1.13 x 10-8 0 561 474 365 1,400 7,028 Reads 53,334 4,597 Strict 1.14 x 10-6 0 820 1,665 652 3,137 12,464 Non-strict 5.74 x 10-10 0 607 544 392 1,543 10,200 Comparison 3 Gut + Surface Larger Free-living Larger Animal-associated vs Free-living Samples 127,915 3,515 Strict 2.20 x 10-16 0.0756 402 1,404 763 2,569 10,595 Non-strict 0.01273 0 288 333 315 936 9,378 Reads 132,875 4,579 Strict 2.20 x 10-16 0.0244 516 1,830 955 3,301 11,480 Non-strict 0.02714 0 437 532 452 1,421 10,037 55 Figure 3.1. Phylum level cladogram showing the relationships for the sequences from the EMP. Taxonomy information was provided by the EMP for all ASVs (Thompson et al., 2017). All phyla are monophyletic with the exception of Firmicutes, which include Fusobacteria and Tenericutes (Hug et al., 2016; Wolf et al., 2004). The black bars are the log size of each phylum, and the blue rings are concentric rings showing 10, 100, and 1,000 ASVs starting inside and moving outwards. 56 Figure 3.2. Schematic showing the two pruning algorithms (strict and non-strict) used to extract sister contrasts. Coloured tips represent different traits and n represents the number of original taxa each tip represents. After pruning, direct sister tip n values are used in the sister contrast test. 57 Figure 3.3. Summary of clades for all three comparisons for both clades that are included and not included in the sister contrast test. Point shape represents whether the clade was used in the contrast test and point colour shows trait. Both clade sizes and number of clades are shown on a log scale. • .Gut vs Non-gut Gut vs Surface Animal-associated vs Free-livinglog(Clade Size)log(Number of Clades)Trait• .• .Surface / Free-livingGut / Animal-associatedSister ContrastIn contrastsNot in contrastsSamplesReadsStrict Non-strict Strict Non-strict Strict Non-strict024680 2 4 6 8024680 2 4 6 8024680 2 4 6 8024680 2 4 6 8024680 2 4 6 8024680 2 4 6 8024680 2 4 6 8024680 2 4 6 8024680 2 4 6 8024680 2 4 6 8024680 2 4 6 8024680 2 4 6 8log(Clade size) 58 Figure 3.4. Log ratio of sister contrast sizes summary of all three comparisons. Ratios are defined as the non-gut sister group/gut sister group, surface sister group/gut sister group, or free-living sister group/animal-associated sister group. Less than zero bars (purple) represent contrasts where the gut or animal-associated sister group is larger (i.e. groups more ASVs) and greater than zero bars (green) show contrasts in which the free-living or surface sister group is larger. 59 Chapter 4 Ancestry-based and similarity-based approaches for analyzing simulated B cell clonal families and their ancestral sequences 4.1 Introduction Antibodies form an integral part of the adaptive immune system and arise from stem cells through a series of complex processes. Stem cells develop into pro-B cells, which undergo a diversification process of V(D)J (named after the Variable, Diversity, and Joining genes) recombination in the V, D, and J genes of the immunoglobulin heavy chain (IgH) and V and J genes of the immunoglobulin light chain (IgL) (Chi et al., 2020). After V, D, and J genes are rearranged in the variable regions of the heavy and light chains, additional nucleotides can be lost or added during the joining process in the heavy chain to further increase genetic diversity (Chi et al., 2020). V(D)J recombination gives rise to mature B cells, also considered as unmutated ancestral clones or naïve sequences, which later go through further changes via somatic hypermutation (SHM). SHM is facilitated by activation-induced cytidine deaminase (AID) occurring in the germinal center; SHM introduces random point mutations, altering the binding affinity between an antibody and a specific antigen (Mesin et al, 2016). SHM generates a diverse set of mutated B cells, or B cell clones; those that bind strongly to an antigen are selectively favoured as they outcompete B cells with a lower affinity for antigens (Mesin et al., 2016). Consequently, B cell clones that mutate from and share the same ancestral (naïve) B cell constitute a clonal family. B 60 cells that successfully bind to antigens proliferate and eventually become memory B cells (Mesin et al., 2016). Given both the V(D)J recombination and SHM processes, B cell sequences must be organized into clonal family groups first before further analyses can be conducted (Hoehn et al., 2016). When collecting data from high throughput sequencing for example, B cell sequences will be mixed across families, thus it is important to first discern clonal families. Several approaches have been developed to identify clonal families such as MiXCR (Bolotin et al., 2015), Clonify (Briney et al., 2016), BRILIA (Lee et al., 2017), Change-O (Gupta et al., 2015), and partis (Ralph & Matsen, 2016). MiXCR builds alignments of V, D, and J genes to identify families (Bolotin et al., 2015). Clonify uses an antibody distance metric and shared SHMs to determine which clones are most closely related (Briney et al., 2016), BRILIA clusters gene family members and secondarily builds lineage trees (Lee et al., 2017). Change-O assigns clones using V and J genes and junction distance (Gupta et al., 2015). partis involves likelihood-based clustering using a multi-HMM framework, which calculates the likelihood that clusters originate from the same event and can additionally be used to simulate B cell repertoires (Ralph & Matsen, 2016). An alternative approach to directly analyzing the clonal sequences would be first building a phylogeny and then estimating the clonal families from the tree. A potential method to split the tree into clonal families is the Generalized Mixed Yule Coalescent (GMYC) model (Barraclough et al., 2009; Fujisawa & Barraclough 2013; Pons et al., 2006). The GMYC model was developed to infer speciation events from single-locus data (Fujisawa & Barraclough, 2013). The GMYC model assumes that the most recent common ancestor within a species is younger than the split with a nearby sister species and compares the branching rates (Fujisawa & Barraclough 2013). If 61 the tree includes multiple species clusters, the branch length distribution will differ between species. Consequently, clusters of closely related gene sequences delimit species, and this could be applied to clonal family inference if the GMYC model method is able to separate clones into clusters. In addition to assigning clones to families, family assignment allows inference of the unmutated ancestral clone or naïve B cell sequence, which has not undergone SHM. Reconstructing the ancestral clone of a family producing broadly neutralizing antibodies (bnAbs) for example is important for targeting therapies; bnAbs can target many strains of a pathogen by acting against conserved regions (Burton & Hangartner, 2016). Ancestral clones have been investigated extensively in the context of HIV, it has been suggested that by identifying the naïve ancestral sequence of bnAbs, therapies could be developed that would therefore bind to clones originating from similar naïve sequences (Bonsignori et al., 2011; Liao et al., 2013; Mascola et al., 2013). However, if the methods that identify families are susceptible to error and B cell clones are misplaced, the unmutated clone may also be inferred incorrectly. Therefore, we ask (1) if phylogenetic ancestry-based methods can assign B cell clones to families as well as or better than similarity-based methods, and (2) whether ancestral sequence reconstruction analyses are sensitive to clonal misclassification? We predict that B cell clonal families can be analyzed using methods previously developed specifically for species delimitation and also want to quantify how well they perform in comparison to methods developed specifically for clonal assignment. We hypothesize that ancestral sequence reconstruction will be influenced by misclassification, and that reconstruction accuracy will decrease with increasing misclassification. Ancestral sequences have been inferred using traditional phylogenetic methods suggesting that joint and marginal ancestral reconstruction both 62 perform well (Davidsen & Matsen, 2018); we use marginal state reconstruction to test our hypothesis because the maximum likelihood is inferred at each internal node. We use simulations to create already defined clonal families to compare to the performance of phylogenetic ancestry-based and similarity-based methods. We also use simulated repertoires to purposefully impose clonal misclassification in the families by randomizing sequence placement to assess whether the true unmutated ancestral sequence can still be reconstructed. We thus use partis to simulate B cell repertoires and to assess how phylogenetic methods perform in finding clonal families and ancestral clones. 4.2 Methods 4.2.1 Sequence simulation COVID-19 B cell repertoires were downloaded from the AIRR Data Commons (Christley et al., 2020) using iReceptor Gateway (Corrie et al., 2018). We used partis (Ralph & Matsen, 2016) to infer four parameter sets, referred to as parameter directories in partis, from COVID-19 repertoires corresponding to four individuals (Goel et al., 2021). By inferring parameters from the B cell repertoires that are then used to run simulations, the simulated sequences reflect the true distributions. The inferred parameters include mutation frequency, insertions, deletions, V(D)J genes, per-family specific files, and a cluster size distribution. We simulated 1,000 B cell receptor repertoires for a single locus (heavy chain only) using the inferred parameters (250 simulations from each parameter directory) and set the number of simulation events to five, which results in five clonal families per simulation. 4.2.2 Tree building and ancestral sequence reconstruction All sequences were aligned using MAFFT v7.427 (Katoh et al., 2013). All simulations with less than 1,000 sequences were used to build a mega-tree inferred from a single starting tree in 63 RAxML-ng using the GTR model of nucleotide substitution (Kozlov et al., 2019; Zhang et al., 2020). In total, 874 of 1,000 simulations were used to build a mega-tree where each mega-tree was less than 1,000 tips total (250, 194, 223, and 207 from each parameter directory). Likewise, the sequences in each family within each simulation were used to infer a tree per family using 10 random and 10 parsimony starting trees in RAxML-ng using the GTR model of nucleotide substitution (Kozlov et al., 2019; Zhang et al., 2020). Families with less than 4 and greater than 1,000 sequences were excluded from analyses. Once the tree with the best likelihood was found, we conducted an ancestral sequence reconstruction in RAxML-ng (Kozlov et al., 2019). 4.2.3 Clonal classification methods Both ancestry-based and similarity-based approaches were used to group clones into families. Figure 4.1 demonstrates the pipeline for how the different methods were implemented. 4.2.3.1 Ancestry-based The mega-tree was also assigned “species” clusters using the GMYC model (Barraclough et al., 2009; Fujisawa & Barraclough 2013; Pons et al., 2006) in the splits package (Ezard et al, 2009) in R. Given that the tips of our mega-trees are clones, we infer each “species” cluster from the GMYC model results to be a clonal family. Of the 874 mega-trees, the GMYC model successfully assigned each tip to a cluster in 870. The distribution of family sizes was compared between the GMYC model families and the partis simulation families using a chi-squared test. 4.2.3.2 Similarity-based MiXCR (Bolotin et al., 2015) and Change-O (Gupta et al., 2015) only need sequence information to assign clones to families and do not require a phylogeny. The sequences per simulation (equivalent to the sequences in one mega-tree) were directly processed in MiXCR into clonal 64 groups. In addition, the sequences from each partis simulation were first analyzed using IMGT/HighV-QUEST (Alamyar et al., 2012a; Alamyar et al, 2012b, Li et al., 2013, Giudicelli et al., 2015) and then grouped into clonal families using Change-O. 4.2.3.3 Monophyletic family analysis Both the ancestry-based and immunology-based clonal classification methods were run on a subset of the mega-trees. The subset included only the mega-trees where each of the five families was monophyletic, to remove any potential error the tree-building could introduce to clonal classification. 4.2.4 Reshuffling (Misclassification) In order to impose misclassification, sequences were reshuffled among the families simulated from each parameter directory at a rate of 2.5%, 5%, 10% and 20% (Figure S4.1 provides a schematic summarizing misclassification). Each sequence within a family was assigned a random number between 0 and 1, and if the reshuffling level (0.025, 0.05, 0.1, or 0.2) was less than the random number, the sequence was assigned a new family at random. There is a possibility that a clone was assigned to its original family, and there is also variation in the size of the family after reshuffling. Tree building and ancestral sequence reconstruction analyses were also performed on the 2.5%, 5%, 10% and 20% reshuffled families following the same methods applied to the non-reshuffled families. In total 1,765 family-level trees were built (475, 330, 540, and 420 from each parameter directory) due to the omission of small families from the tree building step; RAxML-ng fails to build trees with 4 or less sequences. 4.2.5 Sequence similarity The naïve ancestral sequences for each family were retrieved from the partis simulations, and the ancestral root sequences were retrieved from the 1,765 original trees and reshuffled trees at each 65 reshuffling level. All sequences were re-aligned in MAFFT v7.427 (Katoh et al., 2013). Per family for the original and reshuffled trees at each level, the ancestral sequence was compared to the naïve sequence reconstructed from the partis simulations to evaluate the percent sequence similarity at each sequence position. 4.2.6 Phylogenetic distance The branch length distances were calculated between each pair of the tips for all the family-level trees. The pairwise branch length distances, or phylogenetic distances, measure where each pair of tips joins or merges on the phylogeny. Given that the clones within a family are closely related, the phylogenetic distance distribution for one family-level tree should be unimodal. However, when clones are misclassified, the tree may not solely include clones from the same family. Phylogenetic distance distributions of trees with misclassified clones should have a bimodal or multimodal distribution, which represents the multiple distinct clusters in the tree. The phylogenetic distances were calculated using the cophenetic.phylo function in the ape package (Paradis & Schliep, 2019) in R. The modality of phylogenetic distance distributions can be used to identify the number of unique clusters, or in this case, families in the tree. For example, a non-unimodal distribution of phylogenetic distances would suggest that there are multiple families within the tree. The dip.test function in the R package diptest (Maechler, 2013) was used to assess the unimodality of each distribution of phylogenetic distances. Using the MClust R package (Scrucca et al., 2016), Gaussian Mixture Models (GMMs) and a likelihood ratio test were used to assess if the mega-trees had more than one component by comparing a model forced to have one component to a model without a component restriction. 66 4.3 Results & Discussion We ran 1,000 simulations total in partis based on four sets of parameters inferred from COVID-19 repertoires with each simulation consisting of five clonal families. We then built a tree for each simulation (mega-trees) and for each family (family-level trees). We used MiXCR and Change-O to delimit sequences into families, and also applied the GMYC model to split the mega-trees into clonal families. We reshuffled the family-level trees at several rates and used the trees to infer a root ancestral sequence. For each parameter directory we compared the family size distribution between the MiXCR results and the true values from partis using a chi squared test and found no significant difference in any of the parameter sets tested (p = 0.17, p = 0.28, p = 1.0, p = 1.0 for each parameter directory respectively) (Figure 4.2A). However, the median family size detected in clonal groups by Change-O was always between one-two (Figure 4.2A). Although all the sequences in a mega-tree did not originate from the same naive sequence (due to multiple families being present in the phylogeny), MiXCR still adequately detected the distribution of families and performed more accurately than Change-O in reconstructing clonal groups. MiXCR’s performance in relation to other immune repertoire analyses was shown to be accurate and similar compared to ImmuneDB (Rosenfeld et al., 2018). The median family size differed among and between simulations from partis (Figure 4.2A). The results of the GMYC model indicated that median family size was heavily skewed, with many small families (see Figure 4.2A for comparison to partis family sizes). For each parameter directory we compared the family size distribution between the GMYC model and the true value used in partis using a chi squared test, finding a significant discrepancy in three of the four parameter sets tested (p < 3x10-16, p = 0.43, p = 0.0072, p = 0.0077 for each parameter 67 directory respectively). The GMYC model was unable to correctly estimate the true distribution of family size either overestimating (in directories 1, 2 - though not significant, and 4), or underestimating (directory 3). The number of families for partis was set to 5, but the results of the GMYC model suggest that it is not reliably able to discern families given the skewed number of families (Figure 4.2B). Both the GMYC and the Change-O results suggest that there are a larger number of families than the five true families; GMYC found a median number of families of 27.5, 10, 36, and 30 and Change-O found a median number of families of 14, 6, 19, and 18 for each parameter directory respectively despite that there were five true families (Figure 4.2B). MiXCR’s number of family distributions underestimated the number of families at 3, 3, 4, and 3 for each parameter directory, respectively, but this discrepancy is much smaller. 170 of the 874 mega-trees (19.4%) contained five clades where each clade was represented by one family (Figure S4.2). GMYC and Change-O’s performances on these mega-trees where each family is separated still did not correctly uncover the true distribution (Figure 4.3A) or true number of families (Figure 4.3 B). GMYC’s results were consistent with the full set of mega-trees as three out of four distributions were significantly different (p = 1.96 x 10-6, p = 0.00097, p = 0.19, p = 0.0087 for each parameter directory respectively) and Change-O detected the median family size as one across all 170 mega-trees. The family size distribution from MiXCR was not significantly different from the true distribution in partis with the exception of one parameter directory for the set of 170 mega-trees (p = 0.012, p = 0.64, p = 0.19, p = 0.63 for each parameter directory respectively) (Figure 4.3A). Given that the GMYC model was developed to split genes in gene trees into species clusters, it may not be suitable to apply to cases of clonal families (Fujisawa & Barraclough 68 2013). Specifically, B cell families may be too closely related in terms of branch lengths, so that GMYC is unable to detect the clusters. If B cell families share similar V, D, or J regions for example, the distribution of branch lengths could show that the tips are closely related, and GMYC cannot correctly discern families. Instead, GMYC overestimated the number of families consistently for all the parameter directories and thus was detecting too many clusters. This is potentially because GMYC is detecting clusters that are present at any point in the tree, but clonal families are formed at the base of the tree. In addition, Change-O was also unable to uncover a family size or number of family distributions similar to the true distributions. The alignment of V(D)J genes used by Change-O was based on the reference set from IMGT, whereas MiXCR’s results were based on an internal reference set. Change-O employs a hierarchical clustering strategy and a threshold for discerning clonal groups was not assigned. Therefore, the program may have been grouping the majority of the clones in a simulation together, causing the overestimation in the number of families and underestimation of median family size. Change-O’s performance in previous literature studies also suggests that Change-O undermerges families when compared to partis (Ralph & Matsen, 2016). In addition to the mega-trees, we employed RAxML-ng to build family-level trees and determine the most likely ancestral root sequence of each tree at each reshuffling level. When comparing each root sequence to its corresponding naïve sequence from partis for the same family, we found that sequence similarity was very high with a median of 92.42%, 95.13%, 94.95%, and 93.80% per parameter directory suggesting that RAxML-ng can successfully reconstruct trees and ancestral sequences accurately. The sequence similarity steadily decreases as the reshuffling rate increases showing that misclassified clones within a family can drastically influence our ancestral sequence inference (Figure 4.4, Table 4.1). Ensuring that clones are 69 correctly placed in a family is imperative in reconstructing the ancestral sequence, which has implications for developing immunogen therapies (Simonich et al., 2019). We did not compare the performance of RAxML to existing methods in reconstructing the ancestral sequence as the intention was to assess the influence of clonal misclassification on reconstruction accuracy. However, previous studies have suggested that phylogenetic methods such as BEAST and RevBayes can accurately reconstruct the true ancestral sequence, compared to DNAML and DNAPARS for example (Simonich et al., 2019). When comparing the performance of existing methods, dnaml and IQ-TREE were shown to vary significantly from each other (Davidsen & Matsen, 2018). RAxML-ng may have accurately reconstructed the ancestral sequence due to the family-level trees being optimal, given that they were known from the simulations. As the sequences were simulated, the true family delimitation was known, and the ancestor was reconstructed for families with correctly placed clones. Although misclassification was imposed, the original family assignments were known and 100% accurate. An expansion to further test the performance of RAxML-ng could be conducted on empirical data by building trees for clonal groups from B cell repertoires or to use alternative clonal delimitation methods prior to ancestral sequence reconstruction. We also investigated whether the reshuffled family-level trees had unimodal or non-unimodal phylogenetic distances between each pair of tips in the tree by applying the dip.test (Figure 4.5A). As the reshuffling level increased, there were more family-level trees that showed non-unimodal phylogenetic distances. However, even the original trees show that anywhere from 30.3% to 48.8% of the phylogenetic distances are non-unimodal suggesting that the dip.test either cannot correctly detect the number of modes or that the trees have long branches even 70 within a family, which would here explain why GMYC tends to overestimate the number of families. The high percentage of non-unimodal original trees did not support the expectation that closely related tips in a tree would show a unimodal phylogenetic distance distribution. B cell clones within a family may not be closely related if some have undergone a higher amount of mutation, causing long branches and non-unimodal phylogenetic distances. Another potential pitfall of the GMYC model method is that clones have not all originated from a common ancestor but are built into a phylogeny under the assumption that they did originate from a common ancestor. The GMMs additionally show that 88.9% to 93.0% of the original trees have more than one component (Figure 54.B). This is also demonstrated in Figure 4.6, which displays examples where the original family-level tree phylogenetic distances distributions were non-unimodal (Figure 4.6A) and unimodal (Figure 4.6B) according to the dip.test compared to the reshuffled phylogenetic distances. Our findings suggest that RAxML is an effective tool to build B cell clonal trees and to infer ancestral clonal sequence, even with up to 5% clonal misclassification. Given that the ancestral sequence was still reconstructed with over 90% accuracy at 5% reshuffling, RAxML can identify root sequences even when the phylogenies are non-unimodal. Nonetheless, at higher levels of clonal misclassification, estimates for sequences are not as accurate and phylogenies tend to lose unimodality. Furthermore, RAxML is reliable at finding ancestral sequences when clonal families have already been delimited, potentially using a clonal sequence analysis method such as MiXCR to do so, given that the mega-tree and GMYC model approaches were unable to correctly identify families. We thus conclude that phylogenetic approaches can be applied to B cell clonal lineages if there is confidence in which sequences belong to which clonal family. 71 Table 4.1. Median percent similarities comparing the inferred ancestral sequence of each family-level tree across reshuffling levels to the true ancestral (“naïve”) sequence from the corresponding family from partis. Parameter Directory 1 Parameter Directory 2 Parameter Directory 3 Parameter Directory 4 0% 92.42 95.13 94.95 93.80 2.5% 92.20 94.25 94.47 93.25 5% 92.09 94.38 94.33 92.88 10% 81.65 85.94 88.80 86.42 20% 81.54 86.31 88.47 86.20 72 Figure 4.1. Schematic representing how a phylogenetic approach, GMYC, can be used to split clonal sequences into families compared to immunology-based clonal delimitation methods. How well can ancestry-based methods group clonal sequences into families in comparison to similarity-based methods? 73 0123451 2 3 4Parameter Directorylog(Median Family Size)MethodChange−OGMYCMiXCRpartisA02461 2 3 4Parameter Directorylog(Number of Families)MethodChange−OGMYCMiXCRB Figure 4.2. (A) Median family size distributions across families from Change-O (green), GMYC models (pink), and MiXCR (purple) compared to the true family size distribution in the partis simulations (black). (B) Distribution of the number of families from Change-O (green), GMYC models (pink), and MiXCR (purple). The horizontal dotted line shows the size of the number of families from partis (set to five in the simulations). 74 012341 2 3 4Parameter Directorylog(Median Family Size)MethodChange−OGMYCMiXCRpartisA012341 2 3 4Parameter Directorylog(Number of Families)MethodChange−OGMYCMiXCRB Figure 4. 3. (A) Median family size distributions across families from Change-O (green), GMYC models (pink), and MiXCR (purple) compared to the partis simulations (black) only for simulations where RAxML builds a phylogeny where each family is a clade (for 170 of 874 mega-trees). (B) Number of families distributions from Change-O (green), GMYC models (pink), and MiXCR (purple) only for simulations where RAxML builds a phylogeny where each family is a clade. The horizontal dotted line shows the size of the number of families from partis (set to five in the simulations). 75 Figure 4.4. Percent sequence similarity compared to the true ancestral (“naïve”) sequence from partis from RAxML-ng for each of 1,765 families. Each column represents a different parameter directory, and each colour is a different level of reshuffling. The similarity is computed for each base pair in the reconstructed ancestral sequence versus the naïve sequence from partis. 76 Figure 4.5. (A) The dip.test results for 1,765 family-level phylogenies at each level of reshuffling for all four parameter directories. The y-axis represents the percentage of dip.test test results suggesting that the phylogenetic distances of the trees followed a non-unimodal distribution. (B) The GMM results for 1,765 family-level phylogenies at each level of reshuffling for all four parameter directories. The y-axis represents the percentage of GMMs that suggests that there was more than one cluster in the phylogeny. 77 Figure 4.6. Phylogenetic distance values for two families at each reshuffling level. (A) The original, 2.5%, 5%, and 10% phylogenies are 51 tips and the 20% phylogeny is 53 tips after reshuffling. The dip.test results for this family suggest that all of the phylogenies are non-unimodal (p < 10-15). (B) The original phylogeny is 66 tips, 2.5% is 67 tips, 5% is 69 tips, 10% is 66 tips, and 20% phylogeny is 67 tips after reshuffling. The dip.test results for this family suggest that all of the phylogenies are non-unimodal with the exception of the original phylogeny which is unimodal (original tree p = 0.75, 2.5% tree p = 0.010, 5%, 10%, and 20% trees p < 1015). A B 78 Chapter 5 Conclusion 5.1 Mutualistic interactions across taxonomic groups In Chapter 2 I showed that mutualisms do not have a consistent impact on diversification. The majority of datasets across methodologies showed that mutualism either did not influence diversification significantly or spurred diversification, suggesting that the effect of mutualism on diversification is not consistent across interactions or that there were power differences. Mutualistic interactions may provide benefits to species involved, including the ability to occupy a previously uninhabitable niche (Chomicki et al., 2019). However, most of the interactions investigated may only be providing a service or resource in a facultative interaction (Bronstein, 1994). Given that the interacting species could survive on their own, the benefits provided by a partner may not be great enough to occupy a new niche. Those cases where a mutualism was repeatedly associated with increased diversification involved primates, birds, and bats that disperse seeds and ants that defend plants (Chapter 2). Though the exact datasets showing a positive association between mutualism and diversification were not consistent across methods, the taxonomic groups involved were consistent. In these cases, engaging with a partner could allow successful expansion into a novel niche in which species can diversify (Hembry & Weber, 2020). In contrast, only a small proportion of results showed that mutualism hindered diversification (Chapter 2), including those involving primates or birds that disperse seeds. As was the case with positive associations, the taxonomic groups showing negative impacts of mutualism on diversification were consistent across methods. If the survival between partners is 79 closely tied, and partners are not as successful alone, this could lead to decreased diversification (Hembry et al., 2014; Yoder & Nuismer, 2010). In terms of host-microbe interactions, one interaction between mussels and their microbial symbionts suggested that a mutualism with methanotrophic symbionts spurred diversification but another showed that engaging in mutualism with sulphur-oxidizing symbionts hindered diversification. Interestingly, the large-scale bacteria analysis I conducted in Chapter 3 also suggested that mutualism hinders diversification. Host-microbe systems may not be interacting in a similar fashion to mutualists. It may be incorrect to assume a mutual benefit between a host and its bacterial symbionts if the bacteria are exploiting their host as a parasite or being exploited by their host, especially if the interaction shifts along a continuum after it has evolved (Drew et al., 2021; Leung & Poulin, 2008, Mushegian & Ebert, 2015). In addition, given that microbes not only partner with their hosts but live with them as well (Dethlefsen et al., 2007), the fate of the partners may be more closely tied in host-microbe mutualisms than mutualisms between animals and plants. A host-microbe mutualism could thus spur or hinder diversification based on the context of the interaction. 5.2 The influence of phylogenetic comparative methods on biological interpretations Further to understanding the influence of mutualistic interactions on diversification, my thesis also involved and evaluated several phylogenetic methods. Past research investigating species interactions have used different methods including sister contrasts (e.g., Lengyel et al., 2009; Lengyel et al., 2010), BiSSE (e.g., Gómez & Verdú, 2012; Weber & Agrawal, 2014), MuSSE (e.g., Burin et al., 2016, Sachs et al., 2014), and HiSSE (e.g., Scott, 2018). The array of methods caused difficulty in synthesizing the mutualistic literature, and I demonstrated how to address 80 potential pitfalls of certain methods. For example, newly developed SSE models do not spuriously associate a trait to diversification. In addition, comparing patterns of diversification between extinction-estimated and extinction-constrained versions of HiSSE models overcomes unreliable estimates of speciation and extinction rates from phylogenies. Also, sister contrasts can be employed in the absence of branch lengths on very large trees (Chapter 3), but it is important to also account for the different expected clade sizes for derived and ancestral traits (Käfer & Mousset, 2014). When time-calibrated trees are available and SSE methods are employed, the sampling fraction accounting for missing species information can change the outcome of the model when all else remains identical (e.g., Economo et al., 2019). Future studies on mutualism diversification could test whether the results are robust to changes in the sampling fraction. By using new approaches and the same set of approaches on different data sets, my thesis synthesized the available information to show that mutualism most often does not influence diversification or increases diversification, with only a few exceptions. 5.3 Using popular tree building approaches to applications outside of species trees Since B cell clones diversify in response to an interaction with an antigen and form a virus-antibody “arms race” (Fera et al., 2014), they can also be analyzed from a similar perspective to species. In Chapter 4 I demonstrated that tree-building techniques can be applied to entities other than species such as B cell clones as they can successfully reconstruct true ancestral (or naïve) B cell sequences as shown by simulating known B cell repertoires and comparing phylogenetic methods to the known. Though distance-based metrics should be applied to ensure that B cell clones are correctly placed into families, tree-building programs such as RAxML (Stamatakis, 2014) can 81 accurately build trees of clonal sequences. B cell clone trees may not be as accurate if clones are not first separated into families because all sequences in a repertoire do not descend from a common ancestor (Hershberg & Luning Prak, 2015). This was apparent in the analysis of mega-trees, the phylogenies built from sequences from all the families in a simulation, where I found that phylogenetic methods such as GMYC were unable to identify clonal families in simulated B cell repertoires (Chapter 4). GMYC may not be an appropriate method because it aims to identify clusters that appear at any point in the phylogeny, which is likely causing the overestimation of family number by this approach. Similarity-based approaches such as MiXCR are built to align and group sequences into similar types focusing on hierarchy and similarities between potential parent and daughter sequences (Bolotin et al., 2015). Only the parents are considered as final clones, as such, MiXCR is identifying the earliest clones. In contrast, branch lengths in a repertoire mega-tree might not reflect the distance between families typically seen in species phylogenies if clonal families originated from very similar ancestral sequences. The alternative approach to first estimate family placement of a sequence by using methods traditionally developed for B cell repertoire analysis, and then build trees to conduct downstream analysis showed high accuracy to estimate the ancestral sequence. A two step approach is also used in phylogenetic analyses of 16S rRNA when first placing a sequence into a general group and consequently fine-tuning the phylogeny of each group. In the case of my simulated B cell sequences, Change-O and MiXCR were both used to estimate family placement and MiXCR’s distribution of families was the closest to the true distribution. 5.4 Broad implications of my thesis work 82 My thesis investigated the influence of mutualistic interactions on diversification by synthesizing available data and also by conducting a large-scale bacterial analysis. I did not explicitly investigate the difference in diversification outcomes between obligate and facultative mutualisms using empirical data. Future studies could consider the strength of a mutualistic interaction and whether dependence on a partner can predict how the interaction influences diversification. It would also be valuable to test if patterns are robust to additional levels of bounded extinction rates. Another direction would be to include both partners in diversification studies to assess if a host diversifies differently than its symbiont partner. When studying host-microbe interactions specifically, studies may need to focus on one symbiont partner species or a group of species that provide known benefits to their host to clarify the nature of the interaction (mutualism versus parasitism for example). However, approaches that focus on an entire microbiome could continue to be explored but would benefit from obtaining transition rates to understand how often the interaction is lost. In addition, I used phylogenetic approaches to group clones into families and to investigate the ancestral clonal sequence for B cell databases. My thesis also assessed how well ancestral sequences could be reconstructed when clones are misclassified into the wrong family. Future work could expand on this by testing how different methods perform in building the ancestral sequence when there is misclassification. Additionally, the analyses in my thesis could be performed on real world data to test how the conclusions change and if the methods behave differently. The work in my thesis suggests that any distinctions between systems are likely due to biological or contextual differences and not methodological differences given the multi-faceted approach involving sister contrasts, maximum likelihood, and Bayesian methods to assessing the 83 role of mutualistic interactions on diversification. My thesis also shows that tools such as ancestral sequence reconstruction developed for traditional phylogenetic analyses can be used even when B cells are placed into the wrong families to find the ancestor of a B cell clonal family. 84 Bibliography Afkhami, M. E., Mahler, D. L., Burns, J. H., Weber, M. G., Wojciechowski, M. F., Sprent, J., & Strauss, S. Y. (2018). Symbioses with nitrogen-fixing bacteria: nodulation and phylogenetic data across legume genera. Ecology, 99, 502-502. Alamyar, E., Duroux, P., Lefranc, M. P., & Giudicelli, V. (2012a). IMGT® tools for the nucleotide analysis of immunoglobulin (IG) and T cell receptor (TR) V-(D)-J repertoires, polymorphisms, and IG mutations: IMGT/V-QUEST and IMGT/HighV-QUEST for NGS. Immunogenetics (pp. 569-604). Totowa, NJ: Humana Press. Alamyar, E., Giudicelli, V., Li, S., Duroux, P., & Lefranc, M. P. (2012b). IMGT/HighV-QUEST: the IMGT® web portal for immunoglobulin (IG) or antibody and T cell receptor (TR) analysis from NGS high throughput and deep sequencing. Immunome Research, 8, 26. Amir, A., McDonald, D., Navas-Molina, J. A., Kopylova, E., Morton, J. T., Zech Xu, Z., ... & Knight, R. (2017). Deblur rapidly resolves single-nucleotide community sequence patterns. MSystems, 2, e00191-16. Artis, D. (2008). Epithelial-cell recognition of commensal bacteria and maintenance of immune homeostasis in the gut. Nature reviews immunology, 8(6), 411-420. Bäckhed, F., Ley, R. E., Sonnenburg, J. L., Peterson, D. A., & Gordon, J. I. (2005). Host-bacterial mutualism in the human intestine. Science, 307, 1915-1920. Barandouzi, Z. A., Starkweather, A. R., Henderson, W. A., Gyamfi, A., & Cong, X. S. (2020). Altered composition of gut microbiota in depression: a systematic review. Frontiers in Psychiatry, 11, 541. Barraclough, T. G., Hughes, M., Ashford-Hodges, N., & Fujisawa, T. (2009). Inferring evolutionarily significant units of bacterial diversity from broad environmental surveys of single-locus data. BiologyLletters, 5, 425-428. Beaulieu, J. M., Oliver, J. C., O'Meara, B., & Beaulieu, M. J. (2017). Package ‘corHMM’. Analysis of Binary Character Evolution. https://cran.r-project.org/web/packages/corHMM/index.html Beaulieu, J. M., & O’Meara, B. C. (2016). Detecting hidden diversification shifts in models of trait-dependent speciation and extinction. Systematic Biology, 65, 583-601. 85 Biddle, A., Stewart, L., Blanchard, J., & Leschine, S. (2013). Untangling the genetic basis of fibrolytic specialization by Lachnospiraceae and Ruminococcaceae in diverse gut communities. Diversity, 5, 627-640. Bolotin, D. A., Poslavsky, S., Mitrophanov, I., Shugay, M., Mamedov, I. Z., Putintseva, E. V., & Chudakov, D. M. (2015). MiXCR: software for comprehensive adaptive immunity profiling. Nature Methods, 12, 380-381. Bonsignori, M., Hwang, K. K., Chen, X., Tsao, C. Y., Morris, L., Gray, E., ... & Haynes, B. F. (2011). Analysis of a clonal lineage of HIV-1 envelope V2/V3 conformational epitope-specific broadly neutralizing antibodies and their inferred unmutated common ancestors. Journal of Virology, 85, 9998-10009. Boscaro, V., Holt, C. C., Van Steenkiste, N. W. L., Herranz, M., Irwin, N. A. T., Àlvarez-Campos, P., ... & Keeling, P. J. (2022). Microbiomes of microscopic marine invertebrates do not reveal signatures of phylosymbiosis. Nature Microbiology, 7, 810-819. Boscaro, V., Kolisko, M., Felletti, M., Vannini, C., Lynn, D. H., & Keeling, P. J. (2017). Parallel genome reduction in symbionts descended from closely related free-living bacteria. Nature Ecology & Evolution, 1, 1160-1167. Briney, B., Le, K., Zhu, J., & Burton, D. R. (2016). Clonify: unseeded antibody lineage assignment from next-generation sequencing data. Scientific Reports, 6, 1-10. Brockhurst, M. A., Colegrave, N., Hodgson, D. J., & Buckling, A. (2007). Niche occupation limits adaptive radiation in experimental microcosms. PLoS One, 2, e193. Bronstein, J. L. (1994). Our current understanding of mutualism. The Quarterly Review of Biology, 69, 31-51. Bruun-Lund, S., Verstraete, B., Kjellberg, F., & Rønsted, N. (2018). Rush hour at the Museum–Diversification patterns provide new clues for the success of figs (Ficus L., Moraceae). Acta Oecologica, 90, 4-11. Burgio, K. R., Davis, K. E., Dreiss, L. M., Cisneros, L. M., Klingbeil, B. T., Presley, S. J., & Willig, M. R. (2019). Phylogenetic supertree and functional trait database for all extant parrots. Data in Brief, 24, 103882. Burin, G., Kissling, W. D., Guimarães, P. R., Şekercioğlu, Ç. H., & Quental, T. B. (2016). Omnivory in birds is a macroevolutionary sink. Nature Communications, 7, 1-10. 86 Burton, D. R., & Hangartner, L. (2016). Broadly neutralizing antibodies to HIV and their role in vaccine design. Annual Review of Immunology, 34, 635-659. Caetano, D. S., O'Meara, B. C., & Beaulieu, J. M. (2018). Hidden state models improve state‐dependent diversification approaches, including biogeographical models. Evolution, 72, 2308-2324. Campoy, A. N., Addamo, A. M., Machordom, A., Meade, A., Rivadeneira, M. M., Hernández, C. E., & Venditti, C. (2020). The origin and correlated evolution of symbiosis and coloniality in scleractinian corals. Frontiers in Marine Science, 7, 461. Caporaso, J. G., Bittinger, K., Bushman, F. D., DeSantis, T. Z., Andersen, G. L., & Knight, R. (2010). PyNAST: a flexible tool for aligning sequences to a template alignment. Bioinformatics, 26, 266-267. Chamberlain, S. A., Bronstein, J. L., & Rudgers, J. A. (2014). How context dependent are species interactions?. Ecology Letters, 17, 881-890. Chi, X., Li, Y., & Qiu, X. (2020). V (D) J recombination, somatic hypermutation and class switch recombination of immunoglobulins: mechanism and regulation. Immunology, 160, 233-247. Chomicki, G., Ward, P. S., & Renner, S. S. (2015). Macroevolutionary assembly of ant/plant symbioses: Pseudomyrmex ants and their ant-housing plants in the Neotropics. Proceedings of the Royal Society B: Biological Sciences, 282, 20152200. Chomicki, G., Weber, M., Antonelli, A., Bascompte, J., & Kiers, E. T. (2019). The impact of mutualisms on species richness. Trends in Ecology & Evolution, 34, 698-711. Christley, S., Aguiar, A., Blanck, G., Breden, F., Bukhari, S. A. C., Busse, C. E., ... & Cowell, L. G. (2020). The ADC API: a web API for the programmatic query of the AIRR Data Commons. Frontiers in Big Data, 3, 22. Corrie, B. D., Marthandan, N., Zimonja, B., Jaglale, J., Zhou, Y., Barr, E., ... & Breden, F. (2018). iReceptor: A platform for querying and analyzing antibody/B‐cell and T‐cell receptor repertoire data across federated repositories. Immunological Reviews, 284, 24-41. Crepet, W. L., & Niklas, K. J. (2009). Darwin's second “abominable mystery”: Why are there so many angiosperm species?. American Journal of Botany, 96, 366-381. 87 Cruaud, A., Rønsted, N., Chantarasuwan, B., Chou, L. S., Clement, W. L., Couloux, A., ... & Savolainen, V. (2012). An extreme case of plant–insect codiversification: figs and fig-pollinating wasps. Systematic Biology, 61, 1029-1047. Davidsen, K., & Matsen IV, F. A. (2018). Benchmarking tree and ancestral sequence inference for B cell receptor sequences. Frontiers in Immunology, 9, 2451. Davis, K. E., De Grave, S., Delmer, C., & Wills, M. A. (2018). Freshwater transitions and symbioses shaped the evolution and extant diversity of caridean shrimps. Communications Biology, 1, 1-7. De Queiroz, A. (2002). Contingent predictability in evolution: key traits and diversification. Systematic Biology, 51, 917-929. Dean, A. M. (1983). A simple model of mutualism. The American Naturalist, 121, 409-417. Degnan, P. H., Pusey, A. E., Lonsdorf, E. V., Goodall, J., Wroblewski, E. E., Wilson, M. L., ... & Ochman, H. (2012). Factors associated with the diversification of the gut microbial communities within chimpanzees from Gombe National Park. Proceedings of the National Academy of Sciences, 109, 13034-13039. Dethlefsen, L., McFall-Ngai, M., & Relman, D. A. (2007). An ecological and evolutionary perspective on human–microbe mutualism and disease. Nature, 449, 811-818. Dhar, A., Davidsen, K., Matsen IV, F. A., & Minin, V. N. (2018). Predicting B cell receptor substitution profiles using public repertoire data. PLoS Computational Biology, 14, e1006388. Douglas, A. E. (2010). The Symbiotic Habit. Princeton, NJ: Princeton University Press. Drew, G. C., Stevens, E. J., & King, K. C. (2021). Microbial evolution and transitions along the parasite–mutualist continuum. Nature Reviews Microbiology, 19, 623-638. Dykhuizen, D. E. (1998). Santa Rosalia revisited: why are there so many species of bacteria?. Antonie van Leeuwenhoek, 73, 25-33. Economo, E. P., Huang, J. P., Fischer, G., Sarnat, E. M., Narula, N., Janda, M., ... & Knowles, L. L. (2019). Evolution of the latitudinal diversity gradient in the hyperdiverse ant genus Pheidole. Global Ecology and Biogeography, 28, 456-470. Ehrlich, P. R., & Raven, P. H. (1964). Butterflies and plants: a study in coevolution. Evolution, 18, 586-608. 88 Enav, H., Kirzner, S., Lindell, D., Mandel-Gutfreund, Y., & Béjà, O. (2018). Adaptation to sub-optimal hosts is a driver of viral diversification in the ocean. Nature Communications, 9, 1-11. Ezard T., Fujisawa T., Barraclough T.G. (2009). SPLITS: SPecies' LImits by Threshold Statistics. https://rdrr.io/rforge/splits/ Fabre, P. H., Rodrigues, A., & Douzery, E. J. P. (2009). Patterns of macroevolution among Primates inferred from a supermatrix of mitochondrial and nuclear DNA. Molecular Phylogenetics and Evolution, 53, 808-825. Feijen, F. A., Vos, R. A., Nuytinck, J., & Merckx, V. S. (2018). Evolutionary dynamics of mycorrhizal symbiosis in land plant diversification. Scientific Reports, 8, 1-7. Felsenstein, J. (1985). Phylogenies and the comparative method. The American Naturalist, 125, 1-15. Fera, D., Schmidt, A. G., Haynes, B. F., Gao, F., Liao, H. X., Kepler, T. B., & Harrison, S. C. (2014). Affinity maturation in an HIV broadly neutralizing B-cell lineage through reorientation of variable domains. Proceedings of the National Academy of Sciences, 111, 10275-10280. FitzJohn, R. G. (2010). Quantitative traits and diversification. Systematic Biology, 59, 619-633. FitzJohn, R. G. (2012). Diversitree: comparative phylogenetic analyses of diversification in R. Methods in Ecology and Evolution, 3, 1084-1092. Foisy, M. R., Albert, L. P., Hughes, D. W., & Weber, M. G. (2019). Do latex and resin canals spur plant diversification? Re‐examining a classic example of escape and radiate coevolution. Journal of Ecology, 107, 1606-1619. Frederickson, M. E. (2017). Mutualisms are not on the verge of breakdown. Trends in Ecology & Evolution, 32, 727-734. Friedman, W. E. (2009). The meaning of Darwin's “abominable mystery”. American Journal of Botany, 96, 5-21. Fujisawa, T., & Barraclough, T. G. (2013). Delimiting species using single-locus data and the Generalized Mixed Yule Coalescent approach: a revised method and evaluation on simulated data sets. Systematic Biology, 62, 707-724. Garcia, J. R., & Gerardo, N. M. (2014). The symbiont side of symbiosis: do microbes really benefit?. Frontiers in Microbiology, 5, 510. 89 Garcia, A. K., Schopf, J. W., Yokobori, S. I., Akanuma, S., & Yamagishi, A. (2017). Reconstructed ancestral enzymes suggest long-term cooling of Earth’s photic zone since the Archean. Proceedings of the National Academy of Sciences, 114, 4619-4624. Giudicelli, V., Duroux, P., Lavoie, A., Aouinti, S., Lefranc, M. P., & Kossida, S. (2015). From IMGT-ONTOLOGY to IMGT/HighV-QUEST for NGS immunoglobulin (IG) and T cell receptor (TR) repertoires in autoimmune and infectious diseases. Autoimmun Infec Dis, 1(1). Glaeser, S. P., & Kämpfer, P. (2014). The family Sphingomonadaceae. In E. Rosenburg, E.F. DeLong, S. Lory, E. Stackebrandt, & F. Thompson (Eds.), The Prokaryotes, (pp.641-707). Berlin, Heidelberg: Springer. Glöckner, F. O., Yilmaz, P., Quast, C., Gerken, J., Beccati, A., Ciuprina, A., ... & Ludwig, W. (2017). 25 years of serving the community with ribosomal RNA gene reference databases and tools. Journal of Biotechnology, 261, 169-176. Goel, R. R., Apostolidis, S. A., Painter, M. M., Mathew, D., Pattekar, A., Kuthuru, O., ... & Wherry, E. J. (2021). Distinct antibody and memory B cell responses in SARS-CoV-2 naïve and recovered individuals after mRNA vaccination. Science Immunology, 6, eabi6950. Gómez, J. M., & Verdú, M. (2012). Mutualism with plants drives primate diversification. Systematic Biology, 61, 567-577. Gould, A. L., Zhang, V., Lamberti, L., Jones, E. W., Obadia, B., Korasidis, N., ... & Ludington, W. B. (2018). Microbiome interactions shape host fitness. Proceedings of the National Academy of Sciences, 115, E11951-E11960. Groussin, M., Mazel, F., & Alm, E. J. (2020). Co-evolution and co-speciation of host-gut Bacteria systems. Cell Host & Microbe, 28, 12-22. Gupta, N. T., Vander Heiden, J. A., Uduman, M., Gadala-Maria, D., Yaari, G., & Kleinstein, S. H. (2015). Change-O: a toolkit for analyzing large-scale B cell immunoglobulin repertoire sequencing data. Bioinformatics, 31, 3356-3358. Hammer, T. J., Sanders, J. G., & Fierer, N. (2019). Not all animals need a microbiome. FEMS microbiology letters, 366, fnz117. 90 Harmon, L. J., Andreazzi, C. S., Débarre, F., Drury, J., Goldberg, E. E., Martins, A. B., ... & Matthews, B. (2019). Detecting the macroevolutionary signal of species interactions. Journal of Evolutionary Biology, 32, 769-782. Hay, E. M., Poulin, R., & Jorge, F. (2020). Macroevolutionary dynamics of parasite diversification: A reality check. Journal of Evolutionary Biology, 33, 1758-1769. Hayward, A., Poulin, R., & Nakagawa, S. (2021). A broadscale analysis of host‐symbiont cophylogeny reveals the drivers of phylogenetic congruence. Ecology Letters, 24, 1681-1696. Heath, K. D., & Tiffin, P. (2007). Context dependence in the coevolution of plant and rhizobial mutualists. Proceedings of the Royal Society B: Biological Sciences, 274, 1905-1912. Hembry, D. H., & Weber, M. G. (2020). Ecological interactions and macroevolution: a new field with old roots. Annual Review of Ecology, Evolution, and Systematics, 51, 215-243. Hembry, D. H., Yoder, J. B., & Goodman, K. R. (2014). Coevolution and the diversification of life. The American Naturalist, 184(4), 425-438. Hershberg, U., & Luning Prak, E. T. (2015). The analysis of clonal expansions in normal and autoimmune B cell repertoires. Philosophical Transactions of the Royal Society B: Biological Sciences, 370(1676), 20140239. Hillesland, K. L., & Stahl, D. A. (2010). Rapid evolution of stability and productivity at the origin of a microbial mutualism. Proceedings of the National Academy of Sciences, 107(5), 2124-2129. Hoehn, K. B., Fowler, A., Lunter, G., & Pybus, O. G. (2016). The diversity and molecular evolution of B-cell receptors during infection. Molecular Biology and Evolution, 33(5), 1147-1157. Höhna, S., Landis, M. J., Heath, T. A., Boussau, B., Lartillot, N., Moore, B. R., ... & Ronquist, F. (2016). RevBayes: Bayesian phylogenetic inference using graphical models and an interactive model-specification language. Systematic biology, 65, 726-736. Holt, C. C., van der Giezen, M., Daniels, C. L., Stentiford, G. D., & Bass, D. (2020). Spatial and temporal axes impact ecology of the gut microbiome in juvenile European lobster (Homarus gammarus). The ISME Journal, 14, 531-543. Hongoh, Y., Deevong, P., Inoue, T., Moriya, S., Trakulnaleamsai, S., Ohkuma, M., ... & Kudo, T. (2005). Intra-and interspecific comparisons of bacterial diversity and community 91 structure support coevolution of gut microbiota and termite host. Applied and Environmental Microbiology, 71, 6590-6599. Hooper, L. V., & Gordon, J. I. (2001). Commensal host-bacterial relationships in the gut. Science, 292(5519), 1115-1118. Huang, X., Liu, L., Zhao, J., Zhang, J., & Cai, Z. (2019). The families Ruminococcaceae, Lachnospiraceae, and Clostridiaceae are the dominant bacterial groups during reductive soil disinfestation with incorporated plant residues. Applied Soil Ecology, 135, 65-72. Hug, L. A., Baker, B. J., Anantharaman, K., Brown, C. T., Probst, A. J., Castelle, C. J., ... & Banfield, J. F. (2016). A new view of the tree of life. Nature Microbiology, 1, 1-6. Jablonski, D. (2008). Biotic interactions and macroevolution: extensions and mismatches across scales and levels. Evolution: International Journal of Organic Evolution, 62, 715-739. Jablonski, D. (2017). Approaches to macroevolution: 2. Sorting of variation, some overarching issues, and general conclusions. Evolutionary Biology, 44, 451-475. Jetz, W., Thomas, G. H., Joy, J. B., Hartmann, K., & Mooers, A. O. (2012). The global diversity of birds in space and time. Nature, 491, 444-448. Joy, J. B. (2013). Symbiosis catalyses niche expansion and diversification. Proceedings of the Royal Society B: Biological Sciences, 280, 20122820. Käfer, J., & Mousset, S. (2014). Standard sister clade comparison fails when testing derived character states. Systematic Biology, 63, 601-609. Kapli, P., Yang, Z., & Telford, M. J. (2020). Phylogenetic tree building in the genomic age. Nature Reviews Genetics, 21, 428-444. Kashinskaya, E. N., Simonov, E. P., Kabilov, M. R., Izvekova, G. I., Andree, K. B., & Solovyev, M. M. (2018). Diet and other environmental factors shape the bacterial communities of fish gut in an eutrophic lake. Journal of Applied Microbiology, 125, 1626-1641. Katoh, K., & Standley, D. M. (2013). MAFFT multiple sequence alignment software version 7: improvements in performance and usability. Molecular Biology and Evolution, 30, 772-780. Kaur, K. M., Malé, P. J. G., Spence, E., Gomez, C., & Frederickson, M. E. (2019). Using text-mined trait data to test for cooperate-and-radiate co-evolution between ants and plants. PLoS Computational Biology, 15, e1007323. 92 Kepler, T. B., Munshaw, S., Wiehe, K., Zhang, R., Yu, J. S., Woods, C. W., ... & Haynes, B. F. (2014). Reconstructing a B-cell clonal lineage. II. Mutation, selection, and affinity maturation. Frontiers in Immunology, 5, 170. Kiers, E.T., Palmer, T.M., Ives, A.R., Bruno, J.F. & Bronstein, J.L. (2010). Mutualisms in a changing world: an evolutionary perspective. Ecology Letters, 13, 1459– 1474. Kozlov, A. M., Darriba, D., Flouri, T., Morel, B., & Stamatakis, A. (2019). RAxML-NG: a fast, scalable and user-friendly tool for maximum likelihood phylogenetic inference. Bioinformatics, 35, 4453-4455. Lee, D. W., Khavrutskii, I. V., Wallqvist, A., Bavari, S., Cooper, C. L., & Chaudhury, S. (2017). BRILIA: integrated tool for high-throughput annotation and lineage tree assembly of B-cell repertoires. Frontiers in Immunology, 7, 681. Lengyel, S., Gove, A. D., Latimer, A. M., Majer, J. D., & Dunn, R. R. (2009). Ants sow the seeds of global diversification in flowering plants. PloS One, 4, e5480. Lengyel, S., Gove, A. D., Latimer, A. M., Majer, J. D., & Dunn, R. R. (2010). Convergent evolution of seed dispersal by ants, and phylogeny and biogeography in flowering plants: a global survey. Perspectives in Plant Ecology, Evolution and Systematics, 12, 43-55. Leung, T. L. F., & Poulin, R. (2008). Parasitism, commensalism, and mutualism: exploring the many shades of symbioses. Vie et Milieu/Life & Environment, 58, 107-115. Ley, R. E., Hamady, M., Lozupone, C., Turnbaugh, P. J., Ramey, R. R., Bircher, J. S., ... & Gordon, J. I. (2008). Evolution of mammals and their gut microbes. Science, 320, 1647-1651. Li, J., Ó Foighil, D., & Strong, E. E. (2016). Commensal associations and benthic habitats shape macroevolution of the bivalve clade Galeommatoidea. Proceedings of the Royal Society B: Biological Sciences, 283, 20161006. Li, S., Lefranc, M. P., Miles, J. J., Alamyar, E., Giudicelli, V., Duroux, P., ... & Gowans, E. J. (2013). IMGT/HighV QUEST paradigm for T cell receptor IMGT clonotype diversity and next generation repertoire immunoprofiling. Nature Communications, 4, 1-13. Liao, H. X., Lynch, R., Zhou, T., Gao, F., Alam, S. M., Boyd, S. D., ... & Haynes, B. F. (2013). Co-evolution of a broadly neutralizing HIV-1 antibody and founder virus. Nature, 496, 469-476. 93 Litsios, G., Sims, C. A., Wüest, R. O., Pearman, P. B., Zimmermann, N. E., & Salamin, N. (2012). Mutualism with sea anemones triggered the adaptive radiation of clownfishes. BMC Evolutionary Biology, 12, 1-15. Lorion, J., Kiel, S., Faure, B., Kawato, M., Ho, S. Y., Marshall, B., ... & Fujiwara, Y. (2013). Adaptive radiation of chemosymbiotic deep-sea mussels. Proceedings of the Royal Society B: Biological Sciences, 280, 20131243. Losos, J. B., & Mahler, D. L. (2010). Adaptive radiation: the interaction of ecological opportunity, adaptation, and speciation. In M.A. Bell, D.J. Futuyma, W.F. Eanes, & J.S. Levinton (Eds.), Evolution Since Darwin: The First 150 Years, (pp. 381-420). Sunderland, MA: Sinauer Associates. Losos, J. B., & Ricklefs, R. E. (2009). Adaptation and diversification on islands. Nature, 457, 830-836. Louca, S., & Doebeli, M. (2018). Efficient comparative phylogenetics on large trees. Bioinformatics, 34, 1053-1055. Louca, S., Mazel, F., Doebeli, M., & Parfrey, L. W. (2019). A census-based estimate of Earth's bacterial and archaeal diversity. PLoS Biology, 17, e3000106. Louca, S., & Pennell, M. W. (2020). Extant timetrees are consistent with a myriad of diversification histories. Nature, 580, 502-505. Louca, S., & Pennell, M. W. (2021). Why extinction estimates from extant phylogenies are so often zero. Current Biology, 31, 3168-3173. Louca, S., Rubin, I. N., Madilao, L. L., Bohlmann, J., Doebeli, M., & Wegener Parfrey, L. (2020). Effects of forced taxonomic transitions on metabolic composition and function in microbial microcosms. Environmental Microbiology Reports, 12, 514-524. Maddison, W. P., & FitzJohn, R. G. (2015). The unsolved challenge to phylogenetic correlation tests for categorical characters. Systematic Biology, 64, 127-136. Maddison, W. P., Midford, P. E., & Otto, S. P. (2007). Estimating a binary character's effect on speciation and extinction. Systematic Biology, 56, 701-710. Maechler, M., & Ringach, D. (2013). diptest: Hartigan’s dip test statistic for unimodality corrected code. https://cran.r-project.org/web/packages/diptest/index.html 94 Maherali, H., Oberle, B., Stevens, P. F., Cornwell, W. K., & McGlinn, D. J. (2016). Mutualism persistence and abandonment during the evolution of the mycorrhizal symbiosis. The American Naturalist, 188, E113-E125. Maliet, O., Loeuille, N., & Morlon, H. (2020). An individual‐based model for the eco‐evolutionary emergence of bipartite interaction networks. Ecology Letters, 23, 1623-1634. Marazzi, B., & Sanderson, M. J. (2010). Large‐scale patterns of diversification in the widespread legume genus Senna and the evolutionary role of extrafloral nectaries. Evolution: International Journal of Organic Evolution, 64, 3570-3592. Mascola, J. R., & Haynes, B. F. (2013). HIV‐1 neutralizing antibodies: understanding nature's pathways. Immunological Reviews, 254, 225-244. Mazel, F., Davis, K. M., Loudon, A., Kwong, W. K., Groussin, M., & Parfrey, L. W. (2018). Is host filtering the main driver of phylosymbiosis across the tree of life?. mSystems, 3, e00097-18. McBride, M. J. (2014). The family Flavobacteriaceae. The Prokaryotes, 4, 643-676. McFall-Ngai, M., Hadfield, M. G., Bosch, T. C., Carey, H. V., Domazet-Lošo, T., Douglas, A. E., ... & Wernegreen, J. J. (2013). Animals in a bacterial world, a new imperative for the life sciences. Proceedings of the National Academy of Sciences, 110, 3229-3236. Meehan, C. J., & Beiko, R. G. (2014). A phylogenomic view of ecological specialization in the Lachnospiraceae, a family of digestive tract-associated bacteria. Genome Biology and Evolution, 6, 703-713. Meseguer, A. S., Carrillo, R., Graham, S. W., & Sanmartín, I. (2022). Macroevolutionary dynamics in the transition of angiosperms to aquatic environments. New Phytologist, 235, 344-355. Mesin, L., Ersching, J., & Victora, G. D. (2016). Germinal center B cell dynamics. Immunity, 45, 471-482. Meyer-Hermann, M. E., Maini, P. K., & Iber, D. (2006). An analysis of B cell selection mechanisms in germinal centers. Mathematical Medicine and Biology: A Journal of the IMA, 23, 255-277. 95 Mittelbach, G. G., Schemske, D. W., Cornell, H. V., Allen, A. P., Brown, J. M., Bush, M. B., ... & Turelli, M. (2007). Evolution and the latitudinal diversity gradient: speciation, extinction and biogeography. Ecology Letters, 10, 315-331. Mitter, C., Farrell, B., & Wiegmann, B. (1988). The phylogenetic study of adaptive zones: has phytophagy promoted insect diversification?. The American Naturalist, 132, 107-128. Moeller, A. H., Caro-Quintero, A., Mjungu, D., Georgiev, A. V., Lonsdorf, E. V., Muller, M. N., ... & Ochman, H. (2016). Cospeciation of gut microbiota with hominids. Science, 353, 380-382. Morlon, H. (2014). Phylogenetic approaches for studying diversification. Ecology Letters, 17, 508-525. Muratore, M., Sun, Y., & Prather, C. (2020). Environmental nutrients alter bacterial and fungal gut microbiomes in the common meadow katydid, Orchelimum vulgare. Frontiers in Microbiology, 11, 2644. Mushegian, A. A., & Ebert, D. (2015). Rethinking “mutualism” in diverse host‐symbiont communities. Bioessays, 38, 100-108. Nelsen, M. P., Ree, R. H., & Moreau, C. S. (2018). Ant–plant interactions evolved through increasing interdependence. Proceedings of the National Academy of Sciences, 115, 12253-12258. Nicholson, J. K., Holmes, E., Kinross, J., Burcelin, R., Gibson, G., Jia, W., & Pettersson, S. (2012). Host-gut microbiota metabolic interactions. Science, 336, 1262-1267. Novotny, V., Drozd, P., Miller, S. E., Kulfan, M., Janda, M., Basset, Y., & Weiblen, G. D. (2006). Why are there so many species of herbivorous insects in tropical rainforests?. Science, 313, 1115-1118. Oksanen, J., Blanchet, F. G., Kindt, R., Legendre, P., Minchin, P. R., O’hara, R. B., ... & Oksanen, M. J. (2013). Package ‘vegan’. Community Ecology Package. https://cran.r-project.org/web/packages/vegan/index.html Otero, A., Jiménez‐Mejías, P., Valcárcel, V., & Vargas, P. (2019). Being in the right place at the right time? Parallel diversification bursts favored by the persistence of ancient epizoochorous traits and hidden factors in Cynoglossoideae. American Journal of Botany, 106, 438-452. 96 Paradis, E., & Schliep, K. (2019). ape 5.0: an environment for modern phylogenetics and evolutionary analyses in R. Bioinformatics, 35, 526-528. Parks, D. H., Chuvochina, M., Chaumeil, P. A., Rinke, C., Mussig, A. J., & Hugenholtz, P. (2020). A complete domain-to-species taxonomy for Bacteria and Archaea. Nature Biotechnology, 38, 1079-1086. Parks, D. H., Chuvochina, M., Rinke, C., Mussig, A. J., Chaumeil, P. A., & Hugenholtz, P. (2022). GTDB: an ongoing census of bacterial and archaeal diversity through a phylogenetically consistent, rank normalized and complete genome-based taxonomy. Nucleic Acids Research, 50, D785-D794. Parks, D. H., Chuvochina, M., Waite, D. W., Rinke, C., Skarshewski, A., Chaumeil, P. A., & Hugenholtz, P. (2018). A standardized bacterial taxonomy based on genome phylogeny substantially revises the tree of life. Nature Biotechnology, 36, 996-1004. Pons, J., Barraclough, T. G., Gomez-Zurita, J., Cardoso, A., Duran, D. P., Hazell, S., ... & Vogler, A. P. (2006). Sequence-based species delimitation for the DNA taxonomy of undescribed insects. Systematic Biology, 55, 595-609. Price, T. D., Hooper, D. M., Buchanan, C. D., Johansson, U. S., Tietze, D. T., Alström, P., ... & Mohan, D. (2014). Niche filling slows the diversification of Himalayan songbirds. Nature, 509, 222-225. Quast, C., Pruesse, E., Yilmaz, P., Gerken, J., Schweer, T., Yarza, P., ... & Glöckner, F. O. (2012). The SILVA ribosomal RNA gene database project: improved data processing and web-based tools. Nucleic Acids Research, 41, D590-D596. R Core Team. (2017). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.r-project.org Rabosky, D. L. (2009). Ecological limits and diversification rate: alternative paradigms to explain the variation in species richness among clades and regions. Ecology Letters, 12, 735-743. Rabosky, D. L., & Goldberg, E. E. (2015). Model inadequacy and mistaken inferences of trait-dependent speciation. Systematic Biology, 64, 340-355. Raimundo, R. L., Gibert, J. P., Hembry, D. H., & Guimaraes Jr, P. R. (2014). Conflicting selection in the course of adaptive diversification: the interplay between mutualism and intraspecific competition. The American Naturalist, 183, 363-375. 97 Ralph, D. K., & Matsen IV, F. A. (2016). Likelihood-based inference of B cell clonal families. PLoS Computational Biology, 12, e1005086. Ranker, T. A., & Sundue, M. A. (2015). Why are there so few species of ferns?. Trends in Plant Science, 20, 402-403. Ricklefs, R. E. (2007). Estimating diversification rates from phylogenetic information. Trends in Ecology & Evolution, 22(, 601-610. Rinke, C., Chuvochina, M., Mussig, A. J., Chaumeil, P. A., Davín, A. A., Waite, D. W., ... & Hugenholtz, P. (2021). A standardized archaeal taxonomy for the Genome Taxonomy Database. Nature Microbiology, 6, 946-959. Rojas, D., Vale, A., Ferrero, V., & Navarro, L. (2012). The role of frugivory in the diversification of bats in the Neotropics. Journal of Biogeography, 39, 1948-1960. Rojas, D., Warsi, O. M., & Dávalos, L. M. (2016). Bats (Chiroptera: Noctilionoidea) challenge a recent origin of extant neotropical diversity. Systematic Biology, 65, 432-448. Rønsted, N., Weiblen, G. D., Cook, J. M., Salamin, N., Machado, C. A., & Savolainen, V. (2005). 60 million years of co-divergence in the fig–wasp symbiosis. Proceedings of the Royal Society B: Biological Sciences, 272, 2593-2599. Rosenfeld, A. M., Meng, W., Luning Prak, E. T., & Hershberg, U. (2018). ImmuneDB, a novel tool for the analysis, storage, and dissemination of immune repertoire sequencing data. Frontiers in Immunology, 9, 2107. Ross, A., Müller, K. M., Weese, J. S., & Neufeld, J. D. (2018). Comprehensive skin microbiome analysis reveals the uniqueness of human skin and evidence for phylosymbiosis within the class Mammalia. Proceedings of the National Academy of Sciences, 115, E5786-E5795. Sachs, J. L., & Simms, E. L. (2006). Pathways to mutualism breakdown. Trends in Ecology & Evolution, 21, 585-592. Sachs, J. L., Skophammer, R. G., Bansal, N., & Stajich, J. E. (2014). Evolutionary origins and diversification of proteobacterial mutualists. Proceedings of the Royal Society B: Biological Sciences, 281, 20132146. Sachs, J. L., Skophammer, R. G., & Regus, J. U. (2011). Evolutionary transitions in bacterial symbiosis. Proceedings of the National Academy of Sciences of the United States of America, 108, 10800-10807. 98 Schluter, D. (2000). Ecological character displacement in adaptive radiation. The American Naturalist, 156, S4-S16. Schweizer, M., Güntert, M., Seehausen, O., Leuenberger, C., & Hertwig, S. T. (2014). Parallel adaptations to nectarivory in parrots, key innovations and the diversification of the L oriinae. Ecology and Evolution, 4, 2867-2883. Scott, J. E. (2018). Reevaluating cases of trait‐dependent diversification in primates. American Journal of Physical Anthropology, 167, 244-256. Scrucca, L., Fop, M., Murphy, T. B., & Raftery, A. E. (2016). mclust 5: clustering, classification and density estimation using Gaussian finite mixture models. The R Journal, 8, 289. Seedorf, H., Griffin, N. W., Ridaura, V. K., Reyes, A., Cheng, J., Rey, F. E., ... & Gordon, J. I. (2014). Bacteria from diverse habitats colonize and compete in the mouse gut. Cell, 159, 253-266. Şekercioğlu, Ç. H., Daily, G. C., & Ehrlich, P. R. (2004). Ecosystem consequences of bird declines. Proceedings of the National Academy of Sciences, 101, 18042-18047. Simonich, C. A., Doepker, L., Ralph, D., Williams, J. A., Dhar, A., Yaffe, Z., ... & Overbaugh, J. (2019). Kappa chain maturation helps drive rapid development of an infant HIV-1 broadly neutralizing antibody lineage. Nature Communications, 10, 1-12. Simpson, G. G. (1945). Tempo and mode in evolution. Transactions of the New York Academy of Sciences, 8, 45–60. Slowinski, J. B., & Guyer, C. (1993). Testing whether certain traits have caused amplified diversification: an improved method based on a model of random speciation and extinction. The American Naturalist, 142, 1019-1024. Smith, C. I., Pellmyr, O., Althoff, D. M., Balcazar-Lara, M., Leebens-Mack, J., & Segraves, K. A. (2008). Pattern and timing of diversification in Yucca (Agavaceae): specialized pollination does not escalate rates of diversification. Proceedings of the Royal Society B: Biological Sciences, 275, 249-258. Sommer, F., & Bäckhed, F. (2013). The gut microbiota—masters of host development and physiology. Nature Reviews Microbiology, 11, 227. Springer, M. S., Meredith, R. W., Gatesy, J., Emerling, C. A., Park, J., Rabosky, D. L., ... & Murphy, W. J. (2012). Macroevolutionary dynamics and historical biogeography of primate diversification inferred from a species supermatrix. PloS One, 7, e49521. 99 Stamatakis, A. (2014). RAxML version 8: a tool for phylogenetic analysis and post-analysis of large phylogenies. Bioinformatics, 30, 1312-1313. Su, W., Harfoot, R., Su, Y. C., DeBeauchamp, J., Joseph, U., Jayakumar, J., ... & Yen, H. L. (2021). Ancestral sequence reconstruction pinpoints adaptations that enable avian influenza virus transmission in pigs. Nature Microbiology, 6, 1455-1465. Taberlet, P., Bonin, A., Zinger, L., & Coissac, E. (2018). Environmental DNA: For biodiversity Research and Monitoring. Oxford, UK: Oxford University Press. Thompson, J. N. (1989). Concepts of coevolution. Trends in Ecology & Evolution, 4, 179-183. Thompson, L. R., Sanders, J. G., McDonald, D., Amir, A., Ladau, J., Locey, K. J., ... & Navas-Molina, J. A. (2017). A communal catalogue reveals Earth’s multiscale microbial diversity. Nature, 551, 457. Vamosi, J. C., & Vamosi, S. M. (2005a). Present day risk of extinction may exacerbate the lower species richness of dioecious clades. Diversity and Distributions, 11, 25-32. Vamosi, S. M., & Vamosi, J. C. (2005b). Endless tests: guidelines for analysing non-nested sister-group comparisons. Evolutionary Ecology Research, 7, 567-579. Vermeij, G. J. (1978). Biogeography and Adaptation: Patterns of Marine Life. Cambridge, MA: Harvard University Press. Weber, M. G., & Agrawal, A. A. (2014). Defense mutualisms enhance plant diversification. Proceedings of the National Academy of Sciences, 111, 16442-16447. Weber, M. G., Clement, W. L., Donoghue, M. J., & Agrawal, A. A. (2012). Phylogenetic and experimental tests of interactions among mutualistic plant defense traits in Viburnum (Adoxaceae). The American Naturalist, 180, 450-463. Weiblen, G. D., & Treiber, E. L. (2015). Evolutionary origins and diversification of mutualism. In J.L. Bronsetin (Ed.), Mutualism, (pp 37-56). Oxford, UK: Oxford University Press. Weinstein, S. B., & Kuris, A. M. (2016). Independent origins of parasitism in Animalia. Biology Letters, 12, 20160324. Werner, G. D., Cornelissen, J. H., Cornwell, W. K., Soudzilovskaia, N. A., Kattge, J., West, S. A., & Kiers, E. T. (2018). Symbiont switching and alternative resource acquisition strategies drive mutualism breakdown. Proceedings of the National Academy of Sciences, 115(20), 5229-5234. 100 Werner, G. D., Cornwell, W. K., Sprent, J. I., Kattge, J., & Kiers, E. T. (2014). A single evolutionary innovation drives the deep evolution of symbiotic N2-fixation in angiosperms. Nature Communications, 5(1), 1-9. Whitman, W. B., Rainey, F., Kämpfer, P., Trujillo, M., Chun, J., DeVos, P., ... & Nedashkovskaya, O. I. (2016). Bergey's manual of systematics of Archaea and Bacteria. Hoboken, NJ: John Wiley & Sons. Wolf, M., Müller, T., Dandekar, T., & Pollack, J. D. (2004). Phylogeny of Firmicutes with special reference to Mycoplasma (Mollicutes) as inferred from phosphoglycerate kinase amino acid sequence data. International Journal of Systematic and Evolutionary Microbiology, 54, 871-875. Yilmaz, P., Parfrey, L. W., Yarza, P., Gerken, J., Pruesse, E., Quast, C., ... & Glöckner, F. O. (2014). The SILVA and “all-species living tree project (LTP)” taxonomic frameworks. Nucleic Acids Research, 42, D643-D648. Yoder, J. B., & Nuismer, S. L. (2010). When does coevolution promote diversification?. The American Naturalist, 176, 802-817. Zanne, A. E., Tank, D. C., Cornwell, W. K., Eastman, J. M., Smith, S. A., FitzJohn, R. G., ... & Beaulieu, J. M. (2014). Three keys to the radiation of angiosperms into freezing environments. Nature, 506, 89-92. Zenil-Ferguson, R., McEntee, J. P., Burleigh, J. G., & Duckworth, R. A. (2021). The evolution of nest site specialization and its macroevolutionary consequences in passerine Birds. bioRxiv. https://doi.org/10.1101/2021.08.24.457563 Zhang, C., Bzikadze, A. V., Safonova, Y., & Mirarab, S. (2020). Scalable models of antibody evolution and benchmarking of clonal tree reconstruction methods. bioRxiv. https://doi.org/10.1101/2020.09.17.302505 101 Appendices Appendix A Supplementary Information Chapter 3 A.1 Supplementary Methods Rarefaction of the data followed by trait assignment To evaluate the robustness of our results to the great variability of sampling depth found across samples, we re-run our analysis with an added step of rarefying the data. The data was rarefied to 5,000 reads using the R package vegan (Oksanen et al., 2013) prior to converting the read and sample counts to a percentage threshold. Only half of the rarefied data set was randomly sampled (50% of the total ASVs) and included in the tree that was pruned using the strict and non-strict algorithms. 50% of the data set was used due to memory constraints; the full data set failed to run with 515GB memory on 32 cores. Rarefaction of the data only Smaller sets of samples were also rarefied; either 100 samples were randomly selected or 50 samples each of free-living and gut-associated samples were selected (from a total of 24,259 samples) and then rarefied to 1,000 reads using the R package vegan (Oksanen et al., 2013). This was repeated a total of 20 times (10 times each for a random and equal number of samples). After the samples were rarefied, the trait information was not re-assigned; the original trait assignments were used only for the ASVs present in the 100 samples. A.2 Supplementary Results Contrast Results Comparison 1: Gut vs Free-Living Samples 102 There were 139,639 tips in the original tree size for the samples gut vs free-living data with 2,973 trait transitions. After pruning with the strict and non-strict algorithms there were 2,160 and 926 sister contrasts respectively (Table 3.1). In both the strict and non-strict pruning methods the free-living sister groups were on average significantly larger than their gut-associated sister clades (Wilcoxon signed-rank test p = 3.27 x 10-12 strict and p = 0.0125 non-strict and resampling p = 0 for both). Comparison 1: Gut vs Free-Living Reads 142,569 tips in the original tree for reads data included 3,653 trait transitions and 2,605 contrasts under the strict and 1,145 contrasts under the non-strict pruning methods. Similar to the sample results, both the strict and non-strict pruning methods show that there were more contrasts in which free-living groups were larger than their gut-associated sister groups but this difference was only significantly for the strict method (Wilcoxon signed-rank test p = 2.16 x 10-12 strict and p = 0.0917 non-strict and resampling p = 0 for both) (Table 3.1). Comparison 2: Gut vs Surface Samples The tree used for samples data was 50,912 tips with 4,120 transitions. There were a total of 2,822 contrasts with strict pruning and 1,400 contrast with non-strict pruning which both showed that the gut-associated sister clades were larger than surface-associated sister clades (Wilcoxon signed-rank test p = 1.37 x 10-5 strict and p = 1.13 x 10-8 non-strict and resampling p = 0 for both). Comparison 2: Gut vs Surface Reads For reads the pruning ran on a tree of 53,334 tips and 4,597 transitions, which was summarized with 3,137 and 1,543 contrasts for strict and non-strict methods respectively. As with the samples results, the reads data showed that gut clades were significantly larger than surface 103 clades (Wilcoxon signed-rank test p = 1.14 x 10-6 strict and p = 5.74 x 10-10 non-strict and resampling p = 0 for both). Comparison 3: Animal-Associated vs Free-Living Samples The original tree size prior to pruning was 127,915 tips, and there were 3,515 trait transitions. The strict pruning method showed there were 2,569 sister contrasts whereas the non-strict method resulted in 936 contrasts. Both the strict and non-strict pruning methods showed that free-living sister groups were significantly larger than animal-associated groups for the Wilcoxon signed-rank test (p = 2.20 x 10-16 strict and p = 0.0127 non-strict) but only the non-strict method was significant under the and resampling method (p = 0.0756 strict p = 0 non-strict). Comparison 3: Animal-Associated vs Free-Living Reads The tree for reads data was 132,875 tips with 4,579 transitions and 3,301 sister contrasts with the strict method and 1,421 contrasts with the non-strict method. Both the strict and non-strict pruning methods showed that free-living groups were significantly larger than their animal-associated sister groups for the Wilcoxon signed-rank test and the resampling method (Wilcoxon signed-rank test p =2.20 x 10-16 strict and p = 0.0271 non-strict and resampling p = 0.0244 strict and p = 0 non-strict) Rarefied Results Rarefaction of the data followed by trait assignment: Gut vs Free-Living (Samples) Though the full tree was not analyzed due to the 50% random sampling of ASVs, the analyzed tree was 72,889 tips which included 1,493 contrasts under the strict method and 529 under the non-strict method. Both the strict and non-strict pruning methods showed that free-living groups 104 were still larger than their gut sister groups with the rarefied trait information (Wilcoxon signed-rank test p = 2.52 x 10-11 strict and p = 0.0128 non-strict). Rarefaction of the data followed by trait assignment: Gut vs Free-Living (Reads) The analyzed tree was 74,945 tips due to the 50% sampling and 1,797 and 657 contrasts under the strict and non-strict methods respectively. Similar to the rarefied samples data, the results for rarefied reads also suggest that free-living groups are larger than their gut-associated sister clades (Wilcoxon signed-rank test p = 4.00 x 10-16 strict and p = 0.0521 non-strict). Rarefaction of the data and original trait assignment: Gut vs Free-Living (Samples) In 4 of 10 tests where 100 samples were randomly selected, there is no detected difference in sister group sizes by the Wilcoxon signed-rank test. The remaining 6 tests show that free-living clades are significantly larger than their gut-associated sister groups (Table S3.1). In 2 of 10 tests where 50 samples are selected each for free-living and gut-associated habitats, there is no detected difference in sister clade sizes. The other 8 tests show that free-living groups are significantly larger than their sister groups by the Wilcoxon signed-rank test (Table S3.1). 105 A.3 Supplementary Tables and Figures Table S3.1. Summary of sister contrast analysis for rarefied samples when selecting either 100 random samples or 50 samples each of free-living and gut associated groups. Samples were rarefied to a sampling depth of 1,000 reads. Gut-associated Samples Free-living Samples Total ASVs Pruned ASVs P-value Contrasts in Test Contrasts Tied Total Contrasts Equal 50 50 7,765 1,186 0.0072 73 88 161 8,424 1,258 0.000124 82 97 179 8,719 1,366 0.397 99 87 186 8,908 1,301 0.006761 89 89 178 9,190 1,382 0.005555 78 105 183 9,300 1,469 0.000636 89 110 199 9,331 1,401 0.0005938 88 101 189 9,359 1,370 0.06709 82 103 185 9,548 1,558 0.002146 85 119 204 9,724 1,395 0.005918 92 106 198 Random 43 57 7,535 1,213 7.44 x 10-5 68 32 100 45 55 7,844 917 0.06206 54 70 124 46 54 8,103 1,080 0.008596 67 74 141 48 52 8,216 1,075 0.0004833 65 75 140 45 55 8,592 1,053 0.01295 60 76 136 60 40 8,816 1,322 0.06744 86 98 184 39 61 9,124 1,364 0.05411 89 96 185 48 52 9,281 1,394 5.12 x 10-5 88 96 184 48 52 9,388 1,132 0.05995 70 82 152 47 53 9,550 1,375 0.001666 98 98 196 106 Figure S3.1. Example table of metadata, and conversion of samples and reads information into binary traits. Figure S3.2. Trait cut offs are shown for how many taxa are free-living (green bars) or animal-associated (purple bars), with mixed traits between 11-89% (grey bars) removed from the data sets. 107 Figure S3.3. The proportion of gut-associated taxa per phylum for the gut vs free-living comparison for samples (strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 108 Figure S3.4. The proportion of gut-associated taxa per phylum for the gut vs free-living comparison for samples (non-strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 109 Figure S3.5. The proportion of gut-associated taxa per phylum for the gut vs free-living comparison for reads (strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 110 Figure S3.6. The proportion of gut-associated taxa per phylum for the gut vs free-living comparison for reads (non-strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 111 Figure S3.7. The proportion of gut-associated taxa per phylum for the gut vs surface comparison for samples (strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 112 Figure S3.8. The proportion of gut-associated taxa per phylum for the gut vs surface comparison for samples (non-strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 113 Figure S3.9. The proportion of gut-associated taxa per phylum for the gut vs surface comparison for reads (strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 114 Figure S3.10. The proportion of gut-associated taxa per phylum for the gut vs surface comparison for reads (non-strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 115 Figure S3.11. The proportion of animal-associated taxa per phylum for the animal-associated vs free-living for samples (strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 0.000.250.500.75TenericutesFirmicutesSynergistetesFusobacteriaLentisphaeraeno_agreementBacteroidetesCD12Spirochaetes FBPTM7ActinobacteriaCyanobacteriaBRC1ProteobacteriaGN02FibrobacteresVerrucomicrobiaGOUTA4ElusimicrobiaArmatimonadetesChlorobiOD1PlanctomycetesChloroflexiChlamydiaeSAR406AcidobacteriaTM6GN04OP11 OP3CaldisericaCaldithrixFCPU426GAL15H−178Hyd24−12LCP−89MVP−21MVS−104NKB19NPL−UPA2 OP1OP8Thermotogae WS1WS5WWE1PhylumProportion of Animal Associated Taxa 116 Figure S3.12. The proportion of animal-associated taxa per phylum for the animal-associated vs free-living comparison for samples (non-strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 117 Figure S3.13. The proportion of animal-associated taxa per phylum for the animal-associated vs free-living comparison for reads (strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 118 Figure S3.14. The proportion of animal-associated taxa per phylum for the animal-associated vs free-living comparison for reads (non-strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 119 Figure S3.15. The number of transitions per phylum for the gut vs free-living comparison for samples. 120 Figure S3.16. The number of transitions per phylum for the gut vs free-living comparison for reads. 121 Figure S3.17. The number of transitions per phylum for the gut vs surface comparison for samples. 122 Figure S3.18. The number of transitions per phylum for the gut vs surface comparison for reads. 123 Figure S3.19. The number of transitions per phylum for the animal-associated vs free-living comparison for samples. 124 Figure S3.20. The number of transitions per phylum for the animal vs free-living comparison for reads. 125 GutGutGutFree-livingFree-livingFree-livingASV habitat distributionMixedPredicted ASV habitatSister cladechoiceSister cladeFeaturesASVphylogenySister cladesGut cladeFL cladeGut cladeSister comparison cladeFLcladenASV = 3Taxonomy = ChitinophagaceaePrevalence: mean (ngut) = 6ngut = 9%gut= 9/10ngut = 3%gut= 1ngut = 6%gut=1nFL = 9%FL= 9/10nFL = 5%FL= 1ASV taxonomyEMP sampleChitinophagaceaenASV = 2Taxonomy = ChitinophagaceaePrevalence: mean (nFL) = 7(1) ASV habitat distribution --> 90% rule --> Predicted ASV habitat(2) ASV phylogeny + Predicted ASV habitat --> Sister Clade choice (strict or non strict rule)(3) Sister Clade choice + ASV Taxonomy/ASV habitat distribution --> Sister clade featuresToy example for one sister clade No sister contrastASVs are removedExcluded from contrastsChitinophagaceaeChitinophagaceaeChitinophagaceaeChitinophagaceae Figure S3.21. Visual representation of how samples/reads prevalence in the EMP defines trait assignments and clades based on habitat distribution. Habitat distributions are used for trait assignments to find sister clades. Sister clade features and taxonomy for each sister pair are given in Supplementary Materials 3.1-3.12. GutGutGutFree-livingFree-livingFree-livingASV habitat distributionMixedPredicted ASV habitatSister cladechoiceSister cladeFeaturesASVphylogenySister cladesGut cladeFL cladeGut cladeSister comparison cladeFLcladenASV = 3Taxonomy = ChitinophagaceaePrevalence: mean (ngut) = 6ngut = 9%gut= 9/10ngut = 3%gut= 1ngut = 6%gut=1nFL = 9%FL= 9/10nFL = 5%FL= 1ASV taxonomyEMP sampleChitinophagaceaenASV = 2Taxonomy = ChitinophagaceaePrevalence: mean (nFL) = 7(1) ASV habitat distribution --> 90% rule --> Predicted ASV habitat(2) ASV phylogeny + Predicted ASV habitat --> Sister Clade cho ce (strict or n strict rule)(3) Sister Clade choice + ASV Taxonomy/ASV habitat distribution --> Sister cl de featureToy example for one sister clade No sister contrastASVs are removedExcluded from contrastsChitinophagaceaeChitinophagaceaeChitinophagaceaeChitinophagaceae= amplicon sequence variant 126 Figure S3.22. The x axis shows the p-value from the signed-rank sister contrast test and the y axis is the p-value from the resampled sister contrast test from Käfer & Mousset (2014) for sister contrasts from 1,000 simulated data sets on a 1,000 tip phylogeny. Panel (A) allows for trait transitions between a binary trait at a rate of 0.1 and panel (B) does not allow for trait reversions to the ancestral state once a derived trait has evolved. 127 Figure S3.23. The number of contrasts per phylum for the gut vs free-living comparison for samples (strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 128 Figure S3.24. The number of contrasts per phylum for the gut vs free-living comparison for samples (non-strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 129 Figure S3.25. The number of contrasts per phylum for the gut vs free-living comparison for reads (strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 130 Figure S3.26. The number of contrasts per phylum for the gut vs free-living comparison for reads (non-strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 131 Figure S3.27. The number of contrasts per phylum for the gut vs surface comparison for samples (strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 132 Figure S3.28. The number of contrasts per phylum for the gut vs surface comparison for samples (non-strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 133 Figure S3.29. The number of contrasts per phylum for the gut vs surface comparison for reads (strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 134 Figure S3.30. The number of contrasts per phylum for the gut vs surface comparison for reads (non-strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 135 Figure S3.31. The number of contrasts per phylum for the animal vs free-living comparison for samples (strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. [binary] of Contrasts 136 Figure S3.32. The number of contrasts per phylum for the animal vs free-living comparison for samples (non-strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. [binary] of Contrasts 137 Figure S3.33. The number of contrasts per phylum for the animal vs free-living comparison for reads (strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. [binary] of Contrasts 138 Figure S3.34. The number of contrasts per phylum for the animal vs free-living comparison for reads (non-strict method). A clade was assigned a phylum if at least 90% of the ASVs in the clade belonged to the same phylum. 0200400ProteobacteriaBacteroidetesFirmicutesActinobacteriaVerrucomicrobiaCyanobacteriaPlanctomycetesChloroflexiAcidobacteriaFusobacteriaArmatimonadetesTenericutesSpirochaetes FBPGN02FibrobacteresLentisphaerae TM7OD1TM6BRC1ChlamydiaeChlorobiElusimicrobiaSynergistetesPhylumNumber of Contrasts 139 Appendix B Supplementary Information Chapter 4 B.1 Supplementary Figures Figure S4.1. Schematic of the tree-building and ancestral sequence reconstruction process for the original families and for reshuffled families. 140 Figure S4.2. Distribution of the number of clades on the mega-trees across the four parameter directories. The orange bar shows the number of mega-trees that have five clades where each clade is one of the five families simulated in partis. In total, there are 170 mega-trees across the four parameter directories that have 5 clades.
Thesis/Dissertation
eng
Zoology
Vancouver : University of British Columbia Library
Attribution-NonCommercial-NoDerivatives 4.0 International
Graduate
Pennell, Matthew
Using phylogenetic data to investigate how interspecific interactions affect diversification dynamics
Text
Dataset