Can a tool upload a .loc file that is then reused by subsequent versions of the tool?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Can a tool upload a .loc file that is then reused by subsequent versions of the tool?

Dooley, Damion
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/
Reply | Threaded
Open this post in threaded view
|

Re: Can a tool upload a .loc file that is then reused by subsequent versions of the tool?

Peter Cock
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 <[hidden email]> 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/

___________________________________________________________
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/
Reply | Threaded
Open this post in threaded view
|

Re: Can a tool upload a .loc file that is then reused by subsequent versions of the tool?

Dooley, Damion
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 [[hidden email]]
Sent: Monday, April 07, 2014 2:23 PM
To: Dooley, Damion
Cc: [hidden email]
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
___________________________________________________________
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/
Reply | Threaded
Open this post in threaded view
|

Re: Can a tool upload a .loc file that is then reused by subsequent versions of the tool?

Peter Cock
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 <[hidden email]> 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 [[hidden email]]
> Sent: Monday, April 07, 2014 2:23 PM
> To: Dooley, Damion
> Cc: [hidden email]
> 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
___________________________________________________________
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/
Reply | Threaded
Open this post in threaded view
|

Re: Can a tool upload a .loc file that is then reused by subsequent versions of the tool?

Dooley, Damion
In reply to this post by Peter Cock
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
___________________________________________________________
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/