Skip to main content

torch-pba

PyPI pyversions PyPI version Code style: black

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:

mvinyard@broadinstitute.org

Metadata

Release files for torch-pba 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for torch-pba 0.0.3
File Size Uploaded
torch-pba-0.0.3.tar.gz 23.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for torch-pba 0.0.3
File Interpreter ABI Platform
torch_pba-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 50.4 kB

Release files / torch-pba-0.0.3.tar.gz

Download URL torch-pba-0.0.3.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1879f503b64842f9ae1576c4d74c4d6653f6d33943b75fc8989f32abb1163656
BLAKE2b-256 checksum
How to use checksums
e45f9a1478f423f12a143b46cf4706d3d3dbf3fcbcb7d063fc8a20dc1bbe8558
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / torch_pba-0.0.3-py3-none-any.whl

Download URL torch_pba-0.0.3-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
981f424cca4f3e96a38f9be314c968d53b270cdd14bf7eaecea3f8a578e29439
BLAKE2b-256 checksum
How to use checksums
e3f042a4f1a8ba6976be0a974317d868587dda13d5054cc95b1c05b6aac1d9fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page