Skip to main content

Deep Velocity

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deepvelo-0.2.8.tar.gz (70.0 kB view details)

Uploaded Source

Built Distribution

deepvelo-0.2.8-py3-none-any.whl (79.0 kB view details)

Uploaded Python 3

File details

Details for the file deepvelo-0.2.8.tar.gz.

File metadata

  • Download URL: deepvelo-0.2.8.tar.gz
  • Upload date:
  • Size: 70.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.7.12 Linux/4.15.0-213-generic

File hashes

Hashes for deepvelo-0.2.8.tar.gz
Algorithm Hash digest
SHA256 979950f81d8d0ac9952dac3fc9968c64daeac2a64c5e8f28acaf9b26ca32356d
MD5 01cc23accb56cf76deb9a2728df04577
BLAKE2b-256 d0d703a1d9d8d2cb964c82c7a6835d5348d3f30f32084be0f8e05cbdef13ce3a

See more details on using hashes here.

File details

Details for the file deepvelo-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: deepvelo-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 79.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.7.12 Linux/4.15.0-213-generic

File hashes

Hashes for deepvelo-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 aca9b7bc5004cdddd66713368983998b84d0f14c523d86f36d4375cfffe677dc
MD5 a12c260952b6b46524f399b044c49e14
BLAKE2b-256 9b057c80ce586faad28061e03d495d59a49488d5b2ceffaa6fbe841e8a2f590c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page