Re: [galaxy-dev] checkboxes bug fix

2011-08-25 Thread Louise-Amélie Schmitt

Hi Kanwei, and thanks for your reply.

I might have missed something really big but I'm kinda confused.

I just double checked galaxy-dist and galaxy-central on bitbucket and I 
would like to know if I understood the code properly. Please correct me 
if I'm wrong.


Let's look at the is_checked() method of the CheckboxField class in the 
lib/galaxy/web/form_builder.py file:


If I'm not mistaken, it relies on the fact that if the checkbox is 
checked, the request will get two values (the checkbox and the hidden 
field) and if it is not, it will only get one value (the hidden field) 
since they bear the same name.


The first part is the conditional that checks if the value is True: That 
means that there is only one value, so the checkbox must be unchecked. 
Therefore it tests the hidden field's value. It will return True if the 
hidden field's value is true.


The second part is only executed if the above condition is false: this 
means either the checkbox is actually checked, or it is unchecked and 
the hidden field is false. It returns true if there are two values, i.e. 
if the checkbox is checked. If the hidden field is false, it will 
obviously return False.


So, let's see both cases:

- 1st case: the hidden field is true: If the checkbox is unchecked, the 
method will return True in the first part. If it is checked, it will 
also return True in the second part.


- 2d case: the hidden field is false: If the checkbox is checked, like 
in the 1st case, the second part will return True. But if it is 
unchecked, the first part won't return anything since the received value 
is not True. So it will return the result of the second part which is 
false since False is not an instance of list.


Now my questions are: Did I miss anything? If not, how can the first 
case work for you? Wouldn't there be some cases where a checkbox 
actually gives a value even if it is unchecked, and a field is ignored 
of there is already one with the same name?


Thanks,
L-A


Le 24/08/2011 19:36, Kanwei Li a écrit :

Hi L-A,

I tried this on today's tip but could not reproduce the bug. I added 
your param param name=SQA type=boolean label=Run SolexaQA 
checked=true / to a tool and the correct value was produced on the 
command line and in the configfiles block as well. Re-running also 
gave the correct result. Are you still seeing this problem?


Thanks,

K

2011/8/15 Louise-Amélie Schmitt louise-amelie.schm...@embl.de 
mailto:louise-amelie.schm...@embl.de


Hello,

Sorry for being late, again, but please find the tool attached.

Here is my last pull: 5743:720455407d1c

Stuff changed in the file but in the end I had to make the same
modification again (change true to false) since it didn't work
anymore.

Best,
L-A



Le 15/06/2011 09:56, Louise-Amélie Schmitt a écrit :

Hi, and sorry for the late reply

Here is the last pull: 5355:50e249442c5a

I'll try to be as concise as I can but I can send you the
whole file if you need it. It's not completely done yet though.

This is a tool that produces a HTML file containing the
results of various quality assessment programs. To trigger or
block the execution of a specific program, I use checkboxes in
the form, like this:
param name=SQA type=boolean label=Run SolexaQA
checked=true /

Then, I use the configfile name=script tags to define a
shell script that will be modified with cheetah tests on the
checkboxes.

Then the final script is sent to another shell script  that
will check its existence and launch it:
command interpreter='sh'all_QA.sh $script /command

As you can see, the checkboxes are checked by default. But
before the change I mentioned is my last email, un-checking
them didn't have any effect whatsoever. The following test,
for instance, was always true:
#if $SQA.value == True

Moreover, even if I un-checked the checkboxes and ran the
tool, then clicked the re-run button in the result in my
history, all of them were checked in the form that appears, as
if I never un-checked them.

Now, the state of the checkboxes is respected and I can
properly choose what to run in my tool.

Hope that helps.
L-A


Le 08/06/2011 20:54, Jennifer Jackson a écrit :

Hi L-A,

Could you describe a use case (which tool/from, what
options/input)? If you know the last pull # for your local
install, that would also be helpful for us to know.

Best,

Jen
Galaxy team

On 6/6/11 2:15 AM, Louise-Amélie Schmitt wrote:

Hi,

Since I haven't updated Galaxy for a while now I don't
know if it was
actually fixed but I had issues with my
default-selected 

Re: [galaxy-dev] checkboxes bug fix

2011-08-24 Thread Kanwei Li
Hi L-A,

I tried this on today's tip but could not reproduce the bug. I added your
param param name=SQA type=boolean label=Run SolexaQA checked=true
/ to a tool and the correct value was produced on the command line and in
the configfiles block as well. Re-running also gave the correct result.
Are you still seeing this problem?

