{"action":"created","issue":{"url":"https://api.github.com/repos/galaxyproject/galaxy/issues/2783","repository_url":"https://api.github.com/repos/galaxyproject/galaxy","labels_url":"https://api.github.com/repos/galaxyproject/galaxy/issues/2783/labels{/name}","comments_url":"https://api.github.com/repos/galaxyproject/galaxy/issues/2783/comments","events_url":"https://api.github.com/repos/galaxyproject/galaxy/issues/2783/events","html_url":"https://github.com/galaxyproject/galaxy/issues/2783","id":170931895,"number":2783,"title":"Conda resolver does not locate R package components during tool execution","user":{"login":"gregvonkuster","id":6947053,"avatar_url":"https://avatars.githubusercontent.com/u/6947053?v=3","gravatar_id":"","url":"https://api.github.com/users/gregvonkuster","html_url":"https://github.com/gregvonkuster","followers_url":"https://api.github.com/users/gregvonkuster/followers","following_url":"https://api.github.com/users/gregvonkuster/following{/other_user}","gists_url":"https://api.github.com/users/gregvonkuster/gists{/gist_id}","starred_url":"https://api.github.com/users/gregvonkuster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregvonkuster/subscriptions","organizations_url":"https://api.github.com/users/gregvonkuster/orgs","repos_url":"https://api.github.com/users/gregvonkuster/repos","events_url":"https://api.github.com/users/gregvonkuster/events{/privacy}","received_events_url":"https://api.github.com/users/gregvonkuster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-08-12T18:33:54Z","updated_at":"2016-08-12T20:50:18Z","closed_at":null,"body":"Based on this PR https://github.com/galaxyproject/galaxy/pull/2759, community discussions, etc, I have configured my various local Galaxy development environments to use conda dependency resolution for tools, but I've encountered errors for tools that require R.\r\n\r\nI have a simple tool that looks like this:\r\n```\r\n<?xml version=\".\"?>\r\n<tool id=\"my_tool\" name=\"My tool\" version=\"1.0.0\">\r\n    <description></description>\r\n    <requirements>\r\n         <requirement type=\"package\" version=\"3.3.1\">R</requirement>\r\n    </requirements>\r\n    <command>\r\n        <![CDATA[\r\n            Rscript $__tool_directory__/my_tool.R\r\n            -o \"$output\"\r\n        ]]>\r\n    </command>\r\n    <inputs>\r\n    </inputs>\r\n    <outputs>\r\n        <data name=\"output\" format=\"RData\"/>\r\n    </outputs>\r\n    <help>\r\n    </help>\r\n    <citations>\r\n        <citation></citation>\r\n    </citations>\r\n</tool>\r\n```\r\nI have made sure that my conda dependency resolver configuration settings in galaxy.ini are correct:\r\n```\r\nconda_prefix = /home/greg/work/ts_install/tool_dependency_dir/_conda\r\nconda_exec = /home/greg/work/ts_install/tool_dependency_dir/_conda/bin/conda\r\nconda_debug = True\r\nconda_ensure_channels = r,bioconda,iuc\r\nconda_auto_install = True\r\nconda_verbose_install_check=True\r\nconda_auto_init = True\r\n```\r\nI have conda set as my only dependency resolver in dependency_resolvers_conf.xml:\r\n```\r\n<dependency_resolvers>\r\n  <conda />\r\n  <conda versionless=\"true\" />\r\n</dependency_resolvers>\r\n```\r\nWhen I install the tool from the Tool Shed, the dependency install process works just fine using conda - conda itself and the tool dependencies are installed in the configured location:\r\n```\r\n$ pwd\r\n/home/greg/work/ts_install/tool_dependency_dir/_conda\r\n(.venv) [greg@bigsky _conda]$ ll\r\ntotal 68\r\ndrwxrwxr-x. 12 greg greg  4096 Aug 12 13:45 .\r\ndrwxrwxr-x.  3 greg greg  4096 Aug 11 11:26 ..\r\ndrwxrwxr-x.  2 greg greg 12288 Aug 12 13:29 bin\r\ndrwxrwxr-x.  2 greg greg  4096 Aug 12 10:34 conda-meta\r\ndrwxrwxr-x. 13 greg greg  4096 Aug 12 09:37 envs\r\ndrwxrwxr-x. 10 greg greg  4096 Aug 12 10:34 include\r\ndrwxrwxr-x.  9 greg greg  4096 Aug 12 10:34 lib\r\n-rw-rw-r--.  1 greg greg  3699 Feb  4  2016 LICENSE.txt\r\ndrwxrwxr-x.  3 greg greg  4096 Aug 12 13:29 man\r\ndrwxrwxr-x. 93 greg greg 12288 Aug 12 13:33 pkgs\r\ndrwxrwxr-x.  2 greg greg  4096 Aug 12 10:34 sbin\r\ndrwxrwxr-x.  5 greg greg  4096 Aug 12 10:34 share\r\ndrwxrwxr-x.  3 greg greg  4096 Aug 12 10:34 ssl\r\n```\r\nWhen starting up Galaxy, the value of the PATH environment variable is this:\r\n```\r\n/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin\r\n```\r\nDuring tool execution, the job's conda environment is created in the job_working_directory:\r\n```\r\n$ pwd\r\n/home/greg/work/git_workspace/galaxy/database/job_working_directory/000/45\r\n[greg@bigsky 45]$ ll\r\ntotal 88\r\ndrwxrwxr-x.  5 greg greg 4096 Aug 12 13:33 .\r\ndrwxrwxr-x. 25 greg greg 4096 Aug 12 13:33 ..\r\ndrwxrwxr-x.  9 greg greg 4096 Aug 12 13:33 conda-env\r\ndrwxrwxr-x.  7 greg greg 4096 Aug 12 13:33 conda-metadata-env\r\n-rw-rw-r--.  1 greg greg    4 Aug 12 13:33 galaxy_45.ec\r\n-rwxr-xr-x.  1 greg greg 3649 Aug 12 13:33 galaxy_45.sh\r\n-rw-rw-r--.  1 greg greg   11 Aug 12 13:33 __instrument_core_epoch_end\r\n-rw-rw-r--.  1 greg greg   11 Aug 12 13:33 __instrument_core_epoch_start\r\n-rw-rw-r--.  1 greg greg    2 Aug 12 13:33 __instrument_core_galaxy_slots\r\n-rw-rw-r--.  1 greg greg 2575 Aug 12 13:33 metadata_in_HistoryDatasetAssociation_68_dRVcOB\r\n-rw-rw-r--.  1 greg greg 2112 Aug 12 13:33 metadata_in_HistoryDatasetAssociation_69_3ukqBl\r\n-rw-rw-r--.  1 greg greg   20 Aug 12 13:33 metadata_kwds_HistoryDatasetAssociation_68_6Cjd0r\r\n-rw-rw-r--.  1 greg greg   20 Aug 12 13:33 metadata_kwds_HistoryDatasetAssociation_69_mrEBUC\r\n-rw-rw-r--.  1 greg greg   33 Aug 12 13:33 metadata_out_HistoryDatasetAssociation_68_aquoqa\r\n-rw-rw-r--.  1 greg greg   33 Aug 12 13:33 metadata_out_HistoryDatasetAssociation_69_xv4C0S\r\n-rw-rw-r--.  1 greg greg    2 Aug 12 13:33 metadata_override_HistoryDatasetAssociation_68_Q5m8tw\r\n-rw-rw-r--.  1 greg greg    2 Aug 12 13:33 metadata_override_HistoryDatasetAssociation_69_lSDc1M\r\n-rw-rw-r--.  1 greg greg   44 Aug 12 13:33 metadata_results_HistoryDatasetAssociation_68_Y6EdYv\r\n-rw-rw-r--.  1 greg greg   44 Aug 12 13:33 metadata_results_HistoryDatasetAssociation_69_8zyPW2\r\n-rw-------.  1 greg greg   73 Aug 12 13:33 set_metadata_d6wOqu.py\r\n-rwxr-xr-x.  1 greg greg  678 Aug 12 13:33 tool_script.sh\r\ndrwxrwxr-x.  2 greg greg 4096 Aug 12 13:33 working\r\n```\r\nHowever, the tool throws an exception because it cannot find Rscript:\r\n```\r\n/home/greg/work/git_workspace/galaxy/database/job_working_directory/000/45/tool_script.sh: line 9: Rscript: command not found\r\n```\r\nNow if I prepend the location of the installed Rscript to my PATH...\r\n```\r\n$ echo $PATH\r\n/home/greg/work/ts_install/tool_dependency_dir/_conda/pkgs/r-base-3.3.1-3/bin:/home/greg/work/ts_install/tool_dependency_dir/_conda/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin\r\n```\r\n...and restart Galaxy and execute the tool, Rscript is found and the tool executes just fine.\r\n\r\nSo, does using conda dependency resolution require special PATH settings, or am I missing something in my configuration that is causing the conda environment created by the job to not have access to all of the R package components?"},"comment":{"url":"https://api.github.com/repos/galaxyproject/galaxy/issues/comments/239556405","html_url":"https://github.com/galaxyproject/galaxy/issues/2783#issuecomment-239556405","issue_url":"https://api.github.com/repos/galaxyproject/galaxy/issues/2783","id":239556405,"user":{"login":"bgruening","id":469983,"avatar_url":"https://avatars.githubusercontent.com/u/469983?v=3","gravatar_id":"","url":"https://api.github.com/users/bgruening","html_url":"https://github.com/bgruening","followers_url":"https://api.github.com/users/bgruening/followers","following_url":"https://api.github.com/users/bgruening/following{/other_user}","gists_url":"https://api.github.com/users/bgruening/gists{/gist_id}","starred_url":"https://api.github.com/users/bgruening/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgruening/subscriptions","organizations_url":"https://api.github.com/users/bgruening/orgs","repos_url":"https://api.github.com/users/bgruening/repos","events_url":"https://api.github.com/users/bgruening/events{/privacy}","received_events_url":"https://api.github.com/users/bgruening/received_events","type":"User","site_admin":false},"created_at":"2016-08-12T20:50:18Z","updated_at":"2016-08-12T20:50:18Z","body":"Oh wait, is this OSX again? Maybe the package is different on OSX? Oo."}}
{"actor":{"display_login":"bgruening"}}