Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gofilter function ERROR: object 'topNode' not found #728

Open
yulchen810 opened this issue Sep 29, 2024 · 1 comment
Open

gofilter function ERROR: object 'topNode' not found #728

yulchen810 opened this issue Sep 29, 2024 · 1 comment

Comments

@yulchen810
Copy link

Hi,
I encounter an ERROR when running gofilter, the input generated from compareCluster function.
Did anyone meet this before?

image

@guidohooiveld
Copy link

guidohooiveld commented Sep 29, 2024

I can reproduce this error.

The information on the help page of gofilter is rather limited, but if you run this function on the output of GO enrichment analysis of a single experiment, it becomes clear that gofilter does not work when ont=ALL. In other words, gofilter only works on the level of a specific root category (i,e, one of BP, CC or MF).

Yet, if multiple experiments are analyzed with compareCluster, this results in the error your reported, even when specifying one of the 3 root categories.... See below.

@GuangchuangYu : could you, or one of your team members, have a look at this?


> library(clusterProfiler)
> data(gcSample)
> 
> ## First apply gofilter to a single list of input genes.
> ## Doesn't work with ont=ALL, only when a specific root category is defined
> 
> yy <- enrichGO(gcSample[[1]], 'org.Hs.eg.db', ont="ALL", pvalueCutoff=0.05)
> compGO_filtered <- gofilter(yy, level=4)
Error in get_go_ontology(x) : 
  ontology should be one of 'MF', 'BP', 'CC'...
> 
> ## limit to only CC ontologies
> ## works!
> yy <- enrichGO(gcSample[[1]], 'org.Hs.eg.db', ont="CC", pvalueCutoff=0.05)
> compGO_filtered <- gofilter(yy, level=4)
> 
> 
> 
> 
> ## analyze multiple input lists with compareCluster
> compGO <- compareCluster(gcSample, fun="enrichGO",
+                      OrgDb="org.Hs.eg.db", ont="ALL", pvalueCutoff=0.05)
> compGO_filtered <- gofilter(xx, level=4)
Error in getGOLevel(ont, level) : object 'topNode' not found
> 
> ## limit to only CC ontologies
> ## still an error!
> compGO <- compareCluster(gcSample, fun="enrichGO",
+                      OrgDb="org.Hs.eg.db", ont="CC", pvalueCutoff=0.05)
> compGO_filtered <- gofilter(xx, level=4)
Error in getGOLevel(ont, level) : object 'topNode' not found
> 
> 
> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants