Closed valarauko closed 2 years ago
hey @valarauko thanks for using dynamo. To predict the effects of genetic perturbation, we will need to use the learned vector field in PCA space and that is the fundamental reason that we can only use PCA genes for predictions.
However, you can still add any gene of interests as part of the pca gene
set when using recipe_monocle, using something like the following:
dyn.pp.recipe_monocle(
adata,
genes_to_use=selected_genes_to_use, # set pca genes as your genes of interests
genes_to_append=your_genes_of_interests, # or add gene here
n_top_genes=len(selected_genes_to_use),
# feature_selection_layer="new",
maintain_n_top_genes=True,
)
Pleasecheck the documentation of recipe_monocle
for additional information https://dynamo-release.readthedocs.io/en/latest/_autosummary/dynamo.pp.recipe_monocle.html#dynamo.pp.recipe_monocle
with such, then you can calculate RNA velocity, learn vector field and eventually use dynamo to predict the cell fate diversions after genetic perturbation with any genes of your interests. Hope this solves your problem!
Thank you for the prompt reply! Yes, passing the list of genes of interest via the reciple_monocle
allows me to project the perturbations for the genes. Thank you so much!
I hope it's OK for me to ask some related questions here.
adata.obsm['j_delta_x_perturbation']
across different disruption experiments?prediction (pd)
submodule is currently inaccessible, which makes it harder to understand the format of the perturbation output.thanks for the two additional questions. Because of my crazy time schedules, let me briefly answer you here:
adata.layers['j_delta_x_perturbation']
stores the results of the perturbation effects after the in silico perturbation for each gene in each cell. you can use this matrix for any differential analyses ?dyn.pd.predictions
to see the documentation. I will fix the readthedocs issue when I get some free time. you are welcoem to help on this regard too. @valarauko the API has updated: https://dynamo-release.readthedocs.io/en/latest/API.html
Thank you for this excellent tool!
In trying the perturbation function, I see it’s restricted to only PCA genes. Is there a way to run a perturbation workflow on genes that aren’t part of the PCA genes?