Temporal mapping of single cells from time-series atlas with time-predicting VAE
For reproducibility of the manuscript's analyses, the scripts for generating figures are available at TemporalVAE-reproducibility folder/submodule.
Quick install can be achieved via pip (python >=3.8)
Step 0: create a conda environment and activate it:
conda create -n tvae python=3.10.9
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:
# or developing version
pip install -U git+https://github.com/StatBiomed/TemporalVAE-release
# for published version (TO AVAILABLE SOON)
# pip install -U TemporalVAE
Reference examples can be found at examples folder, including
-
training: hEmbryo8_training.ipynb
-
cross-validation: hEmbryo8_Xiang_CV.ipynb
-
predicting: [TO BE ADDED]
Here are the future plan for easier use (TO IMPLEMENT):
- Import TemporalVAE and create an object of the class TVAE.
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)
- Map to the same UMAP as the reference data
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)
Y. Liu et al. Atlas-assisted temporal mapping of time-series single-cell transcriptomes during embryogenesis. (to appear)