filtering a <param> of type 'data' so only one type is available

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

filtering a <param> of type 'data' so only one type is available

Dan Tenenbaum
Hi,

I have a tool wrapper with a <param> of type="data".

Currently, this renders as a text box with a drop down list that has
52 items in it (the number of things I have in my history, I guess).

I'd like to filter this list so that only some items in the history
(in my case any item whose name ends with '.rda') are shown in this
dropdown.

It seems like maybe the 'format' parameter to the 'param' tag is what
I want, but:
1) I tried format="rda" and that didn't seem to change anything.
2) "rda" is not in the datatypes.conf file which the documentation
suggests is required?

(.rda is an extension used for serialized R objects.)

The tool I'm working on only accepts rda files as input and the reason
I'm asking for this is that it is all too easy to accidentally feed it
a file of some other type. If the dropdown could be filtered so that
only items which will work with the tool are shown, that would be
great.

Is there a way to do that?
Thanks,
Dan
___________________________________________________________
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/
Reply | Threaded
Open this post in threaded view
|

Re: filtering a <param> of type 'data' so only one type is available

Ross-2
Hi, Dan.
Using format="rda" will restrict the list to history items of the 'rda' datatype - but ONLY if the rda datatype has been defined!
The easiest way to do that is to define a new datatype in datatypes_conf.xml and since rData is binary, you should subclass binary.
Something like (untested - especially the mimetype !)
<datatype extension="rda" type="galaxy.datatypes.binary:Binary" mimetype="application/x-rlang-transport" subclass="True" />
might work. A server restart is always required to load any new datatypes.
Good luck!



On Thu, Jan 24, 2013 at 10:41 AM, Dan Tenenbaum <[hidden email]> wrote:
Hi,

I have a tool wrapper with a <param> of type="data".

Currently, this renders as a text box with a drop down list that has
52 items in it (the number of things I have in my history, I guess).

I'd like to filter this list so that only some items in the history
(in my case any item whose name ends with '.rda') are shown in this
dropdown.

It seems like maybe the 'format' parameter to the 'param' tag is what
I want, but:
1) I tried format="rda" and that didn't seem to change anything.
2) "rda" is not in the datatypes.conf file which the documentation
suggests is required?

(.rda is an extension used for serialized R objects.)

The tool I'm working on only accepts rda files as input and the reason
I'm asking for this is that it is all too easy to accidentally feed it
a file of some other type. If the dropdown could be filtered so that
only items which will work with the tool are shown, that would be
great.

Is there a way to do that?
Thanks,
Dan
___________________________________________________________
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/



--
Ross Lazarus MBBS MPH;
Head, Medical Bioinformatics, BakerIDI; Tel: +61 385321444
http://scholar.google.com/citations?hl=en&user=UCUuEM4AAAAJ

___________________________________________________________
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/
Reply | Threaded
Open this post in threaded view
|

Re: filtering a <param> of type 'data' so only one type is available

Dan Tenenbaum
On Wed, Jan 23, 2013 at 3:51 PM, Ross <[hidden email]> wrote:

> Hi, Dan.
> Using format="rda" will restrict the list to history items of the 'rda'
> datatype - but ONLY if the rda datatype has been defined!
> The easiest way to do that is to define a new datatype in datatypes_conf.xml
> and since rData is binary, you should subclass binary.
> Something like (untested - especially the mimetype !)
> <datatype extension="rda" type="galaxy.datatypes.binary:Binary"
> mimetype="application/x-rlang-transport" subclass="True" />
> might work. A server restart is always required to load any new datatypes.
> Good luck!
>

It works! I changed the mime type to application/x-gzip, since
serialized R objects are gzipped.

Thanks,
Dan


