xia-lab / MetaboAnalystR

R package for MetaboAnalyst
Other
318 stars 157 forks source link

CalculateHyperScore function is not working with KEGG pathway as library #299

Open gajamatassa opened 8 months ago

gajamatassa commented 8 months ago

Hi all,

Thanks for your amazing package!

I am doing an enrichment analysis using MetaboAnalystR v4.0.0. I am using metabolites' Kegg Ids.

This is my code:

mSet<-InitDataObjects("conc", "msetora", FALSE)
mSet<-Setup.MapData(mSet, cmpd.vec_kegg)
mSet<-CrossReferencing(mSet, "kegg")
mSet<-CreateMappingResultTable(mSet)
mSet<-Setup.KEGGReferenceMetabolome(mSet, "~/background_kegg.txt")
mSet<-SetMetabolomeFilter(mSet, T)
mSet<-SetCurrentMsetLib(mSet, "kegg_pathway", 2)
mSet<-CalculateHyperScore(mSet)
mSet<-PlotORA(mSet, "ora_kegg_", "net", "png", 72, width=NA)

When running CalculateHyperScore(mSet) it prints: "Loaded files from MetaboAnalyst web-server." but then it is stuck... it doesn't give any error but never stops running. I took a look at how the function is implemented: the tosend.rds object is actually created and saved, maybe there is a problem with my.hyperscore.kegg() and thus the API? msea_time_result.csv is not created.

I hope you can help me understand why I am having trouble in proceeding.

Thanks for your time and help :)

Tony4709 commented 7 months ago

I encountered the same problem. After about 15mins, the results can be obtained. I think it's the server problem that makes it too inefficient.

gajamatassa commented 7 months ago

@Tony4709 Thank you very much for your answer! Actually after about a quarter of hour it worked for me too. I hope they will solve this problem of poor efficiency...