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