>
>
> On Thu, Jan 24, 2013 at 10:41 AM, Dan Tenenbaum <[hidden email]> wrote:
>>
>> Hi,
>>
>> I have a tool wrapper with a <param> of type="data".
>>
>> Currently, this renders as a text box with a drop down list that has
>> 52 items in it (the number of things I have in my history, I guess).
>>
>> I'd like to filter this list so that only some items in the history
>> (in my case any item whose name ends with '.rda') are shown in this
>> dropdown.
>>
>> It seems like maybe the 'format' parameter to the 'param' tag is what
>> I want, but:
>> 1) I tried format="rda" and that didn't seem to change anything.
>> 2) "rda" is not in the datatypes.conf file which the documentation
>> suggests is required?
>>
>> (.rda is an extension used for serialized R objects.)
>>
>> The tool I'm working on only accepts rda files as input and the reason
>> I'm asking for this is that it is all too easy to accidentally feed it
>> a file of some other type. If the dropdown could be filtered so that
>> only items which will work with the tool are shown, that would be
>> great.
>>
>> Is there a way to do that?
>> Thanks,
>> Dan
>> ___________________________________________________________
>> 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/
>
>
>
>
> --
> Ross Lazarus MBBS MPH;
> Head, Medical Bioinformatics, BakerIDI; Tel: +61 385321444
> http://scholar.google.com/citations?hl=en&user=UCUuEM4AAAAJ
___________________________________________________________
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/
Reply | Threaded
Open this post in threaded view
|

Re: filtering a <param> of type 'data' so only one type is available

Ross-2
Hi, Dan
Glad it worked and thanks for pointing out a more general mimetype - does any one else (other than me) want to vote to add
<datatype extension="rda" type="galaxy.datatypes.binary:Binary mimetype="application/x-gzip" subclass="True" />
to datatypes_conf.xml.sample permanently ?


On Thu, Jan 24, 2013 at 10:58 AM, Dan Tenenbaum <[hidden email]> wrote:
On Wed, Jan 23, 2013 at 3:51 PM, Ross <[hidden email]> wrote:
> Hi, Dan.
> Using format="rda" will restrict the list to history items of the 'rda'
> datatype - but ONLY if the rda datatype has been defined!
> The easiest way to do that is to define a new datatype in datatypes_conf.xml
> and since rData is binary, you should subclass binary.
> Something like (untested - especially the mimetype !)
> <datatype extension="rda" type="galaxy.datatypes.binary:Binary"
> mimetype="application/x-rlang-transport" subclass="True" />
> might work. A server restart is always required to load any new datatypes.
> Good luck!
>

It works! I changed the mime type to application/x-gzip, since
serialized R objects are gzipped.

Thanks,
Dan


>
>
> On Thu, Jan 24, 2013 at 10:41 AM, Dan Tenenbaum <[hidden email]> wrote:
>>
>> Hi,
>>
>> I have a tool wrapper with a <param> of type="data".
>>
>> Currently, this renders as a text box with a drop down list that has
>> 52 items in it (the number of things I have in my history, I guess).
>>
>> I'd like to filter this list so that only some items in the history
>> (in my case any item whose name ends with '.rda') are shown in this
>> dropdown.
>>
>> It seems like maybe the 'format' parameter to the 'param' tag is what
>> I want, but:
>> 1) I tried format="rda" and that didn't seem to change anything.
>> 2) "rda" is not in the datatypes.conf file which the documentation
>> suggests is required?
>>
>> (.rda is an extension used for serialized R objects.)
>>
>> The tool I'm working on only accepts rda files as input and the reason
>> I'm asking for this is that it is all too easy to accidentally feed it
>> a file of some other type. If the dropdown could be filtered so that
>> only items which will work with the tool are shown, that would be
>> great.
>>
>> Is there a way to do that?
>> Thanks,
>> Dan
>> ___________________________________________________________
>> 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/
>
>

___________________________________________________________
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/
Reply | Threaded
Open this post in threaded view
|

Re: filtering a <param> of type 'data' so only one type is available

Dan Tenenbaum
In reply to this post by Dan Tenenbaum
On Wed, Jan 23, 2013 at 4:03 PM, Ross <[hidden email]> wrote:
> Hi, Dan
> Glad it worked and thanks for pointing out a more general mimetype - does
> any one else (other than me) want to vote to add
> <datatype extension="rda" type="galaxy.datatypes.binary:Binary
> mimetype="application/x-gzip" subclass="True" />
> to datatypes_conf.xml.sample permanently ?
>

I do. This would be great as I am automating the creation of galaxy
tools and I'd like to be able to enable this feature without requiring
(either manual or programmatic) editing of datatypes_conf.xml.

Note that serialized R objects also sometimes have the .RData
extension -- both are valid -- so it would be good to support that as
well.

But now that I think about it, serialized objects are not always gzip
files--depending on the value of the 'compression' flag used with the
save() function, it may be gzip, bzip, xz, or even ascii!

