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
194 stars 47 forks source link

AttributeError when running #28

Closed FelipeMelis closed 1 year ago

FelipeMelis commented 1 year ago

I get this error when I run the .findModules() I already installed all the requirements

EDIT: The test work ok, but doesn't work with data that I downloaded EDIT: I already solve it

Going through the merge tree...
..cutHeight not given, setting it to 0.082  ===>  99% of the (truncated) height range in dendro.
cutHeight set too low: no merges below the cut.
Traceback (most recent call last):
  File "/Users/fmelis/Documents/Doctorado/Tesis/phd-thesis/__main__.py", line 21, in <module>
    main()
  File "/Users/fmelis/Documents/Doctorado/Tesis/phd-thesis/__main__.py", line 17, in main
    test(dataset)
  File "/Users/fmelis/Documents/Doctorado/Tesis/phd-thesis/core/wgcna.py", line 9, in test
    pyWGCNA_5xFAD.findModules()
  File "/Users/fmelis/opt/anaconda3/envs/wgcna/lib/python3.10/site-packages/PyWGCNA/wgcna.py", line 297, in findModules
    self.datExpr.var['dynamicColors'] = WGCNA.labels2colors(labels=dynamicMods)
  File "/Users/fmelis/opt/anaconda3/envs/wgcna/lib/python3.10/site-packages/PyWGCNA/wgcna.py", line 1860, in labels2colors
    if all(isinstance(x, int) for x in labels.Value):
  File "/Users/fmelis/opt/anaconda3/envs/wgcna/lib/python3.10/site-packages/pandas/core/generic.py", line 5575, in __getattr__
    return object.__getattribute__(self, name)

AttributeError: 'DataFrame' object has no attribute 'Value'. Did you mean: 'values'?
nargesr commented 1 year ago

Hi, is it already solve? what was the issue then?

FelipeMelis commented 1 year ago

Hi, is it already solve? what was the issue then?

Sorry was an error with the input dataframe, using one with samples as columns.