Re: [galaxy-dev] Checkboxes/booleans in tools, again

2011-05-24 Thread Louise-Amélie Schmitt
Ok, no problem, I really didn't notice. Really sorry about that. I'll be 
careful from now on.


Thanks for the add in the changeset but I suspect the problem should be 
fixed somewhere else, I mean upstream since the value variable doesn't 
receive the appropriate stuff. I didn't quite get where it comes from 
though.


Looking forward to seeing you in Lunteren :)

Regards,
L-A


Le 24/05/2011 11:38, Nate Coraor a écrit :

Thanks!  This has been fixed in changeset 5594:2f84c42a548a.

Also, if I could ask for a minor thing to assist us with list
maintenance: when starting a new thread on the list, please create a
brand new email to galaxy-dev rather than replying to an existing
message.  Replying includes headers that reference the message you
replied to, which means it threads with the original thread in mail
readers and the list archive.

Thanks,
--nate

Louise-Amélie Schmitt wrote:

Yeah, and I fixed it... somehow.

In the lib/galaxy/web/form_builder.py I added the import on
string_as_bool from galaxy.util, then I modified the code as
follows:

126 @staticmethod
127 def is_checked( value ):
128 if value == True:
129 return True
130 # This may look strange upon initial inspection, but see
the comments in the get_html() method
131 # above for clarification.  Basically, if value is not
True, then it will always be a list with
132 # 2 input fields ( a checkbox and a hidden field ) if
the checkbox is checked.  If it is not
133 # checked, then value will be only the hidden field.
134 if isinstance(value, basestring):
135 return string_as_bool( value )
136 return isinstance( value, list ) and len( value ) == 2

(see l.134 and 135)
The value variable actually contained something else than True or a
list, namely the string "true".
Now it seems to work fine.

Cheers,
L-A


Le 23/05/2011 18:26, Peter Cock a écrit :

2011/5/23 Louise-Amélie Schmitt:

@ Peter: I'm not sure I can get more precise... the checked attribute has no
effect whatsoever, the boxes are always unchecked when I open the tool. I
tried the "yes" and the "true" values to no avail.

@ Leandro: Yes I already saw that ...

But that's actually not the issue here. I just want my checkboxes to be
checked by default, and it appears not to work.

To give an example, here is one of the lines of my tool XML file:

This checkbox remains unchecked at tool opening.

As far as I know, some people managed to get it working and I'd like to know
how.

Any suggestion?

I think you've found a bug :(

I found two working examples, "Filter out low complexity regions (with
DUST)" parameter in tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml and
the scaffolding parameter in sr_assembly/velvetg.xml - however they
are both within a conditional parameter section (only shown in
advanced mode).

Have a look at sr_mapping/bwa_color_wrapper.xml which has a "Suppress
the header in the output SAM file" boolean which should be checked by
default:



It's not working on http://usegalaxy.org - the box isn't checked.

If you can verify that, please file an issue on bitbucket:
https://bitbucket.org/galaxy/galaxy-central/issues/new

Peter

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


Re: [galaxy-dev] Checkboxes/booleans in tools, again

2011-05-24 Thread Nate Coraor
Thanks!  This has been fixed in changeset 5594:2f84c42a548a.

Also, if I could ask for a minor thing to assist us with list
maintenance: when starting a new thread on the list, please create a
brand new email to galaxy-dev rather than replying to an existing
message.  Replying includes headers that reference the message you
replied to, which means it threads with the original thread in mail
readers and the list archive.

Thanks,
--nate

