Breaking Barriers to Incorporating Phylogenetics in Ecology
A special session at ESA 2025 providing a guide for integrating phylogenetics into ecological research
Motivations
Phylogenetics is a rapidly developing field, offering powerful tools for eco-evolutionary inference. Yet, the diversity and pace of which the field has advanced, technical requirements, and data formatting requirements have led to a steep learning curve and difficulty knowing what approaches to use, how to apply them, and how to interpret their results, especially in ecology (Cooper 2016).
Drawing on the expertise of leading developers, advanced users, and pioneers, this session explores foundational and cutting-edge phylogenetic methods in ecology, providing practical guidance for their application and inspiring new eco-evolutionary questions.
By the end of this session, participants will be familiar with suggested methods of phylogenetic analysis in ecological studies and understand when and how to apply these approaches in their own research.
For more information continue reading or check out foundational or modern applications.
Alivia Nytko is a Ph.D. candidate in the Bailey and O'Meara labs at the University of Tennessee interested in theoretical ecology, eco-evolutionary dynamics, phylogenetics, and computational biology. Her research is focused on developing new frameworks for understanding the ecology and evolution of rare speices and new theory using rarity as a tool to characterize biodiversity-ecosystem function relationships.
Cristian Román-Palacios is a biologist with expertise in phylogenetics, biostatistics, and machine learning. He has published more than 25 papers (on a range of topics, many first-authored). His research has been featured in Science news, Popular Science, CNN, USA Today, among many other news outlets. Cristian primarily studies large-scale biodiversity patterns from an Eco/Evo perspective and examines the effects of climate change on species survival. He also develops statistical tools to increase accessibility and reproducibility in evolutionary biology and the geosciences.
Speaker: Modern Approaches & Code - Jeremy Beaulieu
Jeremy Beaulieu's research is mainly focused on developing new approaches to large tree construction and new phylogenetic comparative methods to gain insights into the evolution of the large flowering plant clades (most notably, campanulid angiosperms). By combining biogeographic history with morphological character information he hopes to better understand patterns of lineage diversification and its consequences on the distribution of biodiversity.
Dr. Russo is currently an Assistant Professor at the University of Tennessee, in Knoxville, in the Ecology and Evolutionary Biology Department. Members of the Russo lab are interested broadly on the structure, management, and function of mutualistic interactions in a variety of systems, especially focusing on the biodiversity and conservation of plant-pollinator interactions. We use both empirical and theoretical methods to develop and test hypotheses on the structure of interactions in ecological communities. Within this broad scope, major themes include pollinator conservation and health, drivers and consequences of mutualistic interactions, impacts of species addition on plant-pollinator mutualisms, and experimentally manipulating network structure.
Non-independence, trait conservatism, and community phylogenetics.
All historical, foundational, and cutting-edge phylogenetic methods require a phylogeny. Historically, assembling phylogenies for specific study systems was difficult due to scattered sequence data and a lack of published trees. However, more comprehensive, programmatically accessible phylogenies are now available for many major taxonomic groups.
library(ape)
library(phytools)
clean_phylo <- function(tree, species_vector, outgroup = NULL, ultrametric_method = c("chronos", "extend")) {
ultrametric_method <- match.arg(ultrametric_method)
# 1. Root tree if not rooted
if (!is.rooted(tree)) {
if (is.null(outgroup)) {
warning("Tree is unrooted and no outgroup provided. Using midpoint rooting.")
tree <- midpoint.root(tree)
} else {
tree <- root(tree, outgroup = outgroup, resolve.root = TRUE)
message("Tree rooted using outgroup: ", outgroup)
}
} else {
message("Tree is already rooted.")
}
# 2. Force ultrametric if necessary
if (!is.ultrametric(tree)) {
message("Tree is not ultrametric. Forcing ultrametric using method: ", ultrametric_method)
if (ultrametric_method == "chronos") {
tree <- chronos(tree)
} else if (ultrametric_method == "extend") {
tree <- force.ultrametric(tree, method = "extend")
}
} else {
message("Tree is already ultrametric.")
}
# 3. Prune tree to species of choice
tips_to_drop <- setdiff(tree$tip.label, species_vector)
if (length(tips_to_drop) > 0) {
message(length(tips_to_drop), " tips not in species vector will be dropped.")
tree <- drop.tip(tree, tips_to_drop)
} else {
message("All species in species_vector are present in the tree.")
}
# 4. Check for zero-length branches and replace with small positive number
zero_branches <- which(tree$edge.length == 0)
if (length(zero_branches) > 0) {
message("Zero-length branches found: ", length(zero_branches), ". Replacing with small positive length.")
tree$edge.length[zero_branches] <- 1e-8
} else {
message("No zero-length branches found.")
}
# 5. Resolve polytomies if necessary
if (any(tree$edge[, 2] %in% which(tabulate(tree$edge[,1]) > 2))) {
message("Polytomies detected. Resolving randomly.")
tree <- multi2di(tree)
} else {
message("No polytomies detected.")
}
return(tree)
}
Phylogenetic Independent Contrasts (PIC) were first popularized by Felsenstein (1985) to account for shared evolutionary history between species restuling in trait similarities inherited from the same ancestor. Before PIC, correlations between species traits were often analyzed with simple regressions that ignored the non-independence of related species.
PIC requires a phylogeny and a model of evolutionary change, typically Brownian Motion (BM).
Brownian Motion is an evolutionary model often described as a "random walk," where species traits change incrementally with variance proportional to branch length. In PIC, BM serves as the null model, assuming trait differences are independent and equally distributed.
To remove the effect of shared ancestry, PIC calculates standardized differences (contrasts) between closely related species from the tips toward the root, scaled by expected variance under BM.
Analysis of correlations among leaf traits using raw data and independent contrasts. The incorporation of phylogenetic non-independence changes the strength and significance of these relationships, such that the apparent negative relationship between leaf size and life span is likely due to shared evolutionary history between species (Ackerly et al. 2000).
Phylogenetic Generalized Least Squares (PGLS) was first introduced by Grafen (1989) and grew from the same foundation as PIC. Instead of fitting independent contrasts manually before statistical analyses, PGLS fits the regression with raw data, but a phylogenetic covariance matrix in the error, dependent on the model of evolution being used (e.g. BM, Ornstein-Uhlenbeck (OU), etc). In short, PGLS examines the effect of one variable on another while accounting for phylogenetic relatedness.
Example of how a phylogenetic covariance matrix is generated under Brownian Motion (Lozano 2020).
Similar to Brownian Motion, OU models of evolution also represent a random or stochasic walk, but with stabilizing selection acting as a pull towards an optimal trait value. OU models generate covariances that decay with phylo phylogenetic distance depending on the strength of this pull. The model of evolution used in PGLS can significantly impact phylogenetic comparative analyses. PIC is equivalent to a PGLS using Brownian Motion, but once the stabilizing pull is >0, the methods are not equilivant.
Differences in phylogenetic covariance matricies generated under BM and OU models of trait evolution for the same phylogeny.
Phylogenetic linear regressions have become more accessible and versatile with the development of the R package phylolm, which implements Phylogenetic Generalized Linear Models capable of handling larger phylogenies and a wider range of evolutionary and response models
Designed for continuous traits; cannot be used with categorical traits.
Handles multiple predictor variables.
Does not quantify how strongly traits are conserved.
Trait Conservatism
Accounting for phylogenetic relatedness or shared evolutionary history shaping traits is different than measuring the amount of phylogenetic non-independence.
Many traits demonstrate a phylogenetic signal, such that closely related species have more similar trait values than would be expected by chance. Popular measures of phylogenetic signal include Pagel's lambda and Blomberg's K.
Pagel's lambda
modifies the phylogeny's branch lengths to test whether traits follow a BM-like pattern. When λ = 1, traits follow BM and exhibit strong phylogenetic signal (high phylogenetic conservatism).
Blomberg's K
quantifies how strongly traits are conserved relative to BM expectations. It may also be interpreted as a measure of partitioning trait variance: if K = 1 then trait variation fits BM expectations, if K > 1 then there is greater variation among clades, if K < 1 then there is greater variation within clades.
Blomberg's K often results in inflated phylogenetic signal when used with incompletely resolved phylogenies and sub-optimal branch length information
(Molina-Venegas et al. 2017)
.
Differences in methods used to classify phylogenetic signal (Münkemüller et al. 2012).
Phylogenetic singal is widely mentioned and/or used in ecology, encompassing 43.2% of publications combining ecology and phylogenetic comparative methods since 2024 (based on a Google Scholar search).
Pros
Cons
Helps identify if phylogenetically informed models are needed.
Based on BM assumptions.
Can help decide if BM fits the data.
Cannot accurately estimate evolutionary rates or processes (Revell 2008)
Does not handle categorical traits.
Community Phylogenetics
Just as traits can be more similar than expected by chance (i.e. phylogenetic signal), species in a community can also be more (clustered) or less (overdispersed) closely related than expected by chance. Webb et al. 2002 first popularized the explicit use of phylogenetics in undrestanding community assemblage and niche structure. Communities that are phylogenetically similar are thought to be shaped by environmental filtering, while competition drives phylogenetically dissimilar assemblages.
Identifying phylogenetic patterns in communities requires community occurence data, a phylogeny, and a phylogenetic covariance matrix . These data are used to inform the net relatedness index of a community which calculates the mean phylogenetic distance (MPD) between all pairs of species in a community weighted by branch lengths. The nearest taxon index is also commonly used and uses the mean phylogenetic distance of each species to its nearest neighbour within a community, but is sensitive to patterns happening at the tips of the phylogeny.
Limitations of the Standard Phylogenetic Workflow for Ecological Inference
Issues with foundational appraoches to implementing phylogenetic insights in ecology:
Differential diversification can lead to misleading patterns of trait similarity. For example, rapidly diversifying clades might appear more similar because they have many closely related species, inflating measures of phylogenetic signal (Madison 2006).
Evolutionary patterns often deviate from Brownian Motion, with different sections of the phylogeny potentially evolving under different models (Beaulieu 2013).
Evolutionary processes are often inferred from phylogenetic signal. For example, a strong phylogenetic signal is often associated with evolutionary conservatism or a strong selective regime, while a negligable phylogenetic signal is associated with evolutionary liability. However, both processes of strong stabilizing selection and divergent selection can result in low phylogenetic signal, uncorrelated with evolutionary rate (Revell et al. 2008).
Modern Applications
Rate and strength of evolutionary transitions between growth habit in Campanulid angiosperms (Beaulieu et al. 2013).
Foundational phylogenetic comparative methods such as phylogenetic signal and independent contrasts are used to assess how shared history affects continuous trait relationships. While these methods describe phylogenetic patterns in traits and community structure, they are incapable or estimating evolutionary rates and processes, both important to understanding species' adaptive capacity, extinction risk, and environmental drivers shaping trait evolution, especially for discrete characters such as pollination syndromes or growth habit.
Modern phylogenetic approaches use different models of trait evolution such as:
Brownian Motion: Models trait evolution as a random walk process where changes accumulate randomly over time, proportional to branch lengths.
Ornstein-Uhlenbeck: Models trait evolution as a random walk process under stabilizing selection, in which traits evolve toward an optimal value with some strength of pull.
Multi-Regime Models: Model trait evolution across different selective regimes or optima throughout the phylogeny, allowing different clades or branches to evolve under distinct adaptive landscapes and selective pressures.
Fitting ecological data using these approaches allows us to:
Estimate evolutionary rates
Infer selective landscapes by identifying trait optima
Ex: Slow evolutionary rates, plus strong stabilizing selection in OU models may indicate limited adaptive potential.
Reveal how shifts in a trait are connected to ecological transitions
Other applications of phylogenetics for ecological insight include models of speciation and extinction which can tell how variation in diversification affects biodiversity through space and time, and how ecological factors influence these processes (Pyron & Burbrink 2013). See other suggested ecological applications here and an example implementation here.
Workshop
Fitting Multiple Evolutionary Models to Ecological Data
Exploring how mean annual temperature has shaped variation in life form and its implications for a genus of annual vs. perennial angiosperms.
This is bold and this is strong. This is italic and this is emphasized.
This is superscript text and this is subscript text.
This is underlined and this is code: for (;;) { ... }. Finally, this is a link.
Heading Level 2
Heading Level 3
Heading Level 4
Heading Level 5
Heading Level 6
Blockquote
Fringilla nisl. Donec accumsan interdum nisi, quis tincidunt felis sagittis eget tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan faucibus. Vestibulum ante ipsum primis in faucibus lorem ipsum dolor sit amet nullam adipiscing eu felis.
Preformatted
i = 0;
while (!deck.isInOrder()) {
print 'Iteration ' + i;
deck.shuffle();
i++;
}
print 'It took ' + i + ' iterations to sort the deck.';