Decoding positive selection in Mycobacterium tuberculosis with phylogeny-guided graph attention models.
Linfeng Wang, Susana Campino, Taane G Clark, Jody E Phelan
Department of Infection Biology, Faculty of Infectious and Tropical Diseases, London School of Hygiene & Tropical Medicine, London, WC1E 7HT, UK. · Department of Infection Biology, Faculty of Infectious and Tropical Diseases, London School of Hygiene & Tropical Medicine, London, WC1E 7HT, UK. Taane.clark@lshtm.ac.uk.
Key points
From the paper's conclusion- 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.
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 .
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Mycobacterium Tuberculosis Drug Resistance Prediction from Whole Genome Sequences Using Hierarchical CNN-Transformer Mutation Pattern EncodingInternational Journal of Pharmacy with Medical Sciences · 2026
- Whole-genome sequencing reveals lineage-associated drug resistance and enables machine learning-based prediction in Mycobacterium tuberculosis clinical isolates.Frontiers in microbiology · 2026
- A microbe-drug association prediction model based on graph attention networks and rotation forest.Frontiers in bioinformatics · 2026
- BIG-TB: A benchmark for evaluating prediction and interpretability of sequence-based machine learning using Mycobacterium tuberculosis genomesbioRxiv · 2026
- Network Organization, Null-Model Assessment, and Robustness of a Published Mycobacterium tuberculosis Candidate Drug-Resistance Gene Panel.International journal of molecular sciences · 2026
- AMR-GNN: a multi-representation graph neural network framework to enable genomic antimicrobial resistance predictionNature Communications · 2026