Open HelloWorldLTY opened 1 year ago
Hi, as far as I can see, the problem is in your RNA data input that it contains NaN values.
Can you actually check if that's the case?? And if yes, I believe changing these NaN values to zeros should solve it.
Cheers
Hi, I have checked. My rna input does not contain NaN, since I can run gimvi and tangram. And
np.sum(np.isnan(RNA_data.T.values)*1)
output is 0.
I think I figure out the reason. I need to filter low expression genes. However, if my target gene is low expressed, what should I do? Thanks.
Hi, I have checked. My rna input does not contain NaN, since I can run gimvi and tangram. And
np.sum(np.isnan(RNA_data.T.values)*1)
output is 0.
I think I figure out the reason. I need to filter low expression genes. However, if my target gene is low expressed, what should I do? Thanks.
Yes, you are correct. The problem lies with some genes having a 0 expression in all the cells. Since SpaGE uses z-score normalization too, it causes the std deviation to be 0, which further causes NaN values (0 in the denominator). To filter out genes with all 0s (keep lowly expressed genes intact), you can use-
Genes_count = np.sum(RNA_data > 0, axis=1) RNA_data = RNA_data.loc[Genes_count >0, :]
I've created a pull request where Common_data itself filters out the genes with NaN values in all the cells (after z-score)
Hi, in the model fitting step, I notice that there is a problem:
Could you please help me address this problem? Thanks a lot.