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

Re-naming modules #95

Closed NezaCankar closed 3 months ago

NezaCankar commented 6 months ago

Hi, Narges

Error 1- When running .analyseWGCNA, the code automatically assigns modules called “dimgrey”, “lightgrey”, “darkgrey” etc. My attempt was to manually change those. However, after changing columns "moduleColors" and "dynamicColors", in "pyWGCNA_dataframe.datExpr.var" and running pyWGCNA_dataframe.analyseWGCNA, there is a following error:

Error 1

Few more questions: Q1: When doing functional enrichments (EnrichR), what is a current setting for considering background gene/protein list? If whole genome, would it be possible to consider custom background (eg. all detected genes/proteins in a specific dataset)? Q2: Is it possible to extract the p-value (significance) for specific module (eg. to see which module is the most significant compared to the rest)? Q3: Is it possible to extract the Eigengene values for each of the detected modules?

Thanks so much!

Best, Neza

nargesr commented 6 months ago

Hi @NezaCankar

According to the error, you need to also change the index in self.datME. I will try to add a change module color function in the next release but it will take some time so meanwhile you can try to change the color in self.datME.

about other questions: Q1: Default is without any background but you can add your customer background. please look at the API documentation and GSEAPY package for more information about how you should pass your background.

Q2: I didn't get your question completely! based on what value do you want to compare your modules?

Q3: Yes! Eigengene values are stored in self.datME.