Problem selecting datasets with a specified datatype

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

Problem selecting datasets with a specified datatype

georgeweingart

Hi,


I am trying to set up in our Galaxy a program that takes two inputs that have different datatypes.

The problem is that Galaxy selects only datasets of the first datatype and displays all datasets for  the second with all types, not only with the specified datatype (We want it to display for the second dataset only those with datatype=”lefse_res”).


Both datasets are input and are both required to run the step.


My code looks as follows:


<inputs>

 <param format="tabular" name="inp_data1" type="data" label="Input 1" />

           <param format="lefse_res" name="inp_data2" type="data" label="Input 2"/>

</inputs>


Should I be doing it in another way?

Thanks!

George Weingart



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

Re: Problem selecting datasets with a specified datatype

John Chilton-4
When Galaxy cannot find the extension/short name corresponding to a
datatype it treats the input as a 'data' the root datatype meaning
anything can connect to it. So I think the problem here is not so much
your tool format as your datatype - I don't think Galaxy can see the
lefse_res datatype. You could try to confirm this by swapping the
order of the inputs I think.

Can you go to the "View data types registry" option in the admin menu
and see if Galaxy thinks it knows about this datatype?

-John

On Wed, Aug 13, 2014 at 2:56 PM, George Weingart
<[hidden email]> wrote:

> Hi,
>
>
> I am trying to set up in our Galaxy a program that takes two inputs that
> have different datatypes.
>
> The problem is that Galaxy selects only datasets of the first datatype and
> displays all datasets for  the second with all types, not only with the
> specified datatype (We want it to display for the second dataset only those
> with datatype=”lefse_res”).
>
>
> Both datasets are input and are both required to run the step.
>
>
> My code looks as follows:
>
>
> <inputs>
>
>  <param format="tabular" name="inp_data1" type="data" label="Input 1" />
>
>            <param format="lefse_res" name="inp_data2" type="data"
> label="Input 2"/>
>
> </inputs>
>
>
> Should I be doing it in another way?
>
> Thanks!
>
> George Weingart
>
>
>
> ___________________________________________________________
> 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/

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

Re: Problem selecting datasets with a specified datatype

georgeweingart

Hi John,

First of all, Thanks!  

You are right and the “lefse_res”  datatype does not appear when "View data types registry" .


However:


We had our lefse application which we migrated to the tool_shed.

As part of the migration, we moved the datatypes definition from //usr/local/galaxy-dist/datatypes_conf.xml  to the shed tools in

/usr/local/shed_tools/testtoolshed.g2.bx.psu.edu/repos/george-weingart/lefse/47ac77f2fe68/lefse/datatypes_conf.xml


and it looks in the shed as follows:


<?xml version="1.0"?>

<datatypes>

   <registration>

   <datatype extension="lefse" type="galaxy.datatypes.data:Lefse" display_in_upload="true"/>

   <datatype extension="lefse_res" type="galaxy.datatypes.tabular:LefseRes" display_in_upload="true"/>

   </registration>

</datatypes>


And you can see in the image below  that when we run the Lefse program, it generates output of the type lefse_res.


So why


<inputs>

 <param format="tabular" name="inp_data1" type="data" label="Input 1" />

          <param format="lefse_res" name="inp_data2" type="data" label="Input 2"/>

</inputs>


does not filter only those datasets?


Thanks!!

George






On Wed, Aug 13, 2014 at 1:33 PM, John Chilton <[hidden email]> wrote:
When Galaxy cannot find the extension/short name corresponding to a
datatype it treats the input as a 'data' the root datatype meaning
anything can connect to it. So I think the problem here is not so much
your tool format as your datatype - I don't think Galaxy can see the
lefse_res datatype. You could try to confirm this by swapping the
order of the inputs I think.

Can you go to the "View data types registry" option in the admin menu
and see if Galaxy thinks it knows about this datatype?

-John

On Wed, Aug 13, 2014 at 2:56 PM, George Weingart
<[hidden email]> wrote:
> Hi,
>
>
> I am trying to set up in our Galaxy a program that takes two inputs that
> have different datatypes.
>
> The problem is that Galaxy selects only datasets of the first datatype and
> displays all datasets for  the second with all types, not only with the
> specified datatype (We want it to display for the second dataset only those
> with datatype=”lefse_res”).
>
>
> Both datasets are input and are both required to run the step.
>
>
> My code looks as follows:
>
>
> <inputs>
>
>  <param format="tabular" name="inp_data1" type="data" label="Input 1" />
>
>            <param format="lefse_res" name="inp_data2" type="data"
> label="Input 2"/>
>
> </inputs>
>
>
> Should I be doing it in another way?
>
> Thanks!
>
> George Weingart
>
>
>
> ___________________________________________________________
> 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/


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

