Hi Geert,

> Hi,
> 
> Is there a default notation to specify perl modules (threading modules) 
> in a tool configuration or in a submission to the toolshed?
> 
> I've got some tools to share that make extensive use of these modules, 
> and they are not default in a perl distribution. Hence, I'd like to 
> inform the users that they need to install these modules (or that they 
> get installed by the the toolshed using cpan ?)

I'm not a perl erxpert but I will shortly explain what I try to do with
R packages and how it works with python modules.

For python we can install every package to a separate directory and add
it to PYTHONPATH. Once it is in PYTHONPATH every script can import the
module. Important is that we have control over the version of the python
module (we can fetch an archived tarball or specify the version with
pip).

https://github.com/bgruening/galaxytools/blob/master/orphan_tool_dependencies/package_biopython_1_61/tool_dependencies.xml

In R that is not so easy to do, because R assumes that the User always
want to install the latest version. But in Galaxy we need to install
every version at any time to enable reproducibility. What we did is to
archive the R tarballs in a github repository and download them from
there, install the tarballs manually and add it to R_LIBS. 
Once it is in R_LIBS we can import it in any scripts.

https://github.com/bgruening/galaxytools/blob/master/orphan_tool_dependencies/package_deseq2_1_0_17/tool_dependencies.xml

You can probably do the same in Perl, also it does not seem as easy as
in python. Please have a look here:

http://stackoverflow.com/questions/540640/how-can-i-install-a-cpan-module-into-a-local-directory
http://learn.perl.org/faq/perlfaq8.html#How-do-I-keep-my-own-module-library-directory-

Once you have done that you can add the library to PERL5LIB any you
should be done.

Please also consider to create an orphan tool dependency if the perl
library is common and the chance is high that other developers are also
interested to use that package. The two examples above are orphan tool
dependencies and are used by other packages.

http://wiki.galaxyproject.org/DefiningRepositoryDependencies

Hope that helps a little bit!
Bjoern

> Best,
> 
> Geert
> 
> 


___________________________________________________________
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 via email to