Metadata-Version: 2.4
Name: pydestiny-bio
Version: 0.2.0
Summary: Pure-Python port of destiny — diffusion maps + DPT for single-cell RNA-seq (Angerer et al. 2016).
Author-email: Zehua Zeng <starlitnightly@163.com>
License: MIT License
        
        Copyright (c) 2026 omicverse contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/omicverse/py-destiny
Project-URL: Repository, https://github.com/omicverse/py-destiny
Project-URL: Upstream R package, https://github.com/theislab/destiny
Keywords: single-cell,scRNA-seq,diffusion-map,dpt,destiny
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Requires-Dist: scipy>=1.10
Requires-Dist: pandas>=1.5
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Dynamic: license-file

# py-destiny

A **Python port of [destiny](https://github.com/theislab/destiny)** (Angerer et al., *Bioinformatics* 2016) — diffusion maps + diffusion pseudotime (DPT) for single-cell RNA-seq.

- Pure NumPy / SciPy implementation (no Rcpp dependency)
- 3/3 core algorithmic outputs parity-validated:
  - **Eigenvectors Procrustes = 0.916** vs R (threshold 0.80)
  - **Eigenvalues Pearson = 0.967** (threshold 0.95)
  - **DPT Pearson = 0.974** (threshold 0.85)

## Install

```bash
pip install pydestiny-bio
```
(module name is `pydestiny`; the PyPI distribution name `pydestiny` was taken by an unrelated project, so this package ships as `pydestiny-bio`.)

## Quick-start

```python
import pydestiny
dm = pydestiny.DiffusionMap.fit(expression, sigma='local', n_eigs=5)
dpt = pydestiny.DPT(dm, root=0)
```

## Function map

| Python | R | Status |
|---|---|---|
| `DiffusionMap.fit` | `DiffusionMap` | ✅ |
| `DPT` | `DPT` | ✅ |
| `Sigmas` | `Sigmas` | ✅ |
| `find_dm_k` | `find_dm_k` | ✅ |

## Known limitations (v0.1)

1. **Plotting deferred** (`plot.DiffusionMap`, `plot.DPT`, `gene-relevance` etc.) → v0.2.
2. **GeneRelevance** not yet ported → v0.2.
3. **Censoring / dropout-noise model** not yet ported → v0.2.
4. **Local sigma** uses simple mean of n_local nearest distances; R has more sophisticated weighting that slightly shifts eigenvalues (Pearson 0.97 vs perfect 1.0).

## Citation

> Angerer, P. et al. *destiny: diffusion maps for large-scale single-cell data in R.* Bioinformatics 32, 1241–1243 (2016).

## License

MIT.
