Question regarding post-perturbation Cell × Embedding matrix extraction
Hello,
Thank you for your support with this tool. I am interested in extracting cell embeddings after a gene perturbation has been applied.
Specifically, once a gene is overexpressed or deleted and the embeddings are recalculated, is it possible to retrieve the Cell × Embedding matrix for the perturbed state? The current function appears to return the cosine_shift results, but I am looking for the raw post-perturbation embeddings for the cells processed.
I look forward to hearing from you!
Best regards,
Thank you for your question. You can apply the perturbation to your data and run it through the EmbExtractor to get the perturbed embedding. Of note, if you only remove 1 gene from the total 4096, for example, the embedding will not shift a large amount. It's as if you are applying a perturbation to cells and collecting them right after the inhibition starts before all the downstream effects. So what's more meaningful is the direction of the shift towards a goal state, or the relative magnitude compared to the deletion of other random genes. For this reason, the perturbed embedding by itself is not as informative as the cosine shift between the unperturbed and perturbed embeddings.