Metadata-Version: 2.5
Name: bacatlas
Version: 0.0.1
Summary: BacAtlas — a locus-centred atlas of bacterial pangenomes
Project-URL: Homepage, https://github.com/abelsond-cam/bacatlas
Project-URL: Source, https://github.com/abelsond-cam/bacatlas
Author: David Abelson
Maintainer-email: David Abelson <dca36@cam.ac.uk>
License: BSD 3-Clause License
        
        Copyright (c) 2026, David Abelson
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# BacAtlas

**A locus-centred atlas of bacterial pangenomes.**

> ⚠ **This release reserves the name.** It ships no pipeline and no data. The work is real and in
> progress; this package exists so that what is published later is published under the name the
> project is already called. Watch
> [github.com/abelsond-cam/bacatlas](https://github.com/abelsond-cam/bacatlas).

## What it is

A bacterial pangenome is usually presented around one reference genome, with everything else hung
off it. That works until the interesting thing is a gene the reference does not have.

BacAtlas presents the pangenome as **loci** instead. A locus is a position in the genome, and what
fills it: the structurally homologous genes found there across a species — however far their
sequences have diverged — together with how consistently each neighbouring position is occupied. You
search for a gene, and you get the neighbourhood it lives in.

Two genes that occupy the same position and are homologous in structure are **syntelogs**. Homology
here means similar *structure*, inferred from protein-language-model embeddings, not sequence
identity: syntelogs routinely differ far more in sequence than any identity threshold would group.
That is the whole point — an identity threshold cannot see a conserved role filled by a divergent
gene, and those are the genes that carry resistance and virulence.

## How it is built

| piece | what it does |
|---|---|
| **Bacformer** | a genome language model over a genome's proteins, giving each gene a context-aware embedding |
| **Nuna** | the clustering method — groups genes into loci by homology *and* genomic context, at a scale graph-based pangenome tools do not reach |
| **BacAtlas** | the atlas itself: the loci, their evidence, and the browser that serves them |

BacAtlas is the atlas; **Nuna** is the clustering method inside it.

## Status

Early. The method clears its correctness gate on *Escherichia coli* and *Klebsiella pneumoniae*, and
a browser over both is running. Reproducibility against Panaroo, and the scale-up beyond the probe
cohort, are in progress. Nothing here is peer-reviewed yet — treat it as a working draft.

## Licence

BSD 3-Clause. © 2026 David Abelson.
