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
217 stars 53 forks source link

module_trait_relationships_heatmap #102

Closed bsb2014 closed 5 months ago

bsb2014 commented 6 months ago

PyWGCNA will consider each variable as a single bool trait when more than two variables, such as time points (4mon, 8mon, 12mon, 18mon). I am not sure how to interpret the p-value and correlation for the 4mon. Are the correlation and p-value calculated by comparing 4mon [1] vs other time points [0] (e.g. 4mon vs (8mon+12mon+18mon))? Is that a Pearson correlation? Thanks.

bsb2014 commented 6 months ago

Another Q, how to extract the eigengenes for the correlation? Thanks.

nargesr commented 6 months ago

Hi @bsb2014,

Yes! if you pass them as string it would be one variable versus others. and yes it’s a Pearson correlation calculated through stats.pearsonr.

self.MEs contains the eigengenes.

bsb2014 commented 6 months ago

Please tell me how to use self.MEs? Thanks

I did as

import PyWGCNA pyWGCNA_test = PyWGCNA.readWGCNA("test.p") print(pyWGCNA_test.self.MEs)

AttributeError: 'WGCNA' object has no attribute 'self'

nargesr commented 6 months ago

pyWGCNA_test.MEs