Louise-Amélie Schmitt wrote:
> Yeah, and I fixed it... somehow.
> 
> In the lib/galaxy/web/form_builder.py I added the import on
> string_as_bool from galaxy.util, then I modified the code as
> follows:
> 
> 126 @staticmethod
> 127 def is_checked( value ):
> 128 if value == True:
> 129 return True
> 130 # This may look strange upon initial inspection, but see
> the comments in the get_html() method
> 131 # above for clarification.  Basically, if value is not
> True, then it will always be a list with
> 132 # 2 input fields ( a checkbox and a hidden field ) if
> the checkbox is checked.  If it is not
> 133 # checked, then value will be only the hidden field.
> 134 if isinstance(value, basestring):
> 135 return string_as_bool( value )
> 136 return isinstance( value, list ) and len( value ) == 2
> 
> (see l.134 and 135)
> The value variable actually contained something else than True or a
> list, namely the string "true".
> Now it seems to work fine.
> 
> Cheers,
> L-A
> 
> 
> Le 23/05/2011 18:26, Peter Cock a écrit :
> >2011/5/23 Louise-Amélie Schmitt:
> >>@ Peter: I'm not sure I can get more precise... the checked attribute has no
> >>effect whatsoever, the boxes are always unchecked when I open the tool. I
> >>tried the "yes" and the "true" values to no avail.
> >>
> >>@ Leandro: Yes I already saw that ...
> >>
> >>But that's actually not the issue here. I just want my checkboxes to be
> >>checked by default, and it appears not to work.
> >>
> >>To give an example, here is one of the lines of my tool XML file:
> >>
> >>This checkbox remains unchecked at tool opening.
> >>
> >>As far as I know, some people managed to get it working and I'd like to know
> >>how.
> >>
> >>Any suggestion?
> >I think you've found a bug :(
> >
> >I found two working examples, "Filter out low complexity regions (with
> >DUST)" parameter in tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml and
> >the scaffolding parameter in sr_assembly/velvetg.xml - however they
> >are both within a conditional parameter section (only shown in
> >advanced mode).
> >
> >Have a look at sr_mapping/bwa_color_wrapper.xml which has a "Suppress
> >the header in the output SAM file" boolean which should be checked by
> >default:
> >
> > >falsevalue="false" checked="true" label="Suppress the header in the
> >output SAM file" help="BWA produces SAM with several lines of header
> >information" />
> >
> >It's not working on http://usegalaxy.org - the box isn't checked.
> >
> >If you can verify that, please file an issue on bitbucket:
> >https://bitbucket.org/galaxy/galaxy-central/issues/new
> >
> >Peter
> 
> ___
> 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/


Re: [galaxy-dev] Checkboxes/booleans in tools, again

2011-05-23 Thread Louise-Amélie Schmitt

Yeah, and I fixed it... somehow.

In the lib/galaxy/web/form_builder.py I added the import on 
string_as_bool from galaxy.util, then I modified the code as follows:


126 @staticmethod
127 def is_checked( value ):
128 if value == True:
129 return True
130 # This may look strange upon initial inspection, but see the 
comments in the get_html() method
131 # above for clarification.  Basically, if value is not True, 
then it will always be a list with
132 # 2 input fields ( a checkbox and a hidden field ) if the 
checkbox is checked.  If it is not

133 # checked, then value will be only the hidden field.
134 if isinstance(value, basestring):
135 return string_as_bool( value )
136 return isinstance( value, list ) and len( value ) == 2

(see l.134 and 135)
The value variable actually contained something else than True or a 
list, namely the string "true".

Now it seems to work fine.

Cheers,
L-A


Le 23/05/2011 18:26, Peter Cock a écrit :

2011/5/23 Louise-Amélie Schmitt:

@ Peter: I'm not sure I can get more precise... the checked attribute has no
effect whatsoever, the boxes are always unchecked when I open the tool. I
tried the "yes" and the "true" values to no avail.

@ Leandro: Yes I already saw that ...

But that's actually not the issue here. I just want my checkboxes to be
checked by default, and it appears not to work.

To give an example, here is one of the lines of my tool XML file:

This checkbox remains unchecked at tool opening.

As far as I know, some people managed to get it working and I'd like to know
how.

Any suggestion?

I think you've found a bug :(

I found two working examples, "Filter out low complexity regions (with
DUST)" parameter in tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml and
the scaffolding parameter in sr_assembly/velvetg.xml - however they
are both within a conditional parameter section (only shown in
advanced mode).

Have a look at sr_mapping/bwa_color_wrapper.xml which has a "Suppress
the header in the output SAM file" boolean which should be checked by
default:



It's not working on http://usegalaxy.org - the box isn't checked.

If you can verify that, please file an issue on bitbucket:
https://bitbucket.org/galaxy/galaxy-central/issues/new

Peter


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


Re: [galaxy-dev] Checkboxes/booleans in tools, again

2011-05-23 Thread Peter Cock
2011/5/23 Louise-Amélie Schmitt :
> @ Peter: I'm not sure I can get more precise... the checked attribute has no
> effect whatsoever, the boxes are always unchecked when I open the tool. I
> tried the "yes" and the "true" values to no avail.
>
> @ Leandro: Yes I already saw that ...
>
> But that's actually not the issue here. I just want my checkboxes to be
> checked by default, and it appears not to work.
>
> To give an example, here is one of the lines of my tool XML file:
> 
> This checkbox remains unchecked at tool opening.
>
> As far as I know, some people managed to get it working and I'd like to know
> how.
>
> Any suggestion?

