Skip to main content

monocle3-python

PyPI

Python port of the R 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

pip install monocle3-python                # from PyPI

For local development:

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

Quickstart

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/:

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.

Release files for monocle3-python 1.4.26.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for monocle3-python 1.4.26.post1
File Size Uploaded
monocle3_python-1.4.26.post1.tar.gz 77.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for monocle3-python 1.4.26.post1
File Interpreter ABI Platform
monocle3_python-1.4.26.post1-py3-none-any.whl Python 3 none any Details

Total release size: 170.6 kB

Release files / monocle3_python-1.4.26.post1.tar.gz

Download URL monocle3_python-1.4.26.post1.tar.gz
Size 77.9 kB
Tags Source
SHA-256 checksum
How to use checksums
006a12499ae390403af033e6d0e0f6243715b411c5da335e35cfadfeab43f714
BLAKE2b-256 checksum
How to use checksums
db7bb1d178e28c30faf0f46578f0d625237ca756df53adc126c4a55549d5c38e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / monocle3_python-1.4.26.post1-py3-none-any.whl

Download URL monocle3_python-1.4.26.post1-py3-none-any.whl
Size 92.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6bde5bf72843d78523ebd1c7b91cab26f6655445ace9685f1e4e6a057c0112a1
BLAKE2b-256 checksum
How to use checksums
e63d8d5ad4d36dad58147ae2b3bc640d4a703f6c7eaaf714d260e8eb9a321317
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

1.4.26.post1 This release

2 release files

1.4.26

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page