Re: [galaxy-dev] External data source config
I'm not quite sure how useful it will be to connect your external data source to Galaxy sInce you state: "The external data source's URL requires no parameters, and when the data is returned, it's just a URL directly to a file." It would be better if it could stream the data over HTTP to Galaxy. In any case, the parameters I describe are not contained in a <param> tag at the Galaxy end, but the request parameters generated by your external data source application which are sent to Galaxy so that it can post the request back to your data source. Have you read our wiki at http://bitbucket.org/galaxy/galaxy- central/wiki/DataSources? On Dec 9, 2009, at 2:10 PM, Chris Zaleski wrote:
Greg,
Thanks for the quick response. Forgive me for not (yet) having much Galaxy experience. Unfortunately there's still a concept I'm missing... For my simple example, could you please give an example of what would be the "value" attribute of the <param> tag?
Thanks again, Chris
On Wed, Dec 9, 2009 at 1:51 PM, Greg Von Kuster <greg@bx.psu.edu> wrote: Chris, you are correct in thinking that data_source.py is the only executable needed for this.
Your tool config ( the .xml file for your new tool ) will include "name", "id" and "tool_type" attributes in the tool tag like the following:
<tool name="Flymine" id="flymine" tool_type="data_source">
The Toolbox class in ~/tools/__init__.py includes the following method which parses this information when the tool is loaded:
def load_tool( elem, panel_dict ): try: path = elem.get( "file" ) tool = self.load_tool( os.path.join ( self.tool_root_dir, path ) ) self.tools_by_id[ tool.id ] = tool key = 'tool_' + tool.id panel_dict[ key ] = tool log.debug( "Loaded tool: %s %s" % ( tool.id, tool.version ) ) except: log.exception( "error reading tool from path: %s" % path )
So when Galaxy receives the post from the external data source, it will know which tool to execute with the param values received in the request as long as the "/tool_runner?tool_id=XXX" is included in the request.
On Dec 9, 2009, at 12:22 PM, Chris Zaleski wrote:
Greetings,
I have a question about setting up an external data source. My case should be fairly simple - The external data source's URL requires no parameters, and when the data is returned, it's just a URL directly to a file. Example: http://myserver/data_search_page.html returns... http://myserver/repository/the_file.bed
I've looked at multiple examples of the XML files & the wiki, and I think I've got it. However there's one part I'm still unclear about - the <param> tag inside the <inputs> tag. Examples: <param name="GALAXY_URL" type="baseurl" value="/tool_runner/ biomart" /> <param name="GALAXY_URL" type="baseurl" value="/tool_runner" /> <param name="GALAXY_URL" type="baseurl" value="/tool_runner? tool_id=flymine" />
It seems that the "value" string gets appended onto the GALAXY_URL (which would then be returned to Galaxy). Could you please explain what's happening here? Do I need to write a separate tool which would be executed by 'tool_runner'? I thought "data_source.py" *was* the tool, no?
Thanks very much for your help, Chris Zaleski Gingeras Lab - CSHL _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
Greg Von Kuster Galaxy Development Team greg@bx.psu.edu
Greg Von Kuster Galaxy Development Team greg@bx.psu.edu
participants (1)
-
Greg Von Kuster