Skip to main content

DeepVelo - A Deep Learning-based velocity estimation tool with cell-specific kinetic rates

PyPI version License: MIT

This is the official implementation of the DeepVelo method. DeepVelo employs cell-specific kinetic rates and provides more accurate RNA velocity estimates for complex differentiation and lineage decision events in heterogeneous scRNA-seq data. Please check out the paper for more details.

alt text

Installation

pip install deepvelo

Using GPU

The dgl cpu version is installed by default. For GPU acceleration, please install a proper dgl gpu version compatible with your CUDA environment.

pip uninstall dgl # remove the cpu version
# replace cu101 with your desired CUDA version and run the following
pip install "dgl-cu101>=0.4.3,<0.7"

Install the development version

We use poetry to manage dependencies.

poetry install

This will install the exact versions in the provided poetry.lock file. If you want to install the latest version for all dependencies, use the following command.

poetry update

Usage

We provide a number of notebooks in the exmaples folder to help you get started. DeepVelo fullly integrates with scanpy and scVelo. The basic usage is as follows:

import deepvelo as dv
import scvelo as scv

adata = ... # load your data in AnnData format

# preprocess the data
scv.pp.filter_and_normalize(adata, min_shared_counts=20, n_top_genes=2000)
scv.pp.moments(adata, n_neighbors=30, n_pcs=30)

# run DeepVelo using the default configs
trainer = dv.train(adata, dv.Constants.default_configs)
# this will train the model and predict the velocity vectore. The result is stored in adata.layers['velocity']. You can use trainer.model to access the model.

Fitting large number of cells

If you can not fit a large dataset into (GPU) memory using the default configs, please try setting a small inner_batch_size in the configs, which can reduce the memory usage and maintain the same performance.

Currently the training works on the whole graph of cells, we plan to release a flexible version using graph node sampling in the near future.

Metadata

Release files for deepvelo 0.2.8

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

Source distribution (sdist)

Source distribution for deepvelo 0.2.8
File Size Uploaded Provenance
deepvelo-0.2.8.tar.gz 70.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for deepvelo 0.2.8
File Interpreter ABI Platform
deepvelo-0.2.8-py3-none-any.whl Python 3 none any Details

Total release size: 149.0 kB

Release files / deepvelo-0.2.8.tar.gz

Download URL deepvelo-0.2.8.tar.gz
Size 70.0 kB
Tags Source
SHA-256 checksum
How to use checksums
979950f81d8d0ac9952dac3fc9968c64daeac2a64c5e8f28acaf9b26ca32356d
BLAKE2b-256 checksum
How to use checksums
d0d703a1d9d8d2cb964c82c7a6835d5348d3f30f32084be0f8e05cbdef13ce3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.7.12 Linux/4.15.0-213-generic

Release files / deepvelo-0.2.8-py3-none-any.whl

Download URL deepvelo-0.2.8-py3-none-any.whl
Size 79.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aca9b7bc5004cdddd66713368983998b84d0f14c523d86f36d4375cfffe677dc
BLAKE2b-256 checksum
How to use checksums
9b057c80ce586faad28061e03d495d59a49488d5b2ceffaa6fbe841e8a2f590c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.7.12 Linux/4.15.0-213-generic

Security for deepvelo 0.2.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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