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
209 stars 48 forks source link

principal component calculation for module black failed with the following error: #36

Closed mgb217 closed 1 year ago

mgb217 commented 1 year ago

Hi,

I closed #35 by mistake. I change a compute node. There is no 'ValueError: Linkage 'Z' contains negative distances'. But I got another error when running it follows 'Quick start':

import PyWGCNA geneExp = '5xFAD_paper/expressionList.csv' pyWGCNA_5xFAD = PyWGCNA.WGCNA(name='5xFAD',species='mus musculus',geneExpPath=geneExp,outputPath='',save=True) Saving data to be True, checking requirements ... Figure directory does not exist! Creating figure directory! pyWGCNA_5xFAD.preprocess() Pre-processing... Detecting genes and samples with too many missing values... Done pre-processing..

pyWGCNA_5xFAD.findModules() Run WGCNA... pickSoftThreshold: calculating connectivity for given powers... will use block size 1876 Power SFT.R.sq slope ... mean(k) median(k) max(k) 0 1 0.368857 -0.481613 ... 2444.750756 2260.416614 5665.102661 1 2 0.7253 -0.99165 ... 840.665489 673.081241 3009.058821 2 3 0.791986 -1.194264 ... 385.685335 258.451265 1916.810605 3 4 0.835392 -1.3419 ... 207.404152 113.456087 1332.762771 4 5 0.853842 -1.472183 ... 123.232581 54.784481 984.036824 5 6 0.870673 -1.553348 ... 78.455923 28.47124 752.959999 6 7 0.886736 -1.600869 ... 52.572016 15.594822 591.514192 7 8 0.896672 -1.639343 ... 36.65884 9.454046 475.817182 8 9 0.903531 -1.677747 ... 26.397061 6.024431 389.237531 9 10 0.906045 -1.706474 ... 19.521431 3.975959 322.823838 10 11 0.905582 -1.731076 ... 14.767291 2.623921 270.867416 11 13 0.914482 -1.751347 ... 8.941254 1.205108 196.222414 12 15 0.912684 -1.771227 ... 5.759987 0.568044 146.575349 13 17 0.912188 -1.774908 ... 3.905403 0.273242 112.189052 14 19 0.907649 -1.774186 ... 2.766824 0.135454 87.594344

[15 rows x 7 columns] Selected power to have scale free network is 9. calculating adjacency matrix ... Done..

calculating TOM similarity matrix ... Done..

Going through the merge tree... ..cutHeight not given, setting it to 0.996 ===> 99% of the (truncated) height range in dendro. Done..

Calculating 22 module eigengenes in given set... ..principal component calculation for module black failed with the following error: ..hub genes will be used instead of principal components. Error!

nargesr commented 1 year ago

Hi, I still need your pickle file or your input matrix. My email address is nargesr@uci.edu

nargesr commented 1 year ago

Hi again,

You sent me the dataset, I provided in the tutorials! I'm defiantly able to run that without any errors!

I was thinking you faced this issue on your expression data set!

If you couldn't able to run it on the tutorials, I would check if you have the latest versions or not and also if all the dependencies installed without any error