Skip to contents

run_scVelo calculates RNA velocity using the python scvelo package and the velocity models it implements.

Usage

run_scVelo(
  anndata_file,
  anndata_out_filename,
  conda_env = "scicsr",
  scvelo_mode = "dynamical",
  reduction = "UMAP",
  min_shared_counts = 20,
  n_top_genes = 2000
)

Arguments

anndata_file

filename pointing to the AnnData file containing gene expression data and merged velocyto spliced/unspliced gene counts.

anndata_out_filename

output filename of the merged AnnData object to be written the fitted RNA velocity estimates calculated using scvelo.

conda_env

character, if not NULL this named conda environment is used to run scVelo. (Default: 'scicsr'). If NULL, no conda environment will be used, the program assumes the python packages scanpy and scvelo are installed in the local python)

scvelo_mode

the 'mode' parameter in the python scvelo function scv.tl.velocity. (Default: "dynamical")

reduction

the dimensionality reduction to project RNA velocity estimates onto (Default: "UMAP")

min_shared_counts

include only genes detected in at least this number of cells. (Default: 20)

n_top_genes

include only this many genes with the largest dispersion in the dataset (Default: 2000)

Value

a output message indicating success of writing out the AnnData object with merged scVelo results into the file given by anndata_out_filename.

Details

run_scVelo uses the R reticulate package to run python commands which run scvelo RNA velocity calculations. It follows the ["RNA Velocity Basics"](https://scvelo.readthedocs.io/VelocityBasics/) tutorial in the scvelo documentation. Unfortunately due to conflicts of the plotting functionalities of R and python this function does **NOT** implement the visualisation of velocity stream onto the dimensionality-reduced projection.