Hey Siemen,

A workaround i'm currently using consists of creating an Xls subclass of the Binary datatype class:

In galaxy-dist/lib/galaxy/datatypes/binary.py add xls to unsniffable_binary_formats like this:

unsniffable_binary_formats = [ 'ab1', 'scf' , 'xls' ]

Also add the following class at the very end of the binary.py file:

class Xls(Binary):
    '''Class describing an Excel (xls) file'''

    file_ext = 'xls'

Then in your 'datatypes_conf.xml' add the following line (don't forget to comment out or remove other xls datatype lines):

<datatype extension="xls" type="galaxy.datatypes.binary:Xls" display_in_upload="true"/>

Then restart galaxy and when you upload an excel file you must explicitly select 'xls' for the 'File Format' (I personally don't know how to get 'Auto-detect' to work for added datatypes such as xls).

If you have any questions about this implementation let me know.  Good luck.

Joe Cruz


On Thu, Dec 8, 2011 at 3:11 AM, Siemen Sikkema <s.h.sikkema@gmail.com> wrote:
Hello!

For our future galaxy users in Netherlands Bioinformatics Centre we'd like to support Excel uploads. We have our own excel to tabular CLI tool and I have been trying to get it working with galaxy. The tool itself is not the problem, but getting excel files uploaded is…

We're running a local instance (hg identify: 949e4f5fa03a+ tip) on Mac for development purposes.

The issues with excel are two-fold: XLSX files get unzipped automatically and a useless XML file remains, while uploading an XLS file results in: "The uploaded binary file contains inappropriate content". I've tried adding

<datatype extension="xls" type="galaxy.datatypes.binary:Binary" display_in_upload="true"/>
<datatype extension="xlsx" type="galaxy.datatypes.binary:Binary" display_in_upload="true"/>

to datatypes_conf.xml and selecting XLS and XLSX as datatype during upload but to no avail (the errors don't change).

A temporary workaround we thought of was to first zip the files before uploading, that way Galaxy would unzip them and we'd be left with the raw excel files. At first this seemed to work but the conversion did not. Furthermore, downloading the files and trying to open them failed. A quick 'diff' between the original and mangled files show differences practically throughout the whole file!

Now, my questions are as follows. Has work been underway to support excel natively? Is there a way to have Galaxy simply accept uploaded files without any interpretation? What happens inside Galaxy that corrupts the excel files during unpacking?

Thank you very much and I apologize if I somehow missed something obvious or if these questions have been asked before.

Kind regards,
Siemen Sikkema
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

 http://lists.bx.psu.edu/