PyTorch implementation of PBA.
Project description
torch-pba
PyTorch Implementation of PBA. AnnData-centric.
Installation
From PYPI:
pip install torch-pba
Alternatively, install the development version from GitHub:
git clone https://github.com/mvinyard/torch-pba.git; cd torch-pba; pip install -e .
Example use:
from torch_pba import PBA
from anndata import read_h5ad
pba = PBA(adata=read_h5ad("./path/to/adata.h5ad"))
pba.build_kNN()
pba.compute_Laplacian()
pba.compute_potential()
pba.compute_fate_bias()
pba.compute_mean_first_passage_time()
Time to calculate Mean First Passage Time for the example hematopoiesis dataset is cut from 4+ hours to <10 mins. In this example, I used a NVIDIA T4 GPU rented from GCP.
See more: notebook
Original work:
Note:
I have not contributed any methodological novelty in this library. The original implementation contains the novel application of a Laplace transform to a kNN Graph to obtain a potential value, pseudotime, etc. Here, I have simply adapted the library to PyTorch/CUDA. No formal benchmarking has been performed.
Contact / questions:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for torch_pba-0.0.1rc0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc3f5dc54155631861ba2e745b7181b48b56ed770ce944ebb5921d7ac79f8636 |
|
MD5 | fa0f5e03f104c77014504a81b0e225d7 |
|
BLAKE2b-256 | 3ae6b99765f831de7d2f6439d71c97b7cb2844fc5c169f48ec987d0a396e1fc9 |