bunnech / cellot

Learning Single-Cell Perturbation Responses using Neural Optimal Transport
BSD 3-Clause "New" or "Revised" License
113 stars 11 forks source link

Generating predictions using CellOT #3

Closed yanwu2014 closed 7 months ago

yanwu2014 commented 1 year ago

Hi!

I wasn't able to find a way to generate predicted expression values using a trained CellOT model, do you have a script to do so?

Thanks, Yan

bunnech commented 7 months ago

In general, you can follow the code in the evaluation script (https://github.com/bunnech/cellot/blob/main/scripts/evaluate.py). Make sure that you are loading the right model, i.e., in case you use an autoencoder embedding, load both the trained autoencoder and the trained CellOT model. Also make sure that your configs are set correctly, i.e., the config file contains the correct path to the trained autoencoder. Then encoding the data is handled within the load_data function, i.e., specifically in this line. So your test data of interest need to be passed here. Once you loaded all your inputs including models and data, you transport your cells of interest into the perturbed state as done here, and lastly decode your predictions as done in this line.

Hope this helps!