Closed zaki-bds closed 4 months ago
Hi @zaki-bds, it seems like your counts DataFrame doesn't have a numeric type. Can you try casting your counts like this?
dds = DeseqDataSet.DeseqDataSet(counts = counts_on_off.astype("float64").transpose(), # change this line
clinical = metadata.set_index('ID'),
design_factors = "condition",
refit_cooks=False)
dds.deseq2()
Hi Boris!
Thank you so much for your prompt response. I tried that and it gave me the exact same error. I had also tried ".astype(int)" and that did not solve it. As well as dropping all rows with all zero counts.
I also tried rerunning one of my older workbooks that ran pydeseq2 perfectly and it gave me the same error.
However, downgrading my pandas from v2.2.0 to v.1.4.3 (as stated in your repository readme) seemed to solve the issue. So it seems like the issue arose with a newer pandas release. I may or may not be missing some packages that the newer version of pandas are dependent on, but I will look into that later. For now this stopgap solution worked for me. If I am able to run pydeseq2 with the updated version of pandas I will update here. Thank you!
It's great that you were able to run your analysis @zaki-bds!
I'd like to understand and fix the root cause though, because in principle you shouldn't have to downgrade pandas to be able to run pydeseq2, especially since we already handled the transition to pandas 2.0...
Could you check which version of pydeseq2 you are using?
(
import pydeseq2
pydeseq2.__version__
)
Of course! Thank you so much.
My current pydeseq2 version is 0.2.1. I downgraded pandas because of the package dependencies listed on the GitHub readme page but for some reason it totally crossed my mind to try and upgrade the pydeseq2 version as well. Upgrading both pydeseq2 to the latest stable version on pip (0.4.9) and pandas (2.2.2) and everything runs smoothly!
Thanks again!
Describe the bug
I'm getting the following exception when running the following code, when I googled this, it seemed to be related to a numpy update. I currently have numpy 1.23.1
To Reproduce