mortazavilab / PyWGCNA

PyWGCNA is a Python package designed to do Weighted Gene Correlation Network analysis (WGCNA)
https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/btad415/7218311
MIT License
192 stars 46 forks source link

UnboundLocalError: cannot access local variable 'merge' where it is not associated with a value #57

Closed li1553770945 closed 11 months ago

li1553770945 commented 11 months ago

In wgcna.py line 308, if the shape of MEDiss is (1,1), then the variable merge will be used before define. image image

nargesr commented 11 months ago

I believe this means that you probably ended up having one module at the end. If you want, you can send me your input to check that.

I will fix this error to pop up as a warning in the next release

li1553770945 commented 11 months ago

I have uploaded my data to google driver, thanks!

nargesr commented 11 months ago

Hi,

I was able to run PyWGCNA on the dataset you provided! I would suggest checking the version of all your other packages which I listed mine here also, the Python version I have is 3.10.4

li1553770945 commented 11 months ago

Thanks for your reply, I will try to run again after changing the python version.