Skip to main content

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 description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monocle3_python-1.4.26.post1.tar.gz (77.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

monocle3_python-1.4.26.post1-py3-none-any.whl (92.7 kB view details)

Uploaded Python 3

File details

Details for the file monocle3_python-1.4.26.post1.tar.gz.

File metadata

  • Download URL: monocle3_python-1.4.26.post1.tar.gz
  • Upload date:
  • Size: 77.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for monocle3_python-1.4.26.post1.tar.gz
Algorithm Hash digest
SHA256 006a12499ae390403af033e6d0e0f6243715b411c5da335e35cfadfeab43f714
MD5 13e2c074325bdd7a7d4b8a083d369082
BLAKE2b-256 db7bb1d178e28c30faf0f46578f0d625237ca756df53adc126c4a55549d5c38e

See more details on using hashes here.

File details

Details for the file monocle3_python-1.4.26.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for monocle3_python-1.4.26.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 6bde5bf72843d78523ebd1c7b91cab26f6655445ace9685f1e4e6a057c0112a1
MD5 227957ffc2b5d528a785a9cbb33e1ca0
BLAKE2b-256 e63d8d5ad4d36dad58147ae2b3bc640d4a703f6c7eaaf714d260e8eb9a321317

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page