Error report on dataset import from Galaxy history into Rstudio

Hello everyone,
I am trying to import some tsv files from my galaxy history into the Rstudio in usegalaxy.eu. I am continuously getting an error message.

The command is:

Get the SNP distance matrix object from Galaxy

distance ← gx_get(2)

The error report is:
DEBUG:root:Host IP determined to be b’172.17.0.1\n’
DEBUG:root:TestURL url=https://usegalaxy.eu obj=False
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): usegalaxy.eu:443
DEBUG:urllib3.connectionpool:https://usegalaxy.eu:443 “GET /api/histories/8b2ff66762999863 HTTP/1.1” 200 None
DEBUG:root:TestURL url=https://usegalaxy.eu state=success
DEBUG:root:Downloading gx=GalaxyInstance object for Galaxy at https://usegalaxy.eu history=8b2ff66762999863 dataset=2
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): usegalaxy.eu:443
DEBUG:urllib3.connectionpool:https://usegalaxy.eu:443 “GET /api/histories/8b2ff66762999863/contents HTTP/1.1” 200 None
DEBUG:root:Cached, not re-downloading
/import/2

Can anyone help?

Thanks.

Hi,

As already mentioned here, the function gx_get() just returns a path to a file for you. It does not read a table for you.

How can you import your file?
Let’s say you want to import your tsv table which is dataset number 7 in your current history as RStudio. You can get the path as follows:

table <- read.table(gx_get(7), header=T, sep="\t", row.names = 1)

Of course, you can also do it differently such as:

path <- gx_get(7)
table <- read.table(path, header=T, sep="\t", row.names = 1)

It is important to understand that gx_get() returns just a path and do not transfer any file.

Best regards,
Armin

Hi Armin,

My tsv file dataset No. is 2. The first command you suggested is still be repoted error as following:

table ← read.table(gx_get(2), header=T, sep=“\t”, row.names = 1)

Error is:

table ← read.table(gx_get(2), header=T, sep=“\t”, row.names = 1)
DEBUG:root:Host IP determined to be b’172.17.0.1\n’
DEBUG:root:TestURL url=https://usegalaxy.eu obj=False
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): usegalaxy.eu:443
DEBUG:urllib3.connectionpool:https://usegalaxy.eu:443 “GET /api/histories/8b2ff66762999863 HTTP/1.1” 200 None
DEBUG:root:TestURL url=https://usegalaxy.eu state=success
DEBUG:root:Downloading gx=GalaxyInstance object for Galaxy at https://usegalaxy.eu history=8b2ff66762999863 dataset=2
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): usegalaxy.eu:443
DEBUG:urllib3.connectionpool:https://usegalaxy.eu:443 “GET /api/histories/8b2ff66762999863/contents HTTP/1.1” 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): usegalaxy.eu:443
DEBUG:urllib3.connectionpool:https://usegalaxy.eu:443 “GET /api/datasets/4838ba20a6d8676528b22d02379866c7?hda_ldda=hda HTTP/1.1” 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): usegalaxy.eu:443
DEBUG:urllib3.connectionpool:https://usegalaxy.eu:443 “GET /api/histories/8b2ff66762999863/contents/4838ba20a6d8676528b22d02379866c7/display?to_ext=tsv HTTP/1.1” 200 173
/import/2

The second command is also be repoted error as following:
path ← gx_get(2)
table ← read.table(path, header=T, sep=“\t”, row.names = 1)

The error is:

path ← gx_get(2)
DEBUG:root:Host IP determined to be b’172.17.0.1\n’
DEBUG:root:TestURL url=https://usegalaxy.eu obj=False
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): usegalaxy.eu:443
DEBUG:urllib3.connectionpool:https://usegalaxy.eu:443 “GET /api/histories/8b2ff66762999863 HTTP/1.1” 200 None
DEBUG:root:TestURL url=https://usegalaxy.eu state=success
DEBUG:root:Downloading gx=GalaxyInstance object for Galaxy at https://usegalaxy.eu history=8b2ff66762999863 dataset=2
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): usegalaxy.eu:443
DEBUG:urllib3.connectionpool:https://usegalaxy.eu:443 “GET /api/histories/8b2ff66762999863/contents HTTP/1.1” 200 None
DEBUG:root:Cached, not re-downloading
/import/2
table ← read.table(path, header=T, sep=“\t”, row.names = 1)

Can you help me again?
Thank you very much

Jane

Hi Jane,

Could you please share your history with me? Then, I can help better.

Best regards,

Armin

Hi Armin,
I have shared my history as following link:

And I am trying and excising a pipeline follow the tutorial [Identifying tuberculosis transmission links: from SNPs to transmission clusters](https://Identifying tuberculosis transmission links: from SNPs to transmission clusters)

Thank you for your help.
Jane

Hi Jane,

I tried to import the tsv file from Galaxy to RStudio and it worked (I attached an screenshot.)

I noticed two differences in the code that you shared here. You are using instead of <- and instead of ". If you copy paste the code from here to your RStudio, please check that these parts are written as R syntax in your code.

I hope this solves your problem.

Best,
Armin

1 Like