Hi guys,
The Tools API is currently working for me from galaxy-central, but I'm not sure how to correctly run a tool. Are there any example scripts, as there are for some other parts of the API? Specifically I want to find out what the expected payload fields are when I post to CREATE to run a tool.
Some of the fields are clear to me just from the api/tools.py code (e.g. 'tool_id') but others are not (e.g. how the input datasets and parameters are specified).
A separate question:
How do we specify "Advanced" or conditional-dependent fields for a tool? Some of these fields are necessary to run the tool at all. For instance, on my system, calling http://localhost:8080/api/tools/tophat?key=.... returns { "description": "Find splice junctions using RNA-seq data", "id": "tophat", "inputs": [ { "html": "%3Cselect%20name%3D%22input1%22%3E%0A%3C/select%3E", "label": "RNA-Seq FASTQ file", "name": "input1", "type": "data" }, { "label": "Conditional (refGenomeSource)", "name": "refGenomeSource" }, { "label": "Conditional (singlePaired)", "name": "singlePaired" } ], "name": "Tophat for Illumina", "version": "1.5.0" }
This is obviously only some of the inputs you see in the UI. I think that all the Advanced fields are missing, and more importantly, any input which is dependent on a conditional is missing. So the refGenomeSource conditional is there, but the actual reference genome field is not. The type of the reference genome field also presumably depends on which value is supplied for the referenceGenomeSource conditional.
Is there currently a way to specify (or see) these missing fields?
Thanks, Clare
Unfortunately, the tools API isn't at all complete right now. The tools API was driven by Trackster/Sweepster needs, so rerunning tools works well but running tools from scratch doesn't.
Practically, this means that the things you want to do, e.g.
*view tool parameters; *set tool input datasets;
are not yet supported.
As always, community contributions are welcome and encouraged.
Best, J.
On Aug 23, 2012, at 4:10 AM, Clare Sloggett wrote:
Hi guys,
The Tools API is currently working for me from galaxy-central, but I'm not sure how to correctly run a tool. Are there any example scripts, as there are for some other parts of the API? Specifically I want to find out what the expected payload fields are when I post to CREATE to run a tool.
Some of the fields are clear to me just from the api/tools.py code (e.g. 'tool_id') but others are not (e.g. how the input datasets and parameters are specified).
A separate question:
How do we specify "Advanced" or conditional-dependent fields for a tool? Some of these fields are necessary to run the tool at all. For instance, on my system, calling http://localhost:8080/api/tools/tophat?key=.... returns { "description": "Find splice junctions using RNA-seq data", "id": "tophat", "inputs": [ { "html": "%3Cselect%20name%3D%22input1%22%3E%0A%3C/select%3E", "label": "RNA-Seq FASTQ file", "name": "input1", "type": "data" }, { "label": "Conditional (refGenomeSource)", "name": "refGenomeSource" }, { "label": "Conditional (singlePaired)", "name": "singlePaired" } ], "name": "Tophat for Illumina", "version": "1.5.0" }
This is obviously only some of the inputs you see in the UI. I think that all the Advanced fields are missing, and more importantly, any input which is dependent on a conditional is missing. So the refGenomeSource conditional is there, but the actual reference genome field is not. The type of the reference genome field also presumably depends on which value is supplied for the referenceGenomeSource conditional.
Is there currently a way to specify (or see) these missing fields?
Thanks, Clare
--
Clare Sloggett Research Fellow / Bioinformatician Life Sciences Computation Centre Victorian Life Sciences Computation Initiative University of Melbourne, Parkville Campus 187 Grattan Street, Carlton, Melbourne Victoria 3010, Australia Ph: 03 903 53357 M: 0414 854 759 ___________________________________________________________ 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:
Hi Jeremy,
Thanks for the info!
I am confused though because the code in tools.py was what was making me think I could run a tool with specified inputs. ie I was looking at
def create( ... ) .... # Set up inputs. inputs = payload[ 'inputs' ] .... params = util.Params( inputs, sanitize = False ) template, vars = tool.handle_input( trans, params.__dict__ ) ....
I think that handle_input() executes the tool? Also, separately there is a method called _run_tool() (although unlike _rerun_tool() I can't see anything that calls it).
So, I thought from looking at the surface, that the tool-running code was there and that I just didn't know what data structure to pass into payload['inputs'] . Is it not doing what I think?
Thanks, Clare
On 23 August 2012 23:00, Jeremy Goecks jeremy.goecks@emory.edu wrote:
Unfortunately, the tools API isn't at all complete right now. The tools API was driven by Trackster/Sweepster needs, so rerunning tools works well but running tools from scratch doesn't.
Practically, this means that the things you want to do, e.g.
*view tool parameters; *set tool input datasets;
are not yet supported.
As always, community contributions are welcome and encouraged.
Best, J.
On Aug 23, 2012, at 4:10 AM, Clare Sloggett wrote:
Hi guys,
The Tools API is currently working for me from galaxy-central, but I'm not sure how to correctly run a tool. Are there any example scripts, as there are for some other parts of the API? Specifically I want to find out what the expected payload fields are when I post to CREATE to run a tool.
Some of the fields are clear to me just from the api/tools.py code (e.g. 'tool_id') but others are not (e.g. how the input datasets and parameters are specified).
A separate question:
How do we specify "Advanced" or conditional-dependent fields for a tool? Some of these fields are necessary to run the tool at all. For instance, on my system, calling http://localhost:8080/api/tools/tophat?key=.... returns { "description": "Find splice junctions using RNA-seq data", "id": "tophat", "inputs": [ { "html": "%3Cselect%20name%3D%22input1%22%3E%0A%3C/select%3E", "label": "RNA-Seq FASTQ file", "name": "input1", "type": "data" }, { "label": "Conditional (refGenomeSource)", "name": "refGenomeSource" }, { "label": "Conditional (singlePaired)", "name": "singlePaired" } ], "name": "Tophat for Illumina", "version": "1.5.0" }
This is obviously only some of the inputs you see in the UI. I think that all the Advanced fields are missing, and more importantly, any input which is dependent on a conditional is missing. So the refGenomeSource conditional is there, but the actual reference genome field is not. The type of the reference genome field also presumably depends on which value is supplied for the referenceGenomeSource conditional.
Is there currently a way to specify (or see) these missing fields?
Thanks, Clare
--
Clare Sloggett Research Fellow / Bioinformatician Life Sciences Computation Centre Victorian Life Sciences Computation Initiative University of Melbourne, Parkville Campus 187 Grattan Street, Carlton, Melbourne Victoria 3010, Australia Ph: 03 903 53357 M: 0414 854 759 ___________________________________________________________ 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:
I think that handle_input() executes the tool?
That's the intention and it should work but it hasn't been tested.
Also, separately there is a method called _run_tool() (although unlike _rerun_tool() I can't see anything that calls it).
Looks like _run_tool is almost a copy of what's in create(). This is probably legacy code from refactoring that hasn't been cleaned up yet.
So, I thought from looking at the surface, that the tool-running code was there and that I just didn't know what data structure to pass into payload['inputs'] . Is it not doing what I think?
I think your inference is correct, but, yes, there's the problem of specifying the tool input data structure. Tool inputs are specified as dictionaries (often with nested dictionaries for things like conditionals), so you could construct an appropriate input dictionary and could (likely) run a tool. However, there's no help in the API right now to help you construct an appropriate dictionary for a tool; this is the big missing piece in the tools API.
Best, J.
Hi Jeremy,
OK, that makes sense. Thanks again!
Clare
On 24 August 2012 02:17, Jeremy Goecks jeremy.goecks@emory.edu wrote:
I think that handle_input() executes the tool?
That's the intention and it should work but it hasn't been tested.
Also, separately there is a method called _run_tool() (although unlike _rerun_tool() I can't see anything that calls it).
Looks like _run_tool is almost a copy of what's in create(). This is probably legacy code from refactoring that hasn't been cleaned up yet.
So, I thought from looking at the surface, that the tool-running code was there and that I just didn't know what data structure to pass into payload['inputs'] . Is it not doing what I think?
I think your inference is correct, but, yes, there's the problem of specifying the tool input data structure. Tool inputs are specified as dictionaries (often with nested dictionaries for things like conditionals), so you could construct an appropriate input dictionary and could (likely) run a tool. However, there's no help in the API right now to help you construct an appropriate dictionary for a tool; this is the big missing piece in the tools API.
Best, J.
galaxy-dev@lists.galaxyproject.org