xia-lab / MetaboAnalystR

R package for MetaboAnalyst
Other
313 stars 155 forks source link

QEA: Problem connecting to API server #257

Open luisebe opened 1 year ago

luisebe commented 1 year ago

Hello! I have been trying to get the code to work for my data set (i remodelled it after the example data set on cachexia), however, the CalculateGlobalTestScore() function does not seem to work for me. I get the following error message:

mSet<-CalculateGlobalTestScore(mSet)
[1] “Loaded files from MetaboAnalyst web-server.”
[1] “Failed to connect to the API Server!”
[1] “Error! Joint Pathway Analysis via api.metaboanalyst.ca unsuccessful!”
Error in mSetObj$analSet : $ operator is invalid for atomic vectors

as far as i could tell, the commands upstream of this command in the vignette worked fine. however, the labels (diseased, healthy) do not appear after running Read.TextData(), only the sample and the metabolite names. Maybe that might be an additional issue? how could i include the labels into the code so that they are recognized in the downstream analyses?

could anyone help me out here? much appreciated!

Thanks in advance and greetings from Vienna, Luise Bellach

Cao-art commented 1 year ago

I get the error ,too.

snaketron commented 1 year ago

same here

linlin0026 commented 1 year ago

same question

luisebe commented 1 year ago

Dear @xia-lab - i have looked into the CalculateGlobalTestScore() function to see where the issue might lie. Within this function, the function MetaboAnalystR:::.prepare.globaltest.score tries to get the file "util_api.Rc" via MetaboAnalystR:::.load.scripts.on.demand("util_api.Rc") . However, the file whithin your package is named "util_api.R" (https://github.com/xia-lab/MetaboAnalystR/tree/master/R), is it possible that the issues we face come from this typo or is developer ".Rc" format necessary? Thank you in advance.

I am dearly looking forward to your answer as my analyses may be concluded with this QEA. Best, Luise Bellach

lisbeth-dot-95 commented 1 year ago

I had the same issue. It worked fine in the beginning, but after some time (no updates or new packages) the "kegg_pathway" was not reachable anymore!

lisbeth-dot-95 commented 1 year ago

For me, reinstalling MetaboAnalyst solved the problem!