Abstract
B cells are a critical component of the adaptive immune system, responsible for producing antibodies that help protect the body from infections and foreign substances. Single cell RNA-sequencing (scRNA-seq) has allowed for both profiling of B cell receptor (BCR) sequences and gene expression. However, understanding the adaptive and evolutionary mechanisms of B cells in response to specific stimuli remains a significant challenge in the field of immunology. We introduce a new method, TRIBAL, which aims to infer the evolutionary history of clonally related B cells from scRNA-seq data. The key insight of TRIBAL is that inclusion of isotype data into the B cell lineage inference problem is valuable for reducing phylogenetic uncertainty that arises when only considering the receptor sequences. Consequently, the TRIBAL inferred B cell lineage trees jointly capture the somatic mutations introduced to the B cell receptor during affinity maturation and isotype transitions during class switch recombination. In addition, TRIBAL infers isotype transition probabilities that are valuable for gaining insight into the dynamics of class switching. Via in silico experiments, we demonstrate that TRIBAL infers isotype transition probabilities with the ability to distinguish between direct versus sequential switching in a B cell population. This results in more accurate B cell lineage trees and corresponding ancestral sequence and class switch reconstruction compared to competing methods. Using real-world scRNA-seq datasets, we show that TRIBAL recapitulates expected biological trends in a model affinity maturation system. Furthermore, the B cell lineage trees inferred by TRIBAL were equally plausible for the BCR sequences as those inferred by competing methods but yielded lower entropic partitions for the isotypes of the sequenced B cell. Thus, our method holds the potential to further advance our understanding of vaccine responses, disease progression, and the identification of therapeutic antibodies.
Introduction
Reconstructing the evolutionary trajectory of B cells during an immune response is a complex challenge. During affinity maturation, B cells undergo two primary processes: Somatic Hypermutation (SHM), which introduces mutations into the variable region of the B cell receptor (BCR) to increase antigen affinity, and Class Switch Recombination (CSR), which changes the constant region (isotype) to alter the antibody's effector function.
Traditional phylogenetic methods rely solely on BCR sequences, which are often short and sparsely mutated, leading to significant phylogenetic uncertainty. This uncertainty frequently manifests as "polytomies"—unresolved nodes where a single ancestor appears to give rise to many descendants simultaneously. TRIBAL (Tree Inference of B cell Clonal Lineages) addresses this by leveraging the irreversible nature of CSR. Because CSR involves the genomic deletion of constant region genes, it acts as a biological "one-way street," providing a powerful constraint for resolving evolutionary branching events.
Methods
TRIBAL utilizes a two-stage lexicographical optimization approach to jointly analyze BCR sequences and isotype data. The pipeline begins with standard preprocessing of scRNA-seq data, including BCR assembly, isotype calling, and multiple sequence alignment.
The core algorithm operates in two main phases:
- Maximum Parsimony Forest Generation: TRIBAL first identifies a set of candidate trees that minimize the total number of somatic mutations (SHM).
- Isotype-Based Refinement: These trees are then refined to maximize the likelihood of the observed isotype transitions. This step is formulated as a Mixed-Integer Linear Programming (MILP) problem, ensuring that the resulting trees respect the biological constraints of irreversible class switching.
TRIBAL employs a coordinate ascent algorithm to simultaneously learn the isotype transition probabilities (represented by a matrix P*) and the most likely lineage trees. This allows the model to adapt to the specific switching dynamics of a given biological sample, such as distinguishing between direct and sequential switching.
Results and Discussion
The efficacy of TRIBAL was evaluated using simulated data and two real-world scRNA-seq datasets: a model affinity maturation system (NP-KLH) and an autoimmune-prone mouse model (Age-Associated B Cells).
Performance in Simulations
In in silico experiments, TRIBAL demonstrated superior accuracy in reconstructing tree topologies (measured by Robinson-Foulds distance) and ancestral sequences compared to sequence-only methods like IgPhyML. It successfully distinguished between direct and sequential switching models, providing deeper insights into the underlying immune signaling environment.
Biological Validation and Uncertainty Reduction
When applied to the NP-KLH dataset, TRIBAL significantly reduced phylogenetic uncertainty, narrowing the average number of optimal trees per B cell family from 31.5 to just 1.3. Furthermore, the inferred trees correctly placed known high-affinity mutations (e.g., W33L) closer to the root than later-stage mutations, validating the method's biological relevance. TRIBAL also produced trees with lower "isotype clade entropy," indicating more logically clustered isotype transitions within the lineage.
Conclusion
TRIBAL represents a significant advancement in B cell lineage inference by integrating isotype data as a primary evolutionary signal. By leveraging the genomic constraints of class switching, TRIBAL provides more accurate and resolved evolutionary models than traditional sequence-based approaches. While current limitations include the assumption of a single transition matrix per sample and a focus on point mutations, future work will aim to incorporate more complex mutation models and account for micro-environmental heterogeneity. TRIBAL is open-source and available for the research community to enhance our understanding of adaptive immunity and therapeutic antibody development.
Summary updated