So maybe the mime type should be changed back to something different,
like application/x-rlang-transport as you suggested.

I tried this and it seemed to work; It did the filtering I wanted and
I was still able to download a history item with this type.

Dan


Thanks,
Dan


>
> On Thu, Jan 24, 2013 at 10:58 AM, Dan Tenenbaum <[hidden email]> wrote:
>>
>> On Wed, Jan 23, 2013 at 3:51 PM, Ross <[hidden email]> wrote:
>> > Hi, Dan.
>> > Using format="rda" will restrict the list to history items of the 'rda'
>> > datatype - but ONLY if the rda datatype has been defined!
>> > The easiest way to do that is to define a new datatype in
>> > datatypes_conf.xml
>> > and since rData is binary, you should subclass binary.
>> > Something like (untested - especially the mimetype !)
>> > <datatype extension="rda" type="galaxy.datatypes.binary:Binary"
>> > mimetype="application/x-rlang-transport" subclass="True" />
>> > might work. A server restart is always required to load any new
>> > datatypes.
>> > Good luck!
>> >
>>
>> It works! I changed the mime type to application/x-gzip, since
>> serialized R objects are gzipped.
>>
>> Thanks,
>> Dan
>>
>>
>> >
>> >
>> > On Thu, Jan 24, 2013 at 10:41 AM, Dan Tenenbaum <[hidden email]>
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> I have a tool wrapper with a <param> of type="data".
>> >>
>> >> Currently, this renders as a text box with a drop down list that has
>> >> 52 items in it (the number of things I have in my history, I guess).
>> >>
>> >> I'd like to filter this list so that only some items in the history
>> >> (in my case any item whose name ends with '.rda') are shown in this
>> >> dropdown.
>> >>
>> >> It seems like maybe the 'format' parameter to the 'param' tag is what
>> >> I want, but:
>> >> 1) I tried format="rda" and that didn't seem to change anything.
>> >> 2) "rda" is not in the datatypes.conf file which the documentation
>> >> suggests is required?
>> >>
>> >> (.rda is an extension used for serialized R objects.)
>> >>
>> >> The tool I'm working on only accepts rda files as input and the reason
>> >> I'm asking for this is that it is all too easy to accidentally feed it
>> >> a file of some other type. If the dropdown could be filtered so that
>> >> only items which will work with the tool are shown, that would be
>> >> great.
>> >>
>> >> Is there a way to do that?
>> >> Thanks,
>> >> Dan
>> >> ___________________________________________________________
>> >> 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/
>> >
>> >
___________________________________________________________
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/
Reply | Threaded
Open this post in threaded view
|

Re: filtering a <param> of type 'data' so only one type is available

Lukasse, Pieter
In reply to this post by Ross-2

Struggling with this now...you have my vote!

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Ross
Sent: donderdag 24 januari 2013 1:04
To: Dan Tenenbaum
Cc: [hidden email]
Subject: Re: [galaxy-dev] filtering a <param> of type 'data' so only one type is available

 

Hi, Dan

Glad it worked and thanks for pointing out a more general mimetype - does any one else (other than me) want to vote to add

<datatype extension="rda" type="galaxy.datatypes.binary:Binary mimetype="application/x-gzip" subclass="True" />

to datatypes_conf.xml.sample permanently ?

 

On Thu, Jan 24, 2013 at 10:58 AM, Dan Tenenbaum <[hidden email]> wrote:

On Wed, Jan 23, 2013 at 3:51 PM, Ross <[hidden email]> wrote:
> Hi, Dan.
> Using format="rda" will restrict the list to history items of the 'rda'
> datatype - but ONLY if the rda datatype has been defined!
> The easiest way to do that is to define a new datatype in datatypes_conf.xml
> and since rData is binary, you should subclass binary.
> Something like (untested - especially the mimetype !)
> <datatype extension="rda" type="galaxy.datatypes.binary:Binary"
> mimetype="application/x-rlang-transport" subclass="True" />
> might work. A server restart is always required to load any new datatypes.
> Good luck!
>

It works! I changed the mime type to application/x-gzip, since
serialized R objects are gzipped.

Thanks,
Dan



