I’m trying to follow this tutorial that uses gx_get() to upload datafiles from my history (Galaxy) into the RStudio interactive tool. I’ve created multiple histories and restarted the Rstudio tool multiple times and keep getting the same debug error message pictured below.
Even thought the import 1 ect message will pop up, no data files are being imported as far as I can tell.
I tried to switch to using my desktop R studio and cannot get Galaxy Connector to install there to use gx_get(). I also get an error message that the package has a non zero exit.
I’ve seen others with this problem on the forum but a solution has not been posted.
Any idea why this is happening? I could not get the Rstudio tool to launch on the usegalaxy.org site at all. I’m not sure if that’s related.
For a local configuration, let’s get some help with the Galaxy Connector at the developers chat. They may reply here or there, and you are welcome to join the chat tool! You're invited to talk on Matrix
Updated: See solution reply instead. When I tried using Rstudio at UseGalaxy.eu directly, the gx_get() function failed the same way your query did, so the problem seems to be with Galaxy Connector. The developers can help us to confirm. Also going to ping a few of them here in case I missed something else: @wm75@bernt-matthias
Even thought the import 1 ect message will pop up, no data files are being imported as far as I can tell.
There isn’t anything wrong here, but you need to assign the return value to some variable to be able to work with it, e.g.,
my_data <- gx_get(2)
Note: gx_get() makes the specified data available inside RStudio, but what’s returned by it is just a path to the data, for example the string "/import/2".
With this path you can then read from the resource with R functions that you’d normally use to read your input, e.g., if your data is tabular you could do sth like:
For some reason I always forget that the data isn’t moved directly into the environment with gx_get()! I expect it to work like gx_put() in the reverse. Maybe we need another variable … something like gx_fetch(). I’ll propose an enhancement.