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

Could PyWGCNA draw Hierarchical cluster tree? #40

Closed ZivTQ closed 1 year ago

ZivTQ commented 1 year ago

Hi Thanks for your works. I have a question. Could PyWGCNA draw Hierarchical cluster tree? Cluster tree of genes and annotated modules. I did not find in tutorials.

Thanks!

1684898522796

nargesr commented 1 year ago

Hi,

Thank you :)

There is no function to do that but you can plot it by yourself since all the information is already calculated and saved in the object. The module color is saved as a column moduleColors in the PyWGCNA.datExpr.var along with other gene information The information you need for the dendrogram is saved in the PyWGCNA.geneTree. you can use scipy.cluster.hierarchy.dendrogram function to plot the dendrogram

for more information please look at the issue #6