omicverse.single.Monocle#
- omicverse.single.Monocle(adata: AnnData)[source]#
Monocle2-style single-cell trajectory analysis.
Wraps a pure-Python implementation of Monocle 2 as a stateful analyzer operating on an AnnData object. All results are stored in the AnnData (
.obs,.var,.uns['monocle'],.obsm) so the usual scanpy workflow continues to work seamlessly.- Parameters:
adata (AnnData) – Annotated data matrix (cells × genes). Expression matrix in
adata.Xshould be raw/normalized counts (negative binomial model).
- omicverse.single.adata#
The annotated data matrix with analysis results stored in-place.
- Type:
AnnData
Examples
Basic trajectory analysis:
>>> mono = ov.single.Monocle(adata) >>> mono.preprocess() # size factors + dispersions >>> mono.select_ordering_genes() # high-variance gene selection >>> mono.reduce_dimension() # DDRTree >>> mono.order_cells() # assign pseudotime + State >>> mono.plot_trajectory(color_by='clusters') >>> mono.plot_genes_in_pseudotime(['Ins1', 'Gcg'])
Differential expression along pseudotime:
>>> de = mono.differential_gene_test() >>> beam = mono.BEAM(branch_point=1)