Metadata-Version: 2.5
Name: scmito
Version: 1.0.2
Summary: Mitochondrial lineage tracing and single-cell multi-omics in Python
Project-URL: Homepage, https://github.com/andrecossa5/MiTo
Project-URL: Documentation, https://mito.readthedocs.io/en/v1.0.2/
Project-URL: Repository, https://github.com/andrecossa5/MiTo
Project-URL: Issues, https://github.com/andrecossa5/MiTo/issues
Author-email: Andrea Cossa <andrea.cossa05@gmail.com>
License: MIT License
        
        Copyright (c) 2023 acox1
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: lineage-tracing,mitochondrial-DNA,phylogenetics,scLT,single-cell
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.11
Requires-Dist: ac-plotting-ut>=0.2.1
Requires-Dist: anndata>=0.10
Requires-Dist: bbmix>=0.1
Requires-Dist: biopython>=1.80
Requires-Dist: cassiopeia-mt>=2.1.3
Requires-Dist: circlify>=0.15
Requires-Dist: gseapy>=1.1
Requires-Dist: igraph>=0.10
Requires-Dist: joblib>=1.3
Requires-Dist: leidenalg>=0.10
Requires-Dist: lightgbm>=4.0
Requires-Dist: matplotlib<4,>=3.8
Requires-Dist: mquad>=0.1.8
Requires-Dist: networkx>=3.1
Requires-Dist: numpy<3,>=1.26
Requires-Dist: pandas<4,>=2.2
Requires-Dist: scanpy<2,>=1.10
Requires-Dist: scikit-learn<2,>=1.4
Requires-Dist: scipy<2,>=1.11
Requires-Dist: seaborn>=0.13
Requires-Dist: shap>=0.44
Requires-Dist: statsmodels<0.16,>=0.14
Requires-Dist: tqdm>=4.60
Requires-Dist: umap-learn>=0.5
Provides-Extra: docs
Requires-Dist: furo; extra == 'docs'
Requires-Dist: ipykernel; extra == 'docs'
Requires-Dist: nbsphinx; extra == 'docs'
Requires-Dist: sphinx-copybutton; extra == 'docs'
Requires-Dist: sphinx-design; extra == 'docs'
Requires-Dist: sphinx>=7; extra == 'docs'
Provides-Extra: test
Requires-Dist: pytest-cov>=4.0; extra == 'test'
Requires-Dist: pytest>=7.0; extra == 'test'
Description-Content-Type: text/markdown

<div align="center">
  <img src="image/MiTo_logo_transparent.png" alt="MiTo" width="260">
</div>

# MiTo (Mitochondrial single-cell lineage tracing Toolkit)

**Mitochondrial single-cell multi-omics in Python.**

[![PyPI](https://img.shields.io/pypi/v/scmito.svg)](https://pypi.org/project/scmito/)
[![Python](https://img.shields.io/pypi/pyversions/scmito.svg)](https://pypi.org/project/scmito/)
[![Tests](https://github.com/andrecossa5/MiTo/actions/workflows/test.yml/badge.svg)](https://github.com/andrecossa5/MiTo/actions/workflows/test.yml)
[![Documentation](https://readthedocs.org/projects/mito/badge/?version=latest)](https://mito.readthedocs.io/en/v1.0.2/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**MiTo** infers clonal ancestries in single-cell data from natural mtDNA variation.

The framework provides the infrastructure to convert MAESTER pre-processing outputs into Allele Frequency Matrices (i.e., [AnnData](https://anndata.readthedocs.io/) objects), filter informative mtDNA variants, genotype individual cells, and infer mitochondrial phylogenies and clones for downstream multi-omic analysis.

> **Versions.** This README documents MiTo 1.0.2, the stable release of the original MiTo API, the one used for
> the analyses of the MiTo paper [MiTo_benchmark_repro](https://github.com/andrecossa5/MiTo_benchmark_repro) and by nf-MiTo pipeline [nf-MiTo](https://github.com/andrecossa5/nf-MiTo). MiTo 2.x has a redesigned API and one pipeline allowing processing MAESTER, ReDeeM and mtscATAC:
> see the [current documentation](https://mito.readthedocs.io/en/stable/). To stay on this release, use
> `pip install "scmito<2"`. See [CHANGELOG.md](CHANGELOG.md) for the full history.

## Installation

```bash
pip install scmito
```

Requires Python 3.11+.

```python
import mito as mt
print(mt.__version__)
```

## Quick start

```python
import scanpy as sc
import mito as mt

# Allele Frequency Matrix (cell x site AnnData with AD / DP layers)
afm = sc.read('afm_unfiltered.h5ad')

# Cell and variant filters, distances in mtDNA mutation space
afm = mt.pp.filter_cells(afm, cell_filter='filter2')
afm = mt.pp.filter_afm(afm, filtering='MiTo')

# Phylogeny and clonal inference
tree = mt.tl.build_tree(afm, precomputed=True, solver='UPMGA')
annotator = mt.tl.MiToTreeAnnotator(tree)
annotator.clonal_inference()

# Visualization
mt.pl.plot_tree(tree, features=['MiTo clone'])
```

See [getting-started tutorial](https://mito.readthedocs.io/en/v1.0.2/getting_started_tutorial.html) for 
the full vignette.

## API

MiTo follows the `scverse` layout, composing with `scanpy` and `anndata`:

| Module | Purpose |
| --- | --- |
| `io` | Build AFMs from pre-processing outputs, read/write Newick tree objects |
| `pp` | Cell and variant filtering, genotyping, distances, kNN graphs, embeddings |
| `tl` | Tree building, clonal inference, clustering, fate bias |
| `pl` | Trees, heatmaps, embeddings, coverage and variant-spectrum plots |
| `ut` | Metrics, helpers |

**Supported platforms:** scRNA-seq (MAESTER).

Full reference: [MiTo docs](https://mito.readthedocs.io/en/v1.0.2/).

## Reproducing the paper

The paper analyses run with MiTo 1.0.2, using the conda recipe in
[MiTo_benchmark_repro](https://github.com/andrecossa5/MiTo_benchmark_repro) (`envs/environment.yml`, which
installs `scmito==1.0.2` and the additional libraries the scripts need).

## Development

```bash
git clone https://github.com/andrecossa5/MiTo.git
cd MiTo
pip install -e ".[test]"
pytest
```

## Citation

If MiTo is useful in your work, please cite:

> Cossa, A. Dalmasso A. et al. *MiTo: mitochondrial lineage tracing and single-cell multi-omics.*
> Nat Comm (2026). [https://doi.org/10.1038/s41467-026-71607-5](https://www.nature.com/articles/s41467-026-71607-5)

MiTo builds on the [Cassiopeia](https://github.com/YosefLab/Cassiopeia) package for phylogeny reconstruction and data infrastructure. Please, cite it as well.

## Releases

See [CHANGELOG.md](CHANGELOG.md).

## License

MIT — see [LICENSE](LICENSE).
