Hi Galaxy Dev,
Been having trouble getting my Galaxy tools to work with the testtoolshed. Here is the tools repository: https://jeremyjliu@testtoolshed.g2.bx.psu.edu/repos/jeremyjliu/region_motif_...
In particular, I've been focusing on getting the region_motif_intersect.r script to work properly when installed from the testtoolshed. intersect.r runs using files located in the same location as where the repository is installed, in the folder region_motif_db. To make sure that the tool knows where these files are, I've been trying to pass the repository install location as an argument in the r script invocation (see region_motif_intersect.xml and tool_dependencies.xml) .
To set the repository install location in the environment, I've been basing off of this wiki entry: https://wiki.galaxyproject.org/ToolsWithDependenciesInSameRepository
When I install the repository to my local Galaxy, it gives me the following warnings: galaxy.tools.deps DEBUG 2014-10-25 15:12:35,376 Building dependency shell command for dependency 'R_SCRIPT_PATH' galaxy.tools.deps WARNING 2014-10-25 15:12:35,377 Failed to resolve dependency on 'R_SCRIPT_PATH', ignoring
Then when I run the tool from Galaxy, this is the run command: PACKAGE_BASE=/Users/jeremyliu1/galaxy-dist/tool-dependency/R/2.15.1/jeremyjliu/region_motif_enrichment/7a3bb055f3d0; export PACKAGE_BASE; . /Users/jeremyliu1/galaxy-dist/tool-dependency/R/2.15.1/jeremyjliu/region_motif_enrichment/7a3bb055f3d0/env.sh; Rscript /Users/jeremyliu1/shed_tools/testtoolshed.g2.bx.psu.edu/repos/jeremyjliu/region_motif_enrichment/7a3bb055f3d0/region_motif_enrichment/region_motif_intersect.r --args $R_SCRIPT_PATH p /Users/jeremyliu1/galaxy-dist/database/files/000/dataset_504.dat /Users/jeremyliu1/galaxy-dist/database/files/000/dataset_515.dat
What exactly is going on here? How do I make sure my tool knows where the reference files it needs are, since it won't be in the job working directory?
Note: the files that intersect.r needs are not in the toolshed repository, since they are a few GB. I was planning on providing that as a separate download or using the Data Managers to solve the problem. But as long as I can get the tool to look for it in that folder, that would be perfect.
Thanks! Jeremy Liu jeremy.liu@yale.edu 352.871.1258
I think a working example that uses this pattern is Bjoern's glimmer tool:
https://github.com/bgruening/galaxytools/tree/master/glimmer3
The only obvious difference I see that he sets the environment variable to $REPOSITORY_INSTALL_DIR in tool_dependencies.xml (<environment_variable name="GLIMMER_SCRIPT_PATH" action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable>). Does changing that fix anything? He also escapes the environment variable in the command $R_SCRIPT_PATH instead of $R_SCRIPT_PATH in your case.
-John
P.S.
I find set_environment to be something of an anti-pattern myself - it doesn't map well to other packaging systems such as nix or brew. I think it would be better to resolve things relative to the script from the script itself or to write out a helper script that wraps up R and stuff and resolve paths relative to itself but I guess that is beside the point.
On Sat, Oct 25, 2014 at 3:38 PM, Jeremy Liu jeremy.liu@yale.edu wrote:
Hi Galaxy Dev,
Been having trouble getting my Galaxy tools to work with the testtoolshed. Here is the tools repository: https://jeremyjliu@testtoolshed.g2.bx.psu.edu/repos/jeremyjliu/region_motif_...
In particular, I've been focusing on getting the region_motif_intersect.r script to work properly when installed from the testtoolshed. intersect.r runs using files located in the same location as where the repository is installed, in the folder region_motif_db. To make sure that the tool knows where these files are, I've been trying to pass the repository install location as an argument in the r script invocation (see region_motif_intersect.xml and tool_dependencies.xml) .
To set the repository install location in the environment, I've been basing off of this wiki entry: https://wiki.galaxyproject.org/ToolsWithDependenciesInSameRepository
When I install the repository to my local Galaxy, it gives me the following warnings: galaxy.tools.deps DEBUG 2014-10-25 15:12:35,376 Building dependency shell command for dependency 'R_SCRIPT_PATH' galaxy.tools.deps WARNING 2014-10-25 15:12:35,377 Failed to resolve dependency on 'R_SCRIPT_PATH', ignoring
Then when I run the tool from Galaxy, this is the run command: PACKAGE_BASE=/Users/jeremyliu1/galaxy-dist/tool-dependency/R/2.15.1/jeremyjliu/region_motif_enrichment/7a3bb055f3d0; export PACKAGE_BASE; . /Users/jeremyliu1/galaxy-dist/tool-dependency/R/2.15.1/jeremyjliu/region_motif_enrichment/7a3bb055f3d0/env.sh; Rscript /Users/jeremyliu1/shed_tools/testtoolshed.g2.bx.psu.edu/repos/jeremyjliu/region_motif_enrichment/7a3bb055f3d0/region_motif_enrichment/region_motif_intersect.r --args $R_SCRIPT_PATH p /Users/jeremyliu1/galaxy-dist/database/files/000/dataset_504.dat /Users/jeremyliu1/galaxy-dist/database/files/000/dataset_515.dat
What exactly is going on here? How do I make sure my tool knows where the reference files it needs are, since it won't be in the job working directory?
Note: the files that intersect.r needs are not in the toolshed repository, since they are a few GB. I was planning on providing that as a separate download or using the Data Managers to solve the problem. But as long as I can get the tool to look for it in that folder, that would be perfect.
Thanks! Jeremy Liu jeremy.liu@yale.edu 352.871.1258 ___________________________________________________________ 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/
galaxy-dev@lists.galaxyproject.org