Open victorsanchezarevalo opened 1 week ago
hi @victorsanchezarevalo
Thank you for your detailed issue.
Can you tell me if you ever did any preprocessing on your WGCNA object, besides running the Quick_start notebook??
I do not think I ever converted the type of self.datExpr.var.moduleColors
to Categorical data
when it should have been 'object', which might explain why I wasn't able to reproduce the error.
Also if you can share the whole script you used for making the object, I can look at it more deeply
Hi,
I have sent yoy by e-mail the script.
Thanks a lot!
Vic
Error in Functional Enrichment Analysis: Cannot Set New Category on Categorical Variable
Description:
While running functional enrichment analysis for the "silver" module using
wgcna.functional_enrichment_analysis()
with Gene Ontology (GO) sets, I encountered the following error:This error occurs when the function tries to handle a categorical variable without ensuring that the category exists beforehand. Specifically, it seems related to attempting to assign a new category to the
moduleColors
column.Code Snippet:
Full Traceback:
Steps to Reproduce:
functional_enrichment_analysis
using a gene set library such as GO with a specific module name (e.g., "silver").moduleColors
variable.