Thanks,

K

2011/8/15 Louise-Amélie Schmitt louise-amelie.schm...@embl.de

 Hello,

 Sorry for being late, again, but please find the tool attached.

 Here is my last pull: 5743:720455407d1c

 Stuff changed in the file but in the end I had to make the same
 modification again (change true to false) since it didn't work anymore.

 Best,
 L-A



 Le 15/06/2011 09:56, Louise-Amélie Schmitt a écrit :

  Hi, and sorry for the late reply

 Here is the last pull: 5355:50e249442c5a

 I'll try to be as concise as I can but I can send you the whole file if
 you need it. It's not completely done yet though.

 This is a tool that produces a HTML file containing the results of various
 quality assessment programs. To trigger or block the execution of a specific
 program, I use checkboxes in the form, like this:
 param name=SQA type=boolean label=Run SolexaQA checked=true /

 Then, I use the configfile name=script tags to define a shell script
 that will be modified with cheetah tests on the checkboxes.

 Then the final script is sent to another shell script  that will check its
 existence and launch it:
 command interpreter='sh'all_QA.sh $script /command

 As you can see, the checkboxes are checked by default. But before the
 change I mentioned is my last email, un-checking them didn't have any effect
 whatsoever. The following test, for instance, was always true:
 #if $SQA.value == True

 Moreover, even if I un-checked the checkboxes and ran the tool, then
 clicked the re-run button in the result in my history, all of them were
 checked in the form that appears, as if I never un-checked them.

 Now, the state of the checkboxes is respected and I can properly choose
 what to run in my tool.

 Hope that helps.
 L-A


 Le 08/06/2011 20:54, Jennifer Jackson a écrit :

 Hi L-A,

 Could you describe a use case (which tool/from, what options/input)? If
 you know the last pull # for your local install, that would also be helpful
 for us to know.

 Best,

 Jen
 Galaxy team

 On 6/6/11 2:15 AM, Louise-Amélie Schmitt wrote:

 Hi,

 Since I haven't updated Galaxy for a while now I don't know if it was
 actually fixed but I had issues with my default-selected checkboxes:

 When I deselected them, the value sent in the query remained as if they
 were still selected. Even when I re-ran the job, all the checkboxes were
 selected as if I never deselected them.

 Therefore, in lib/galaxy/web/form_builder.py

 I changed:
 105 return 'input type=checkbox id=%s name=%s
 value=true%s%sinput type=hidden name=%s%s value=true%s' \

 for:
 105 return 'input type=checkbox id=%s name=%s
 value=true%s%sinput type=hidden name=%s%s value=false%s' \

 And it works fine now :)

 Cheers,
 L-A
 __**_
 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/



 ___
 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 bug fix

2011-08-15 Thread Louise-Amélie Schmitt

Hello,

Sorry for being late, again, but please find the tool attached.

Here is my last pull: 5743:720455407d1c

Stuff changed in the file but in the end I had to make the same 
modification again (change true to false) since it didn't work anymore.


Best,
L-A



Le 15/06/2011 09:56, Louise-Amélie Schmitt a écrit :

Hi, and sorry for the late reply

Here is the last pull: 5355:50e249442c5a

I'll try to be as concise as I can but I can send you the whole file 
if you need it. It's not completely done yet though.


This is a tool that produces a HTML file containing the results of 
various quality assessment programs. To trigger or block the execution 
of a specific program, I use checkboxes in the form, like this:

param name=SQA type=boolean label=Run SolexaQA checked=true /

Then, I use the configfile name=script tags to define a shell 
script that will be modified with cheetah tests on the checkboxes.


Then the final script is sent to another shell script  that will check 
its existence and launch it:

command interpreter='sh'all_QA.sh $script /command

As you can see, the checkboxes are checked by default. But before the 
change I mentioned is my last email, un-checking them didn't have any 
effect whatsoever. The following test, for instance, was always true:

#if $SQA.value == True

Moreover, even if I un-checked the checkboxes and ran the tool, then 
clicked the re-run button in the result in my history, all of them 
were checked in the form that appears, as if I never un-checked them.


Now, the state of the checkboxes is respected and I can properly 
choose what to run in my tool.


Hope that helps.
L-A


Le 08/06/2011 20:54, Jennifer Jackson a écrit :

Hi L-A,

Could you describe a use case (which tool/from, what options/input)? 
If you know the last pull # for your local install, that would also 
be helpful for us to know.


Best,

Jen
Galaxy team