I think you've found a bug :(

I found two working examples, "Filter out low complexity regions (with
DUST)" parameter in tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml and
the scaffolding parameter in sr_assembly/velvetg.xml - however they
are both within a conditional parameter section (only shown in
advanced mode).

Have a look at sr_mapping/bwa_color_wrapper.xml which has a "Suppress
the header in the output SAM file" boolean which should be checked by
default:



It's not working on http://usegalaxy.org - the box isn't checked.

If you can verify that, please file an issue on bitbucket:
https://bitbucket.org/galaxy/galaxy-central/issues/new

Peter

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


Re: [galaxy-dev] Checkboxes/booleans in tools, again

2011-05-23 Thread Louise-Amélie Schmitt
@ Peter: I'm not sure I can get more precise... the checked attribute 
has no effect whatsoever, the boxes are always unchecked when I open the 
tool. I tried the "yes" and the "true" values to no avail.


@ Leandro: Yes I already saw that and tried to correct the code the way 
someone suggested in the mailing list archives:

http://lists.bx.psu.edu/pipermail/galaxy-dev/attachments/20100924/03979abb/attachment.obj
But since I couldn't get it working I found another way to do what I want.
But that's actually not the issue here. I just want my checkboxes to be 
checked by default, and it appears not to work.


To give an example, here is one of the lines of my tool XML file:

This checkbox remains unchecked at tool opening.

As far as I know, some people managed to get it working and I'd like to 
know how.


Any suggestion?

Thanks,
L-A


Le 23/05/2011 16:29, Leandro Hermida a écrit :
Not everything works correctly with checkbox booleans, the bug a 
couple people and I reported long ago


https://bitbucket.org/galaxy/galaxy-central/issue/393/cant-use-checkbox-boolean-with-conditional

is still there.

2011/5/23 Peter Cock >


2011/5/23 Louise-Amélie Schmitt mailto:louise-amelie.schm...@embl.de>>:
> Hello,
>
> I know this is still not fully implemented and that there has
already been a
> lot of messages on the topic, but I just would like to know if
there's a way
> to make the "checked" attribute in the param tags have the
required effect.

It might help if you were more precise - what isn't working for you?

Ideally there would be an issue already reported on this on bitbucket.
https://bitbucket.org/galaxy/galaxy-central/issues?sort=-id

As I recall, the checked attribute is working fine for boolean
parameters:
https://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax

Peter

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

Re: [galaxy-dev] Checkboxes/booleans in tools, again

2011-05-23 Thread Leandro Hermida
Not everything works correctly with checkbox booleans, the bug a couple
people and I reported long ago

https://bitbucket.org/galaxy/galaxy-central/issue/393/cant-use-checkbox-boolean-with-conditional

is still there.

2011/5/23 Peter Cock 

> 2011/5/23 Louise-Amélie Schmitt :
> > Hello,
> >
> > I know this is still not fully implemented and that there has already
> been a
> > lot of messages on the topic, but I just would like to know if there's a
> way
> > to make the "checked" attribute in the param tags have the required
> effect.
>
> It might help if you were more precise - what isn't working for you?
>
> Ideally there would be an issue already reported on this on bitbucket.
> https://bitbucket.org/galaxy/galaxy-central/issues?sort=-id
>
> As I recall, the checked attribute is working fine for boolean parameters:
> https://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax
>
> Peter
>
> ___
> 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/

Re: [galaxy-dev] Checkboxes/booleans in tools, again

2011-05-23 Thread Peter Cock
2011/5/23 Louise-Amélie Schmitt :
> Hello,
>
> I know this is still not fully implemented and that there has already been a
> lot of messages on the topic, but I just would like to know if there's a way
> to make the "checked" attribute in the param tags have the required effect.

It might help if you were more precise - what isn't working for you?

Ideally there would be an issue already reported on this on bitbucket.
https://bitbucket.org/galaxy/galaxy-central/issues?sort=-id

As I recall, the checked attribute is working fine for boolean parameters:
https://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax

Peter

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


[galaxy-dev] Checkboxes/booleans in tools, again

2011-05-23 Thread Louise-Amélie Schmitt

Hello,

I know this is still not fully implemented and that there has already 
been a lot of messages on the topic, but I just would like to know if 
there's a way to make the "checked" attribute in the param tags have the 
required effect.


Regards,
L-A

PS: looking forward to seeing the conference in Lunteren :)
___
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/