dynamo.pd.KO

dynamo.pd.KO(adata, KO_genes, vecfld=None, vf_key='VecFld', basis='pca', emb_basis='umap', velocity_ko_wt_difference=False, add_ko_basis_key=None, add_embedding_key=None, store_vf_ko=False, add_vf_ko_key=None, return_vector_field_class=True)[source]

In silico knockout genes (and thus the vector field function) and prediction of cell fate after knockout.

Parameters
  • adata (AnnData) – an Annodata object with the vector field function for PCA learned.

  • KO_genes (Union[str, list]) – The gene or list of genes that will be used to perform in-silico knockout.

  • vecfld (Optional[Callable]) – The vector field function.

  • vf_key (str) – A key to the vector field functions in adata.uns.

  • basis (str) – The basis in which the vector field function is created.

  • emb_basis (str) – The embedding basis where the perturbed (KO) vector field function will be projected to.

  • velocity_ko_wt_difference (bool) – Whether to use the difference from perturbed (KO) vector field to wildtype vector field in embedding space instead of raw perturbation (KO) vector field. Using the difference may reveal the perturbation (KO) effects more clearly.

  • add_ko_basis_key (Optional[str]) – The key name for the velocity corresponds to the basis name whose associated vector field is perturbed (KO).

  • add_embedding_key (Optional[str]) – The key name for the velocity corresponds to the embedding name to which the high dimensional perturbed (KO) vector field will be projected to.

  • store_vf_ko (bool) – Whether to store the perturbed (KO) vector field function. By default it is False.

  • add_vf_ko_key (Optional[str]) – The key to store the perturbed (KO) vector field function in adata.uns.

  • return_vector_field_class (bool) – Whether to return the perturbed (KO) vector field class. By default it is True.

Returns

  • If return_vector_field_class is True, return the perturbed (KO) vector field class and update objected with

  • perturbed (KO) vector field in both the PCA and low dimension space. If return_vector_field_class is False,

  • return nothing but updates the adata object.