Can a tool upload a .loc file that is then reused by subsequent versions of the tool?
Hey folks! I'm trying to revise a tool that allows the user to select from an extendable list of template files for generating blast report output. The idea is that if some reporting needs aren't covered by a generic template, then they can develop their own template which can then show up on the list. And, wanting this to work with a tool that is versioned in the toolshed! So: 1) is there a way to include a .loc.sample in the tool that gets uploaded, and then can be manually revised over time? A .loc file that subsequent versions of the tool would reuse (instead of using their own minimal one that comes with toolshed install)? I can simply have the default template in the tools code folder, since it is apt to be upgraded over time. Custom reports would have their own absolute file paths defined in the .loc file. Thanks for your input! Damion
Isn't this how *.loc.sample files already work? If there is no pre-existing *.loc file, the *.loc.sample file is copied to become the initial *.loc file which the local Galaxy administrator can update/fill in as needed. Peter On Mon, Apr 7, 2014 at 9:39 PM, Dooley, Damion <Damion.Dooley@bccdc.ca> wrote:
Hey folks! I'm trying to revise a tool that allows the user to select from an extendable list of template files for generating blast report output. The idea is that if some reporting needs aren't covered by a generic template, then they can develop their own template which can then show up on the list. And, wanting this to work with a tool that is versioned in the toolshed!
So: 1) is there a way to include a .loc.sample in the tool that gets uploaded, and then can be manually revised over time? A .loc file that subsequent versions of the tool would reuse (instead of using their own minimal one that comes with toolshed install)?
I can simply have the default template in the tools code folder, since it is apt to be upgraded over time. Custom reports would have their own absolute file paths defined in the .loc file.
Thanks for your input!
Damion ___________________________________________________________ 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/
Oh, great! I'd assumed new tool versions would overwrite them so they could implement changes. But what you say is simpler and more straightforward! Thanks, D. ________________________________________ From: Peter Cock [p.j.a.cock@googlemail.com] Sent: Monday, April 07, 2014 2:23 PM To: Dooley, Damion Cc: galaxy-dev@lists.bx.psu.edu Subject: Re: [galaxy-dev] Can a tool upload a .loc file that is then reused by subsequent versions of the tool? Isn't this how *.loc.sample files already work? If there is no pre-existing *.loc file, the *.loc.sample file is copied to become the initial *.loc file which the local Galaxy administrator can update/fill in as needed. Peter
Better test it to make sure ;) Of course, if you really want the use the *.loc file as a static configuration file which should be updated in sync with the tool code, that might be a problem... Peter On Mon, Apr 7, 2014 at 11:09 PM, Dooley, Damion <Damion.Dooley@bccdc.ca> wrote:
Oh, great! I'd assumed new tool versions would overwrite them so they could implement changes. But what you say is simpler and more straightforward!
Thanks,
D. ________________________________________ From: Peter Cock [p.j.a.cock@googlemail.com] Sent: Monday, April 07, 2014 2:23 PM To: Dooley, Damion Cc: galaxy-dev@lists.bx.psu.edu Subject: Re: [galaxy-dev] Can a tool upload a .loc file that is then reused by subsequent versions of the tool?
Isn't this how *.loc.sample files already work? If there is no pre-existing *.loc file, the *.loc.sample file is copied to become the initial *.loc file which the local Galaxy administrator can update/fill in as needed.
Peter
Python code in galaxy tools can import all sorts of modules. Is there a way to add an extra path to the sys.path so that I can include some other python modules that way? I.e. in some galaxy python config file? I'd like to say in my tool code HTMLReportModule = __import__(html_template) ... htmlManager = HTMLReportModule.HTMLReport(tagGroup, options, query_stats) htmlManager.render(out_tabular_file, out_html_file) and in this way provide a switch from a standard report template that my galaxy tool has in its folder, to a custom one that a client has fiddled with and is comfortably outside galaxy's codespace. The html_template variable would have 'templates.html_report' for the stock template, but 'custom_templates.html_report' would pull it from wherever was set in the path. Seems like a secure approach. (I don't want to pass the paths via the browser). Thanks for your help! Damion
participants (2)
-
Dooley, Damion
-
Peter Cock