On 6/6/11 2:15 AM, Louise-Amélie Schmitt wrote:

Hi,

Since I haven't updated Galaxy for a while now I don't know if it was
actually fixed but I had issues with my default-selected checkboxes:

When I deselected them, the value sent in the query remained as if they
were still selected. Even when I re-ran the job, all the checkboxes 
were

selected as if I never deselected them.

Therefore, in lib/galaxy/web/form_builder.py

I changed:
105 return 'input type=checkbox id=%s name=%s
value=true%s%sinput type=hidden name=%s%s value=true%s' \

for:
105 return 'input type=checkbox id=%s name=%s
value=true%s%sinput type=hidden name=%s%s value=false%s' \

And it works fine now :)

Cheers,
L-A
___
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/


tool id=all_QA name=QA Bundle description=performs multiple QA
	command interpreter='sh'all_QA.sh $script /command
	inputs

	param name=input type=data label=Input file format=fastq,fastqillumina,sam,export,bam checked=true /


		param name=R type=boolean label=Run R QA (runs only on export files) checked=true /


		param name=HTSeq type=boolean label=Run HTSeq QA checked=true /


		param name=C type=boolean label=Run baseQual (work only with fastq files) checked=true /

		param name=SQA type=boolean label=Run SolexaQA checked=true /

		param type=select name=SQA_cutoff label=#60;span style=#34;font-weight:normal;#34;#62;Cutoff (phred value at which base-calling error is considered too high)#60;/span#62; help=
	   		option value=1010 (90%)/option
	   		option value=13 selected=true13 (95%)/option
	   		option value=2020 (99%)/option
	   		option value=3030 (99.9%)/option
	   		option value=4040 (99.99%)/option
		/param
		param type=select name=SQA_variance label=#60;span style=#34;font-weight:normal;#34;#62;Calculate variance statistics#60;/span#62; display=radio help=
	   		option value= selected=trueNo thanks/option
	   		option value=-vYes please/option
		/param
		param type=select name=SQA_minmax label=#60;span style=#34;font-weight:normal;#34;#62;Calculate minimum and maximum error probabilities for each read position of each tile#60;/span#62; display=radio help=
	   		option value= selected=trueNo thanks/option
	   		option value=-mYes please/option
		/param
		param name=SQA_sample size=6 type=integer value=1 label=#60;span style=#34;font-weight:normal;#34;#62;Number of sequences to be sampled per tile for satistic estimates#60;/span#62; help= /
		
		
		param name=CovE type=boolean label=Run Coverage Estimation checked=true /
		param type=select name=window label=#60;span style=#34;font-weight:normal;#34;#62;Windows size for 

Re: [galaxy-dev] checkboxes bug fix

2011-06-08 Thread Jennifer Jackson

Hi L-A,

Could you describe a use case (which tool/from, what options/input)? If 
you know the last pull # for your local install, that would also be 
helpful for us to know.


Best,

Jen
Galaxy team

On 6/6/11 2:15 AM, Louise-Amélie Schmitt wrote:

Hi,

Since I haven't updated Galaxy for a while now I don't know if it was
actually fixed but I had issues with my default-selected checkboxes:

When I deselected them, the value sent in the query remained as if they
were still selected. Even when I re-ran the job, all the checkboxes were
selected as if I never deselected them.

Therefore, in lib/galaxy/web/form_builder.py

I changed:
105 return 'input type=checkbox id=%s name=%s
value=true%s%sinput type=hidden name=%s%s value=true%s' \

for:
105 return 'input type=checkbox id=%s name=%s
value=true%s%sinput type=hidden name=%s%s value=false%s' \

And it works fine now :)

Cheers,
L-A
___
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/


--
Jennifer Jackson
http://usegalaxy.org
http://galaxyproject.org
___
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 bug fix

2011-06-06 Thread Louise-Amélie Schmitt

Hi,

Since I haven't updated Galaxy for a while now I don't know if it was 
actually fixed but I had issues with my default-selected checkboxes:


When I deselected them, the value sent in the query remained as if they 
were still selected. Even when I re-ran the job, all the checkboxes were 
selected as if I never deselected them.


Therefore, in lib/galaxy/web/form_builder.py

I changed:
105return 'input type=checkbox id=%s name=%s 
value=true%s%sinput type=hidden name=%s%s value=true%s' \


for:
105return 'input type=checkbox id=%s name=%s 
value=true%s%sinput type=hidden name=%s%s value=false%s' \


And it works fine now :)

Cheers,
L-A
___
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/