simslab / scHPF

Single-cell Hierarchical Poisson Factorization
BSD 2-Clause "Simplified" License
66 stars 10 forks source link

How to reconstruct expression matrix from cell scores and gene scores #17

Open iUser1234 opened 4 years ago

iUser1234 commented 4 years ago

Hi,

I've been exploring my datasets with scHPF and it looks very promising. Thanks a lot for developing this!

One thing I'm interested in, however, is reconstructing the expression matrix from the cell scores and gene scores. As I understand it, you define each gene and cell's score for a factor k as the expected values of its factor loading multiplied by the budgets. This means that I won't be able to reconstruct the matrix by multiplying the cell and gene scores, but rather that I first have to divide the score by the budget. However, I cannot find any stored information for the budgets. I am thus wondering if you could explain how I could go about in reconstructing the expression matrix.

The reason I am interested in this is because I'd like to use the similarities between the reconstructed matrix and original matrix as a robust metric for finding the suitable number of factors.

Thanks!