rsinghlab / scNODE

scNODE: Generative Model for Temporal Single Cell Transcriptomic Data Prediction
MIT License
16 stars 2 forks source link

Some questions about perturbation experiments #3

Open UCASMXS opened 5 days ago

UCASMXS commented 5 days ago

Hi, in the process of running the perturbation experiment script (1_Perturbation_Analysis.py) needs to be loaded (zebrafish-all-scNODE-aux_data.npy), but the document (zebrafish-all-scNODE-aux_data.npy) always fails to load, as if the document has been corrupted. Could you kindly help verify and confirm the solution?

JQZ-Brown commented 5 days ago

Can you show me the logs when the script breaks down?

Some issues I can imagine are:

  1. If the file is broken, try to use this one (https://drive.google.com/file/d/1U4VBQ6Xvd-OyqruOx8PQjKFq8LWCJKXL/view?usp=sharing).

  2. If the numpy breaks down when loading the file. It may be due to the version compatibility. I used numpy 1.19.5. Make sure to use the same version in your environment.

  3. I just noticed the script requires loading the trained model states. You can download the state dict file from here (https://drive.google.com/file/d/1sRN989wF7_tuplC92RdvzDsK2pLGmL71/view?usp=drive_link). Line 615 needs to load this.

Let me know if the problem in your case is not listed above!

UCASMXS commented 5 days ago

zebrafish-all-scNODE-aux_data_update npy Thanks for the above solutions you offered, I used the new file source and ran it with numpy 1.19.5, but it still can't be load. Here's my logs when the script breaks down, I hope you can give some enlightenments . At the same time, I would like to know, how did this file come about. Maybe I can generate the file by myself. Thanks again.

JQZ-Brown commented 4 days ago

I have just uploaded a script to compute the aux data (downstream_analysis/Compute_Aux_Data.py) from scratch. It trains the model and computes three data:

  1. latent_seq: VAE latent variables at each timepoint.
  2. umap_latent_data: UMAP visualization of latent variables at each timepoint.
  3. umap_model: the corresponding UMAP model.

I also updated the 1_Perturbation_Analysis.py script from Line 620-627. We only need the above three auxiliary data in the perturbation analysis.

Let me know if there are more problems.

UCASMXS commented 4 days ago

Thanks for your help, I've generated a working script (zebrafish-all-scNODE-aux_data.npy), and run through the script for the perturbation experiment. Thank you very much again.