Decoding positive selection in Mycobacterium tuberculosis with phylogeny-guided graph attention models
- 1Department of Infection Biology, Faculty of Infectious and Tropical Diseases, London School of Hygiene & Tropical Medicine, London, WC1E 7HT UK
- 2Faculty of Epidemiology and Population Health, London School of Hygiene & Tropical Medicine, London, WC1E 7HT UK
Abstract
Motivation: Positive selection is a key evolutionary force in Mycobacterium tuberculosis, driving the emergence of adaptive mutations that influence drug resistance, transmissibility, and virulence of tuberculosis. Phylogenetic trees capture the hierarchical evolutionary relationships among isolates, making them an ideal framework for detecting such adaptive signals. Here, we present a phylogeny-guided graph attention network approach, coupled with a novel method for converting SNP-annotated phylogenetic trees into graph structures suitable for graph neural network processing.
Results: Using a dataset of 1000 M. tuberculosis isolates, representing the four main lineages, and 206 single-nucleotide variants (75 resistance-associated and 131 neutral) spanning 79 drug-resistance genes, we constructed graphs where nodes represented individual isolates and edges reflected phylogenetic distances. To reduce noise and highlight local evolutionary structure, we pruned edges between isolates separated by more than seven internal nodes. Node features were encoded as binary indicators of SNP presence or absence, and the graph attention network (GAT) architecture comprised two attention layers with a residual connection, followed by global attention pooling and a multilayer perceptron classifier. The model achieved higher accuracy (0.81, AUC 0.82) than a homoplasy-count baseline (0.71) on the held-out test set. Under repeated cross-validation, however, F1 scores did not differ significantly (0.56 vs. 0.58; paired Wilcoxon p = 0.98), reflecting a specificity-sensitivity trade-off: the GAT favoured specificity (0.89), the baseline favoured sensitivity. Applying the model to 138 WHO-classified “uncertain” variants identified 28 high-confidence candidates, including rpoC Ile491Val (rifampicin, compensatory), ubiA Arg240Cys (ethambutol), and rpsA Ala412Val (pyrazinamide). These findings demonstrate the feasibility of encoding phylogenetic trees as graph neural network-compatible structures and the utility of attention-based models for detecting positive-selection signals, supporting genomic surveillance and prioritisation of candidates for experimental validation.
Availability and Implementation: The source code for the model can be found at https://github.com/linfeng-wang/Phylogeny-Guided_GAT.
Supplementary Information: The online version contains supplementary material available at https://doi.org/10.1186/s12859-026-06583-0.
Related
- Identification and serological characterization of MtbAg1073, a conserved Mycobacterium tuberculosis complex antigen recognized in active tuberculosis
- Commentary: A proteome-wide atlas of humoral immunity to Mycobacterium tuberculosis across the spectrum of disease
- Mycobacterium tuberculosis Rv2074 is a coenzyme F420-dependent mycobilin reductase
- Case Report: Analysis of antimicrobial therapy and pharmaceutical care of mixed Aspergillus and Mycobacterium tuberculosis infection following renal transplantation: a case study
- Availability of genotypic and phenotypic drug susceptibility testing for Mycobacterium tuberculosis in WHO European Region
BibTeX
@article{wang2026decoding,
title = {{Decoding positive selection in Mycobacterium tuberculosis with phylogeny-guided graph attention models}},
author = {Linfeng Wang and Susana Campino and Taane G. Clark and Jody E. Phelan},
journal = {BMC Bioinformatics},
year = {2026},
month = aug,
doi = {10.1186/s12859-026-06583-0},
url = {https://doi.org/10.1186/s12859-026-06583-0},
note = {CC BY 4.0},
}
RIS
TY - JOUR
TI - Decoding positive selection in Mycobacterium tuberculosis with phylogeny-guided graph attention models
AU - Linfeng Wang
AU - Susana Campino
AU - Taane G. Clark
AU - Jody E. Phelan
PY - 2026
DA - 2026/08/06
JO - BMC Bioinformatics
DO - 10.1186/s12859-026-06583-0
UR - https://doi.org/10.1186/s12859-026-06583-0
AB - Motivation: Positive selection is a key evolutionary force in Mycobacterium tuberculosis, driving the emergence of adaptive mutations that influence drug resistance, transmissibility, and virulence of tuberculosis. Phylogenetic trees capture the hierarchical evolutionary relationships among isolates, making them an ideal framework for detecting such adaptive signals. Here, we present a phylogeny-guided graph attention network approach, coupled with a novel method for converting SNP-annotated phylogenetic trees into graph structures suitable for graph neural network processing. Results: Using a dataset of 1000 M. tuberculosis isolates, representing the four main lineages, and 206 single-nucleotide variants (75 resistance-associated and 131 neutral) spanning 79 drug-resistance genes, we constructed graphs where nodes represented individual isolates and edges reflected phylogenetic distances. To reduce noise and highlight local evolutionary structure, we pruned edges between isolates separated by more than seven internal nodes. Node features were encoded as binary indicators of SNP presence or absence, and the graph attention network (GAT) architecture comprised two attention layers with a residual connection, followed by global attention pooling and a multilayer perceptron classifier. The model achieved higher accuracy (0.81, AUC 0.82) than a homoplasy-count baseline (0.71) on the held-out test set. Under repeated cross-validation, however, F1 scores did not differ significantly (0.56 vs. 0.58; paired Wilcoxon p = 0.98), reflecting a specificity-sensitivity trade-off: the GAT favoured specificity (0.89), the baseline favoured sensitivity. Applying the model to 138 WHO-classified “uncertain” variants identified 28 high-confidence candidates, including rpoC Ile491Val (rifampicin, compensatory), ubiA Arg240Cys (ethambutol), and rpsA Ala412Val (pyrazinamide). These findings demonstrate the feasibility of encoding phylogenetic trees as graph neural network-compatible structures and the utility of attention-based models for detecting positive-selection signals, supporting genomic surveillance and prioritisation of candidates for experimental validation. Availability and Implementation: The source code for the model can be found at https://github.com/linfeng-wang/Phylogeny-Guided_GAT. Supplementary Information: The online version contains supplementary material available at https://doi.org/10.1186/s12859-026-06583-0.
SN - 1471-2105
ER -