Metadata-Version: 2.4
Name: TemporalVAE
Version: 1.0.1
Summary: TemporalVAE: Temporal mapping of single cells with time-VAE
Home-page: https://github.com/StatBiomed/TemporalVAE
Author: ['Yijun Liu', 'Yuanhua Huang']
Author-email: yuanhua@hku.hk
License: Apache-2.0
Keywords: Time prediction,Variational autoencoder,Single-cell RNA-seq,Embryogenesis
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy<2.0.0,>=1.24.4
Requires-Dist: scipy>=1.15.2
Requires-Dist: pandas>=2.2.3
Requires-Dist: scikit-learn>=1.5.1
Requires-Dist: pynvml>=11.5.0
Requires-Dist: gseapy>=1.1.9
Requires-Dist: psutil>=5.9.5
Requires-Dist: mkl-random>=1.2.8
Requires-Dist: torch<=2.6.0,>=2.0.1
Requires-Dist: torchaudio>=2.0.2
Requires-Dist: torchvision<=0.21.0,>=0.15.2
Requires-Dist: tensorboard>=2.13.0
Requires-Dist: pytorch-lightning<=2.0.9,>=2.0.4
Requires-Dist: matplotlib>=3.9.2
Requires-Dist: seaborn>=0.13.2
Requires-Dist: matplotlib-venn>=1.1.2
Requires-Dist: adjustText>=1.3.0
Requires-Dist: scanpy>=1.10.3
Requires-Dist: anndata>=0.8.0
Requires-Dist: umap-learn>=0.5.4
Requires-Dist: tqdm>=4.64.1
Provides-Extra: docs
Requires-Dist: sphinx_bootstrap_theme; extra == "docs"
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: summary

# TemporalVAE
Temporal mapping of single cells from time-series atlas with time-predicting VAE

## Reproducibility
For reproducibility of the manuscript's analyses, the scripts for generating 
figures are available at 
[TemporalVAE-reproducibility](
   https://github.com/StatBiomed/TemporalVAE-reproducibility) 
folder/submodule.


## Installation

Quick install can be achieved via pip (python >=3.8; 3.10 to 3.12 were tested)

**Step 0**: create a conda environment and activate it:

```bash
conda create -n tvae python=3.12
conda activate tvae

# Optional: add jupyter lab kernal
pip install ipykernel
python -m ipykernel install --user --name tvae --display-name "tvae"
```

**Step 1**: install TemporalVAE from GitHub:
```bash
# for published version
pip install -U TemporalVAE

# or developing version
pip install -U git+https://github.com/StatBiomed/TemporalVAE
```

## Quick Usage

Reference examples can be found at [examples](./examples) folder, including

* training: [hEmbryo8_training.ipynb](./examples/hEmbryo8_training.ipynb)

* cross-validation: [hEmbryo8_Xiang_CV.ipynb](./examples/hEmbryo8_Xiang_CV.ipynb)

* predicting: [TO BE ADDED]

## Future plan for easier use

Here are the future plan for easier use (TO IMPLEMENT):

1. Import TemporalVAE and create an object of the class TVAE.

```python
import TemporalVAE as tvae

tvae_model = tvae.TVAE()
tvae_model.fit(X_atlas, t_atlas)

# predict query or training data
Z_query, y_query = tvae_model.predict(X_query)
Z_atlas, y_atlas = tvae_model.predict(X_atlas)
```

2. Map to the same 
   [UMAP](https://umap-learn.readthedocs.io/en/latest/api.html#umap.umap_.UMAP) 
   as the reference data

```python
import UMAP

umap_model = UMAP.umap()
umap_model.fit(Z_atlas)

atlas_umap = umap_model.transform(Z_atlas)
query_umap = umap_model.transform(Z_query)
```


## Reference

> Liu Y., Cai F., Barile M., Chang Y., Cao D., and Huang Y. "TemporalVAE: 
  atlas-assisted temporal mapping of time-series single-cell transcriptomes 
  during embryogenesis." Nature Cell Biology, 2025 (in press).
