CostaLab / scopen

scOpen: single-cell open chromatin analysis via NMF modelling
GNU General Public License v3.0
25 stars 4 forks source link

ValueError: Negative values in data passed to NMF #16

Closed Dominic7227 closed 1 year ago

Dominic7227 commented 2 years ago

Hi, I tried the command scopen on my count data (all integers and non-negative), but it threw an error that there exist negative values for NMF input. Then I checked the TF-IDF function you used in the source code, and it showed that the TF-IDF transformation would produce negative values. image

lzj1769 commented 2 years ago

Hi @Dominic7227

Can you provide me with the count data? So I can figure it out. You can replace all the cell and peak names with a random name if you want.

Thanks

fl-yu commented 12 months ago

encounter the same issue..

SidG13 commented 6 months ago

Hi @lzj1769 , I'm encountering the same issue as previous commenters. I installed scopen v1.0.1 (the newest version) from pip. I'm running this on python3.8. I've already checked that my entire input matrix is non-negative. Could you please let me know what you did to fix this?

Dududu233 commented 4 months ago

encounter the same issue..

Dududu233 commented 3 months ago

The problem is solved. You should make sure that your matrix does not contain reads larger than 128, otherwise this statement in utils.py will not work properly. image