Re: [galaxy-dev] Enabling an HTML report to prime a tool form (Dooley, Damion)

2014-04-16 Thread Dooley, Damion
For those who need it in the future, found the solution, so now the html 
report/form can trigger the given tool to run.  Turns out the tool_state value 
wasn't the problem.  It was the input type=hidden name=input 
value=%(dataset_selection_id)s / value that was wrong.  Solution: the xml 
tool template that triggers rendering of the html form needs to pass the right 
dataset id to the form (which then passes it to the target tool) so one needs 
to have $selection_file.id passed:
 
command interpreter=python
blast_reporting.py $blastxml_file $tabular_file $html_file $out_format 
$selection_file $selection_file.id $html_template
...
/command

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


[galaxy-dev] Enabling an HTML report to prime a tool form

2014-04-15 Thread Dooley, Damion
Hi Galaxians,

I've got a nice html report of blast results by query, and tabular subject 
result listing a handful of columns.  It was set up so that checkboxes by each 
row and a submit button for each subject sent form data to another tool we 
have.  I'd tricked the other tool's form into thinking it had all the right 
input for a refresh, including the tool_state string, borrowed from a previous 
view of that tool.  It worked great - it automatically submitted and generated 
a resulting dataset when the html report/form submitted to it - UNTIL ALAS it 
seems a change in history or session caused the tool form's tool_state string 
to fail and trigger an error on load (I guess it encodes some stuff that 
references the history panel?).  Looking at 
http://dev.list.galaxyproject.org/Feature-suggestion-quot-Re-Run-quot-button-td4132627.html
 it seemed like there might be a chance to encode a dummy tool_state?  

So, its a long shot, but is there a bare-bones tool_state code that doesn't 
care what's in the history for any given galaxy tool?  
Since this code is entirely in the html report rendering tool itself python 
doesn't seem to have access to galaxy system code.

Regards,

Damion


P.s. this is what the form html template looks like (borrowed mostly from the 
tool's html form itself):

form id=tool_form name=tool_form action=../../../tool_runner/index  
target=galaxy_main method=post enctype=application/x-www-form-urlencoded
input type=hidden name=refresh value=refresh /
input type=hidden name=tool_id value=bccdcSelectSubset /
input type=hidden name=tool_state 
value=800255f96366643436383763656132396561343433 ... 6471002e /
input type=hidden name=input value=%(dataset_selection_id)s /   
input type=hidden name=incl_excl value=1 /

input type=submit class=btn btn-primary name=runtool_btn 
value=Execute stuff /
input type=hidden name=select value=%(select_row)s /
...
trtdinput type=checkbox name=select value=2 
/gi|158343637|gb|EU057648.1|/td
td class=numeric99.55/td
td class=numeric442/td
td class=numeric2/td
td class=numeric0/td
.../tr
etc.

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