Hi,

Am 03.08.2015 um 08:26 schrieb Josh Woodring:
> Dear all,
> 
> I am working on porting crop modelling tools

Crop Science? Awesome! Made my day!

> into a custom version of
> galaxy; unfortunately though, the files are rigidly formatted in similar
> ways and not easily distinguished. As such, while I can ensure that the
> outputs from tools I write create valid files; I can't write a simple
> sniffer that will figure out the type of an uploaded file from keywords or
> content formatting alone.  It seems that my most practical option is going
> to be trying to import the name attribute from the
> history_dataset_association and test if the name has the right extension
> and internal formatting style. I just don't know how I could access that
> information in the sniffer code. Does anyone know how to do this or where I
> can add things properly in the code myself?

This seems to be a badly formatted file standard.
Can you try to access display_name()?

https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/datatypes/data.py#L386

Actually, I would not try to write a sniffer here. In such cases you
need to train the users to give the proper file type during upload. I
can only imaging that sniffing by name can cause many troubles.

Ciao,
Bjoern


> Thanks
> Josh
> 
> 
> 
> ___________________________________________________________
> 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:
>   https://lists.galaxyproject.org/
> 
> To search Galaxy mailing lists use the unified search at:
>   http://galaxyproject.org/search/mailinglists/
> 
___________________________________________________________
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Reply via email to