Skip to content

omicverse/py-CytoTRACE

Repository files navigation

py-CytoTRACE

A Python port of CytoTRACE (Gulati et al. Science 2020) — single-cell developmental potential / stemness prediction from gene counts.

  • Pure NumPy / SciPy implementation, no Rcpp dependency
  • Core algorithm: detected-gene count + most-variable-genes + GCS + NNLS + diffusion smoothing → rank-normalised score in [0, 1]
  • ggplot2-python visualisation: plot_cytotrace (scatter on embedding) + plot_cyto_genes (top-correlated genes bar)

Install

pip install pycytotrace-bio

(module name is pycytotrace.)

Quick-start

import pycytotrace
res = pycytotrace.cytotrace_run(counts)        # counts: (n_genes × n_cells)
res.cytotrace                                  # 1.0 = stem-like, 0.0 = differentiated
res.cyto_genes.head()                          # top genes correlated with score
from ggplot2_py import ggsave
ggsave("out.png",
       plot=pycytotrace.plot_cytotrace(res, embedding=umap_coords),
       width=6, height=4, dpi=120)

Function map

Python R Status
cytotrace_run CytoTRACE
CytoTRACE dataclass CytoTRACE() return list
plot_cytotrace plotCytoTRACE
plot_cyto_genes plotCytoGenes
iCytoTRACE (multi-batch integration) iCytoTRACE ⏳ v0.2

Known limitations (v0.1)

  1. Batch correction (ComBat) skipped — single-batch fit only. v0.2 will add a batch= argument that delegates to scanpy's sc.pp.combat.
  2. Fast-mode (subsampling for >3000 cells) not yet implemented — large datasets compute the full N×N similarity matrix, which is O(N²) memory.
  3. iCytoTRACE deferred to v0.2.

Citation

Gulati, G. S. et al. Single-cell transcriptional diversity is a hallmark of developmental potential. Science 367, 405–411 (2020).

License

MIT.

About

Pure-Python port of CytoTRACE (Gulati et al. 2020) - gene-count-based stemness pseudotime for scRNA-seq

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages