Skip to main content

Evolutionary velocity with protein language models

Project description

Evolocity implements evolutionary velocity (evo-velocity), which models a protein sequence landscape as an “evolutionary vector field” by using the local evolutionary predictions enabled by language models to enable global evolutionary insight.

'Evolocity overview'

Evo-velocity uses the change in languge model likelihoods to estimate directionality between two biological sequences. Then, over an entire sequence similarity network, this procedure is used to direct network edges. Finally, network diffusion analysis can identify roots, order sequences in pseudotime, and identify mutations driving the velocity.

Evolocity is a fork of the scVelo tool for RNA velocity and relies on many aspects of the Scanpy library for high-dimensional biological data analysis. Like Scanpy and scVelo, evolocity makes use of anndata, an extremely convenient way to store and organizing biological data.

Quick Start

Installation

You should be able to install evolocity using pip:

python -m pip install evolocity

API example

Below is a quick Python example of using evolocity to load and analyze sequences in a FASTA file.

import evolocity as evo
import scanpy as sc

# Load sequences and compute language model embeddings.
fasta_fname = 'data.fasta'
adata = evo.pp.featurize_fasta(fasta_fname)

# Construct sequence similarity network.
evo.pp.neighbors(adata)

# Run evolocity analysis.
evo.tl.velocity_graph(adata)

# Embed network and velocities in two-dimensions and plot.
sc.tl.umap(adata)
evo.tl.velocity_embedding(adata)
evo.pl.velocity_embedding_grid(adata)
evo.pl.velocity_embedding_stream(adata)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

evolocity-0.2-py3.7.egg (197.9 kB view details)

Uploaded Source

File details

Details for the file evolocity-0.2-py3.7.egg.

File metadata

  • Download URL: evolocity-0.2-py3.7.egg
  • Upload date:
  • Size: 197.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.9

File hashes

Hashes for evolocity-0.2-py3.7.egg
Algorithm Hash digest
SHA256 d11fec0f7d34e8a65b7cc9ee4e8affd53e3841d204b4fc156d2447747b16ef61
MD5 1cffd96b75c48479a0a4fff72bdaa7cc
BLAKE2b-256 2ccfaa727fbf71218bce89cd01ea5c07c7b6105ea4b7a7b6a75276a3f1b79739

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