>
>
> On Thu, Jan 24, 2013 at 10:41 AM, Dan Tenenbaum <[hidden email]> wrote:
>>
>> Hi,
>>
>> I have a tool wrapper with a <param> of type="data".
>>
>> Currently, this renders as a text box with a drop down list that has
>> 52 items in it (the number of things I have in my history, I guess).
>>
>> I'd like to filter this list so that only some items in the history
>> (in my case any item whose name ends with '.rda') are shown in this
>> dropdown.
>>
>> It seems like maybe the 'format' parameter to the 'param' tag is what
>> I want, but:
>> 1) I tried format="rda" and that didn't seem to change anything.
>> 2) "rda" is not in the datatypes.conf file which the documentation
>> suggests is required?
>>
>> (.rda is an extension used for serialized R objects.)
>>
>> The tool I'm working on only accepts rda files as input and the reason
>> I'm asking for this is that it is all too easy to accidentally feed it
>> a file of some other type. If the dropdown could be filtered so that
>> only items which will work with the tool are shown, that would be
>> great.
>>
>> Is there a way to do that?
>> Thanks,
>> Dan
>> ___________________________________________________________
>> 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/
>
>


___________________________________________________________
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/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Re: filtering a <param> of type 'data' so only one type is available

Stef van Lieshout
You would have my vote too for this, is there a trello card for it?
 
Stef
 
----- Original message -----
From: "Lukasse, Pieter" <[hidden email]>
To: Ross <[hidden email]>
Subject: Re: [galaxy-dev] filtering a <param> of type 'data' so only one type is available
Date: Wed, 22 Oct 2014 11:52:13 +0000
 

Struggling with this now...you have my vote!


From: [hidden email] [mailto:[hidden email]] On Behalf Of Ross
Sent: donderdag 24 januari 2013 1:04
To: Dan Tenenbaum
Cc: [hidden email]
Subject: Re: [galaxy-dev] filtering a <param> of type 'data' so only one type is available


Hi, Dan

Glad it worked and thanks for pointing out a more general mimetype - does any one else (other than me) want to vote to add

<datatype extension="rda" type="galaxy.datatypes.binary:Binary mimetype="application/x-gzip" subclass="True" />

to datatypes_conf.xml.sample permanently ?


On Thu, Jan 24, 2013 at 10:58 AM, Dan Tenenbaum <[hidden email]> wrote:

On Wed, Jan 23, 2013 at 3:51 PM, Ross <[hidden email]> wrote:
> Hi, Dan.
> Using format="rda" will restrict the list to history items of the 'rda'
> datatype - but ONLY if the rda datatype has been defined!
> The easiest way to do that is to define a new datatype in datatypes_conf.xml
> and since rData is binary, you should subclass binary.
> Something like (untested - especially the mimetype !)
> <datatype extension="rda" type="galaxy.datatypes.binary:Binary"
> mimetype="application/x-rlang-transport" subclass="True" />
> might work. A server restart is always required to load any new datatypes.
> Good luck!
>

It works! I changed the mime type to application/x-gzip, since
serialized R objects are gzipped.

Thanks,
Dan



>
>
> On Thu, Jan 24, 2013 at 10:41 AM, Dan Tenenbaum <[hidden email]> wrote:
>>
>> Hi,
>>
>> I have a tool wrapper with a <param> of type="data".
>>
>> Currently, this renders as a text box with a drop down list that has
>> 52 items in it (the number of things I have in my history, I guess).
>>
>> I'd like to filter this list so that only some items in the history
>> (in my case any item whose name ends with '.rda') are shown in this
>> dropdown.
>>
>> It seems like maybe the 'format' parameter to the 'param' tag is what
>> I want, but:
>> 1) I tried format="rda" and that didn't seem to change anything.
>> 2) "rda" is not in the datatypes.conf file which the documentation
>> suggests is required?
>>
>> (.rda is an extension used for serialized R objects.)
>>
>> The tool I'm working on only accepts rda files as input and the reason
>> I'm asking for this is that it is all too easy to accidentally feed it
>> a file of some other type. If the dropdown could be filtered so that
>> only items which will work with the tool are shown, that would be
>> great.
>>
>> Is there a way to do that?
>> Thanks,
>> Dan
>> ___________________________________________________________
>> 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/
>
>

___________________________________________________________
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:
 
To search Galaxy mailing lists use the unified search at:

___________________________________________________________
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/

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