QihuangZhang / CeLEry

CeLEry: cell location recovery in single-cell RNA sequencing
MIT License
26 stars 3 forks source link

Problems with Predict_domains #2

Closed tvegawaichman closed 1 year ago

tvegawaichman commented 1 year ago

Hello! Thank you very much for this tool! I'm trying to apply domain prediction using Stereo-seq and single-cell sequencing. I followed this tutorial: https://github.com/QihuangZhang/CeLEry/blob/main/tutorial/tutorial.md However, I've noticed that in my results, all my cells are always being assigned to the last category in my spatial annotation (I know where they should map), and the prediction probability matrix is a matrix with 1 in every i, j. I'm not sure if this is related, but in every epoch (I ran it for 500 epochs), the loss becomes NaN.

Epoch:1, Loss:nan
Epoch:2, Loss:nan
Epoch:3, Loss:nan
Epoch:4, Loss:nan
Epoch:5, Loss:nan
Epoch:6, Loss:nan
Epoch:7, Loss:nan

I would appreciate it if you could help me determine if I'm making a mistake.

Thank you!

QihuangZhang commented 1 year ago

It appears the issue might stem from the training procedure. Could you please verify that your original datasets don't contain any missing values or NaN entries?

tvegawaichman commented 1 year ago

Hello! Thank you for the response. Yes, I have noticed that the cel.get_zscore(ad_sp) is generating NA values. What do you recommend for treating these genes? Should I remove them?

QihuangZhang commented 1 year ago

cel.get_zscore() will take the normalization for each gene. If it is generating NA, it is very likely that these genes have zero variability (i.e., they are completely identical). I would suggest removing these genes as they provide no information in differentiating spatial location.

tvegawaichman commented 1 year ago

Perfect, thanks!