# PanForest: predicting genes in genomes using random forests

**Authors:** Alan J S Beavan, Maria Rosa Domingo-Sananes, James O McInerney

PMC · DOI: 10.1093/bioinformatics/btag005 · Bioinformatics · 2026-01-09

## TL;DR

PanForest uses random forests to predict gene presence or absence in genomes, revealing gene co-occurrence patterns and their predictability.

## Contribution

PanForest introduces a novel random forest-based approach for predicting gene presence/absence and quantifying gene associations in pangenomes.

## Key findings

- PanForest successfully analyzed a pangenome of 12,741 genes in 1,000 Escherichia coli genomes in 5 hours.
- Certain antimicrobial resistance genes reliably predict presence/absence of other resistance genes.
- New gene associations with antimicrobial resistance were identified using PanForest.

## Abstract

The presence or absence of some genes in a genome can influence whether other genes are likely to be present or absent. Understanding these gene co-occurrence and avoidance patterns reveals fundamental principles of genome organization, with applications ranging from evolutionary reconstruction to rational design of synthetic genomes.

PanForest, presented here, uses random forest classifiers to predict the presence and absence of genes in genomes from the set of other genes present. Performance statistics output by PanForest reveal how predictable each gene’s presence or absence is, based on the presence or absence of other genes in the genome. Further, PanForest produces statistics indicating the importance of each gene in predicting the presence or absence of each other gene. The PanForest software can run serially or in parallel, thereby facilitating the analysis of pangenomes at Network of Life scale.

A pangenome of 12 741 accessory genes in 1000 Escherichia coli genomes was analysed in around 5 h using eight processors. To demonstrate PanForest’s utility, we present a case study and show that certain genes associated with resistance to antimicrobial drugs reliably predict the presence or absence of other genes associated with resistance to the same drug. Further, we highlight several associations between those genes and others not known to be associated with antimicrobial resistance (AMR), or associated with resistance to other drugs. We envisage PanForest’s use in studies from multiple disciplines concerning the dynamics of gene distributions in pangenomes ranging from biomedical science and synthetic biology to molecular ecology.

The software if freely available with a full manual and can be found with at www.github.com/alanbeavan/PanForest DOI: https://doi.org/10.5281/zenodo.17865482.

## Linked entities

- **Species:** Escherichia coli (taxon 562)

## Full-text entities

- **Species:** Escherichia coli (E. coli, species) [taxon 562]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12857576/full.md

## Figures

4 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12857576/full.md

## References

27 references — full list in the complete paper: https://tomesphere.com/paper/PMC12857576/full.md

---
Source: https://tomesphere.com/paper/PMC12857576