Spatial Velocity Entrain Analysis
get_velocity_ligands_spatial.Rd
Python function takes in a dataset containing velocities, an accompanying spatially resolved dataset, and predicts ligands in spatial proximity that may be driving the observed velocities.
Usage
get_velocity_ligands_spatial(
adata,
adata_st,
velocity_cluster_key = "velocity_clusters",
vclusters = None,
ligand_target_matrix = None,
tangram_result_column = "velocity_label_transfer",
expression_proportion_cutoff = 0.05,
organism = "human",
n_jobs = 4,
n_top_genes = None
)
Arguments
- adata
An anndata object containing velocities calculated with
scvelo
- adata_st
An anndata object containing spatially resolved data.
- velocity_cluster_key
Column name in
adata.obs
denoting velocities clustered byentrain.cluster_velocities()
- vclusters
Default None. If you would like to limit the analysis to a set of velocity clusters, you can define them here as an array.
- ligand_target_matrix
NicheNet database
- tangram_result_column
Default
"velocity_label_transfer"
. Name of the column in adata where we will put the results of the label transfer.- expression_proportion_cutoff
Default 0.05. Population fraction threshold for including a ligand or receptor for Entrain analysis. A ligand or receptor is only included in analysis if it is expressed above this proportion. Specifically, if this is set to 0.05, a ligand or receptor is included in analysis if it has > 0 counts in 5% of cells in
adata.X
, whereadata
is subset to the cells belonging to the velocity cluster (for receptors); or spots belonging to the immediate spatial environment of the velocity cluster (for ligands).- organism
Default
"human"
. Either one of"human"
or"mouse"
. This argument feeds into omnipath-pypath module to convert human genes into mouse genes, if "mouse" is specified.- n_jobs
Default 4. Number of parallel jobs to use for
scvelo.tl.recover_dynamics()
- n_top_genes
Default
None
. Number of top velocity genes to consider for each cluster forscvelo.tl.recover_dynamics()
.