Re: Problem selecting datasets with a specified datatype

John Chilton-4
Galaxy can sometimes be... confused :). I think Galaxy's database thinks the datatype is lefse_res - but Galaxy doesn't think that type exists so it cannot really treat it as a lefse_res when filtering on tools. I think if you were able to fix the datatype and get it to appear in what Galaxy perceives as its datatypes things would be working better.

So your datatype definition was:

  <datatype extension="lefse_res" type="galaxy.datatypes.tabular:LefseRes" display_in_upload="true"/>

I think this is wrong - perhaps originally you had placed a LefseRes class in tabular.py but when you move that to the tool shed you need to include a new datatype file with your types in it. Galaxy's base tabluar.py file doesn't include a LefseRes class.

So ideally - you would just dynamically subclass an existing type (check out the emboss_datatypes package in the test tool shed for instance) - but if you really need to define this LefseRes class in Python than you need to include its definition with your tool shed entry I think - checkout the blast_datatypes repository as a good example of this.

Also, there may be more information on the wiki:


Hope this helps,
-John




On Wed, Aug 13, 2014 at 5:11 PM, George Weingart <[hidden email]> wrote:

Hi John,

First of all, Thanks!  

You are right and the “lefse_res”  datatype does not appear when "View data types registry" .


However:


We had our lefse application which we migrated to the tool_shed.

As part of the migration, we moved the datatypes definition from //usr/local/galaxy-dist/datatypes_conf.xml  to the shed tools in

/usr/local/shed_tools/testtoolshed.g2.bx.psu.edu/repos/george-weingart/lefse/47ac77f2fe68/lefse/datatypes_conf.xml


and it looks in the shed as follows:


<?xml version="1.0"?>

<datatypes>

   <registration>

   <datatype extension="lefse" type="galaxy.datatypes.data:Lefse" display_in_upload="true"/>

   <datatype extension="lefse_res" type="galaxy.datatypes.tabular:LefseRes" display_in_upload="true"/>

   </registration>

</datatypes>


And you can see in the image below  that when we run the Lefse program, it generates output of the type lefse_res.


So why


<inputs>

 <param format="tabular" name="inp_data1" type="data" label="Input 1" />

          <param format="lefse_res" name="inp_data2" type="data" label="Input 2"/>

</inputs>


does not filter only those datasets?


Thanks!!

George






On Wed, Aug 13, 2014 at 1:33 PM, John Chilton <[hidden email]> wrote:
When Galaxy cannot find the extension/short name corresponding to a
datatype it treats the input as a 'data' the root datatype meaning
anything can connect to it. So I think the problem here is not so much
your tool format as your datatype - I don't think Galaxy can see the
lefse_res datatype. You could try to confirm this by swapping the
order of the inputs I think.

Can you go to the "View data types registry" option in the admin menu
and see if Galaxy thinks it knows about this datatype?

-John

On Wed, Aug 13, 2014 at 2:56 PM, George Weingart
<[hidden email]> wrote:
> Hi,
>
>
> I am trying to set up in our Galaxy a program that takes two inputs that
> have different datatypes.
>
> The problem is that Galaxy selects only datasets of the first datatype and
> displays all datasets for  the second with all types, not only with the
> specified datatype (We want it to display for the second dataset only those
> with datatype=”lefse_res”).
>
>
> Both datasets are input and are both required to run the step.
>
>
> My code looks as follows:
>
>
> <inputs>
>
>  <param format="tabular" name="inp_data1" type="data" label="Input 1" />
>
>            <param format="lefse_res" name="inp_data2" type="data"
> label="Input 2"/>
>
> </inputs>
>
>
> Should I be doing it in another way?
>
> Thanks!
>
> George Weingart
>
>
>
> ___________________________________________________________
> 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/



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

Re: Problem selecting datasets with a specified datatype

georgeweingart
Hi John, 

I think I have it resolved:

At the end of the day the only thing I had to do was to change in the definitions of the datatypes from:

    <datatype extension="lefse" type="galaxy.datatypes.data:Lefse" display_in_upload="true"/>
    <datatype extension="lefse_res" type="galaxy.datatypes.tabular:LefseRes" display_in_upload="true"/>

