saezlab / progeny-py

PROGENY Python implementation
MIT License
12 stars 3 forks source link

Progeny.run scaling error #1

Closed 321356766 closed 3 years ago

321356766 commented 3 years ago

I keep getting the following scaling error when running progeny. It occurs using my own data, as well as following the tutorial exactly as described in the example notebook.

Just to be clear, the input into progeny from an anndata object would be the adata.raw.X as a sparse matrix, correct?

Thank you

progeny.run(adata, scale=True, organism="Human", top=100)

AssertionError Traceback (most recent call last)

in ----> 1 progeny.run(adata, scale=True, organism="Human", top=100) C:\ProgramData\Anaconda3\lib\site-packages\progeny\progeny.py in run(data, scale, organism, top, inplace) 101 102 assert df.shape[1] <= 1 and scale, \ --> 103 'If there is only one observation no scaling can be performed!' 104 105 # Get progeny model AssertionError: If there is only one observation no scaling can be performed!
PauBadiaM commented 3 years ago

Hi @321356766 ,

Yes sorry, that was a bug that I added in the last commit, should be fixed now.

Just to be clear, the input into progeny from an anndata object would be the adata.raw.X as a sparse matrix, correct?

That is correct, yes

Please, run pip install --upgrade git+https://github.com/saezlab/progeny-py.git and try again, let me know if your problem is solved.

321356766 commented 3 years ago

Works great. Thank you for your efforts.