Open bsb2014 opened 1 year ago
Hi @bsb2014
you can extract the correlation using self. moduleTraitCor
and corresponding p-value from self. moduleTraitPvalue
.
can you explain more about what you mean by MM and GS scores?
best, Narges
Thanks for your prompt response.
GS : Gene Significance MM: Module Membership
Hi Narges
I am a newbie in Python, could you please give me more help with the self.moduleTraitCor/self.moduleTraitPvalue?
I tried the codes below
pyWGCNA_ASM1 = PyWGCNA.readWGCNA("ASM.p") pyWGCNA_ASM1.self. moduleTraitCor.head(5)
and got an error saying [AttributeError: 'WGCNA' object has no attribute 'self']
Thanks
for module membership, you can use this function called: CalculateSignedKME()
Unfortunately, I didn’t implement the GS yet, if you know how to calculate it and you can send it to me as a function I would be happy to add it to the PyWGCNA.
self would be the name of your object which in your case is pyWGCNA_ASM1, so your code would be something like that:
pyWGCNA_ASM1 = PyWGCNA.readWGCNA("ASM.p")
pyWGCNA_ASM1.moduleTraitCor.head(5)
I need it as a Python function if you want to add it to the package.
Dear Narges,
We are also looking for GS and MM calculation. I see that you set that issue as enhancement, do you have any function to perform that ?
In addition, is there a way to export the model to R ? It would be nice to be able to export some parts of your tool to R to use all the functions from WGCNA.
Thx for all the work
Best
Rémy
Hi @SgtVil
For module membership, you can use this function called: CalculateSignedKME()
Right now I don't have any plan to add new features unless somebody provides the body of the function and I'm happy to review it and add it to the package.
about your second question, if you look at WGCNA API, you can grab any table you want and save it as a CSV table and read it again in the R. I tried to use the same name as the reference, so you should be able to find the value you are looking for.
Hi, Narges 1) is there any way to extract the data used for the module-trait plotting?
2) How to extract genes with their MM and GS scores in each module?
Thanks!