Metadata-Version: 2.4
Name: monocle3-python
Version: 1.4.26.post1
Summary: Python port of the R monocle3 package (tracks cole-trapnell-lab/monocle3 1.4.26 @ 4f4239a) — AnnData-based single-cell trajectory, clustering, and differential expression.
Project-URL: Homepage, https://github.com/Bio-Babel/Monocle3-python
Project-URL: Repository, https://github.com/Bio-Babel/Monocle3-python
Project-URL: Issues, https://github.com/Bio-Babel/Monocle3-python/issues
Project-URL: Documentation, https://github.com/Bio-Babel/Monocle3-python#readme
Project-URL: Upstream (R package), https://github.com/cole-trapnell-lab/monocle3
Project-URL: Tutorial data (Zenodo), https://zenodo.org/records/19712460
Author-email: Jeffery Liu <jeffliu.lucky@gmail.com>
License-Expression: Artistic-2.0
License-File: LICENSE
Keywords: R-port,clustering,differential-expression,graph-test,monocle,monocle3,pseudotime,scRNA-seq,single-cell,trajectory
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: anndata>=0.10
Requires-Dist: annoy>=1.17
Requires-Dist: ggplot2-python>=4.0.2.9000
Requires-Dist: ggrepel-python>=0.9.8
Requires-Dist: hnswlib>=0.8
Requires-Dist: leidenalg>=0.10
Requires-Dist: numpy>=1.24
Requires-Dist: opentsne>=1.0
Requires-Dist: pandas>=2.0
Requires-Dist: patsy>=0.5
Requires-Dist: pheatmap-python>=1.0.13
Requires-Dist: plotly>=5.0
Requires-Dist: pynndescent>=0.5
Requires-Dist: python-igraph>=0.10
Requires-Dist: scales-python>=1.4.0
Requires-Dist: scikit-learn>=1.3
Requires-Dist: scipy>=1.11
Requires-Dist: statsmodels>=0.14
Requires-Dist: umap-learn>=0.5
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs; extra == 'docs'
Requires-Dist: mkdocs-jupyter; extra == 'docs'
Requires-Dist: mkdocs-material; extra == 'docs'
Requires-Dist: mkdocstrings[python]; extra == 'docs'
Description-Content-Type: text/markdown

# monocle3-python

[![PyPI](https://img.shields.io/pypi/v/monocle3-python)](https://pypi.org/project/monocle3-python/)

Python port of the R [**monocle3**](https://github.com/cole-trapnell-lab/monocle3) single-cell trajectory toolkit.

The port keeps monocle3's orchestration and R-side numerical behaviour while replacing the `cell_data_set` S4 container with `anndata.AnnData` and delegating non-monocle-specific algorithms to the scverse ecosystem (`umap-learn`, `openTSNE`, `leidenalg`, `statsmodels`, …).

## Installation

```bash
pip install monocle3-python                # from PyPI
```

For local development:

```bash
git clone https://github.com/Bio-Babel/Monocle3-python.git
cd Monocle3-python
pip install -e ".[dev]"
```

## Quickstart

```python
import monocle3 as m3

adata = m3.load_packer_embryo()                  # AnnData (6188 × 20222)
m3.preprocess_cds(adata, num_dim=50)              # size-factor norm + truncated PCA
m3.align_cds(adata, alignment_group="batch")
m3.reduce_dimension(adata)                        # UMAP via umap-learn
m3.cluster_cells(adata)                           # Leiden
m3.learn_graph(adata)                             # SimplePPT principal graph
m3.order_cells(adata, root_pr_nodes=["Y_1"])      # pseudotime
m3.plot_cells(adata, color_cells_by="pseudotime")
```

## Tutorials

Runnable notebooks that reproduce the R monocle3 vignettes live under [`tutorials/`](tutorials/):

| Notebook | Dataset |
|---|---|
| `c_elegans_embryo_v2.ipynb` | Packer et al. 2019 — *C. elegans* embryo trajectory |
| `c_elegans_L2_v2.ipynb`     | Cao et al. 2017 — *C. elegans* L2 clustering + Garnett markers |

## License

Artistic-2.0, matching the upstream R monocle3.
