Question: Upload a .xls file to galaxy
0
gravatar for chaimae0azouggarh
2.5 years ago by
chaimae0azouggarh10 wrote:

Hey, i just started using galaxy and i'm trying to upload a normal .xls file and it gives me this error

The uploaded binary file contains inappropriate content

can you help me please Thanks a lot :D

upload xls galaxy • 998 views
ADD COMMENTlink modified 2.5 years ago by y.hoogstrate460 • written 2.5 years ago by chaimae0azouggarh10
1
gravatar for Martin Čech
2.5 years ago by
Martin Čech ♦♦ 4.9k
United States
Martin Čech ♦♦ 4.9k wrote:

What are you planning to do with the .xls file? I do not recall Galaxy having any tools to manipulate it. Consider exporting it to csv and working with it in this format instead.

ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by Martin Čech ♦♦ 4.9k

I'm supposed to create galaxy tools that manipulate .xls files. Thanks a lot for your answer ^__^

ADD REPLYlink written 2.5 years ago by chaimae0azouggarh10
1

I would discourage you as a scientist from working with .xls and recommend using some simpler and readable formats like .csv or .tsv

They are open, free, human-readable, less prone to errors, smaller and have existing suit of tools.

ADD REPLYlink written 2.5 years ago by Martin Čech ♦♦ 4.9k
1
gravatar for y.hoogstrate
2.5 years ago by
y.hoogstrate460
Netherlands
y.hoogstrate460 wrote:

Dear chaimae0azouggarh,

The reason you're getting this error is because galaxy prevents binary files by default (for security reasons). I am aware of two ways to get around this:

  1. You have to register a binary datatype for galaxy that allow XLS files. To do this you need to know 'magic' bits that are specific for XLS data types. You can add the datatypes either:

    a. Within the galaxy code base (example: https://github.com/galaxyproject/galaxy/pull/1108/files and in particular don't forget to register it as a binary format: https://github.com/galaxyproject/galaxy/pull/1108/files#diff-409951594551183dbf886e24de6cb129R490 )

    b. As part of a tool (example: https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools/src/63c7b4a6b643426d37252233a1f2e7c81014ab49/cgatools_v17/?at=master ). This involves changes in at least ./lib/galaxy/datatypes/<xlsx custom="" format="">.py ./datatypes_conf.xml . From what I have read before, this is not the ideal solution and I would suggest to go for 1a.

  2. There are some binary data types already registered within galaxy (archive datatypes if I'm not mistaken). You could upload it as one of these and it won't give the error but neither the data file would get the XLSX data type. If you go down this way it should only be a temporary workaround to get started and I would advice you to go for solution 1.

I would advice you to use xlsx instead as this datatype is already supported within galaxy and the tool shed has a recently added python library for xlsx manipulation: https://github.com/galaxyproject/tools-iuc/pull/729

good luck,

Youri

ADD COMMENTlink modified 2.3 years ago • written 2.5 years ago by y.hoogstrate460

Thanks a lot it was very helpful

ADD REPLYlink written 2.5 years ago by chaimae0azouggarh10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 171 users visited in the last hour