to:

    <datatype extension="lefse" type="galaxy.datatypes.data:Text"  subclass="true" display_in_upload="true"/>
    <datatype extension="lefse_res" type="galaxy.datatypes.data:Text" subclass="true" display_in_upload="true"/>

and that made the filters work.

I guess data.Text  is something Galaxy knows and understands whereas data:Lefse and tabular:LefseRes not.

The strange thing was that before we migrated the application to the tool-shed,  the first configuration worked (In terms of displaying the files)
whereas it does not  in the tool-shed environment - I guess loading of the datatypes is different...

Thanks for your help!
George



On Fri, Aug 15, 2014 at 12:02 PM, John Chilton <[hidden email]> wrote:
Galaxy can sometimes be... confused :). I think Galaxy's database thinks the datatype is lefse_res - but Galaxy doesn't think that type exists so it cannot really treat it as a lefse_res when filtering on tools. I think if you were able to fix the datatype and get it to appear in what Galaxy perceives as its datatypes things would be working better.

So your datatype definition was:

  <datatype extension="lefse_res" type="galaxy.datatypes.tabular:LefseRes" display_in_upload="true"/>

I think this is wrong - perhaps originally you had placed a LefseRes class in tabular.py but when you move that to the tool shed you need to include a new datatype file with your types in it. Galaxy's base tabluar.py file doesn't include a LefseRes class.

So ideally - you would just dynamically subclass an existing type (check out the emboss_datatypes package in the test tool shed for instance) - but if you really need to define this LefseRes class in Python than you need to include its definition with your tool shed entry I think - checkout the blast_datatypes repository as a good example of this.

Also, there may be more information on the wiki:


Hope this helps,
-John




On Wed, Aug 13, 2014 at 5:11 PM, George Weingart <[hidden email]> wrote:

Hi John,

First of all, Thanks!  

You are right and the “lefse_res”  datatype does not appear when "View data types registry" .


However:


We had our lefse application which we migrated to the tool_shed.

As part of the migration, we moved the datatypes definition from //usr/local/galaxy-dist/datatypes_conf.xml  to the shed tools in

/usr/local/shed_tools/testtoolshed.g2.bx.psu.edu/repos/george-weingart/lefse/47ac77f2fe68/lefse/datatypes_conf.xml


and it looks in the shed as follows:


<?xml version="1.0"?>

<datatypes>

   <registration>

   <datatype extension="lefse" type="galaxy.datatypes.data:Lefse" display_in_upload="true"/>

   <datatype extension="lefse_res" type="galaxy.datatypes.tabular:LefseRes" display_in_upload="true"/>

   </registration>

</datatypes>


And you can see in the image below  that when we run the Lefse program, it generates output of the type lefse_res.


So why


<inputs>

 <param format="tabular" name="inp_data1" type="data" label="Input 1" />

          <param format="lefse_res" name="inp_data2" type="data" label="Input 2"/>

</inputs>


does not filter only those datasets?


Thanks!!

George






On Wed, Aug 13, 2014 at 1:33 PM, John Chilton <[hidden email]> wrote:
When Galaxy cannot find the extension/short name corresponding to a
datatype it treats the input as a 'data' the root datatype meaning
anything can connect to it. So I think the problem here is not so much
your tool format as your datatype - I don't think Galaxy can see the
lefse_res datatype. You could try to confirm this by swapping the
order of the inputs I think.

Can you go to the "View data types registry" option in the admin menu
and see if Galaxy thinks it knows about this datatype?

-John

On Wed, Aug 13, 2014 at 2:56 PM, George Weingart
<[hidden email]> wrote:
> Hi,
>
>
> I am trying to set up in our Galaxy a program that takes two inputs that
> have different datatypes.
>
> The problem is that Galaxy selects only datasets of the first datatype and
> displays all datasets for  the second with all types, not only with the
> specified datatype (We want it to display for the second dataset only those
> with datatype=”lefse_res”).
>
>
> Both datasets are input and are both required to run the step.
>
>
> My code looks as follows:
>
>
> <inputs>
>
>  <param format="tabular" name="inp_data1" type="data" label="Input 1" />
>
>            <param format="lefse_res" name="inp_data2" type="data"
> label="Input 2"/>
>
> </inputs>
>
>
> Should I be doing it in another way?
>
> Thanks!
>
> George Weingart
>
>
>
> ___________________________________________________________
> 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/




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