Re: [galaxy-dev] Environment variables
Dear Björn, Is not it what I did? I wrote requirement type=package version=1.7.1numpy/requirement in test.xml, and the version number is the same as yours... Many thanks again, Matthias. On Thu, 25 Apr 2013, Björn Grüning wrote: Hi Matthias, you need to add something like the following to your tool defintion: requirements requirement type=package version=1.1p1chemfp/requirement /requirements The version and the name needs to be the same as in your tool_dependency.xml. Cheers, Bjoern Björn, I have galaxy-dist. Was it the right choice? Here is what I did. I copied your tool_dependencies.xml into my project (s_mart, in the test Tool Shed), and I created a testing XML file, which uses your dependencies: --- tool id=test name=test descriptionThis is a test./description requirements requirement type=set_environmentPYTHONPATH/requirement requirement type=set_environmentPATH/requirement /requirements requirement type=package version=1.7.1numpy/requirement commandenv $outputFile; python -c import numpy $outputFile/command outputs data name=outputFile format=txt label=output test file/ /outputs helpThis is a test./help /tool --- I uninstall and reinstall the package, then run the test. Numpy seems fine (I got no complain), but PYTHONPATH and PATH are not updated. I change append_to and prepend_to to set_to in the tool_dependencies.xml. I unstall/reinstall my package... the variable dependencies have disappeared! When I run the test, the environment variables are left unchanged. It seems now that Galaxy may have some problems with the reinstall. I tried to totally install my package, but Galaxy remembers having seen it and reinstalls it instead of a fresh install. Could this be the source of the problem? Matthias. On Wed, 24 Apr 2013, Björn Grüning wrote: Hi Matthias, Sure, This is the least I can do. However, I do not know how to install a package from a simple XML, and without Tool Shed installed repository. it's documented here: http://wiki.galaxyproject.org/Tool% 20Shed#Installing.2C_maintaining_and_uninstalling_tool_shed_repositories_within_a_Galaxy_instance I will check that. I have downloaded Galaxy for installation less than a week ago. Have you downloaded galaxy-dist or galaxy-central? Cheers, Bjoern Matthias. On Wed, 24 Apr 2013, Björn Grüning wrote: Hi Matthias, do you use the toolshed or the testtoolshed? Can you please test the following repo and install: testtoolshed.g2.bx.psu.edu/repos/bgruening/package_numpy_1_7 It also contains append_to and works for me. Also which version of galaxy do you use? Thanks! Bjoern Dear everyone, I finally got the answer. The append_to does not seem do work in the tool_dependencies.xml: --- environment_variable name=PYTHONPATH action=append_to$REPOSITORY_INSTALL_DIR/environment_variable --- does not insert anything, while: --- environment_variable name=PYTHONPATH action=set_to$REPOSITORY_INSTALL_DIR/environment_variable --- updates the correct env.sh and INSTALLATION.log files. Weird. Many thanks for your help. Matthias. On Tue, 23 Apr 2013, Björn Grüning wrote: Hi Matthias, Dear Björn, Maybe the problem is here. I cannot find neither tool_deps, nor env.sh. The install is fresh from yesterday... I should check why I did not generate these files. By the way, if env.sh is sourced right before my script, I should see the updated PYTHONPATH in the result of the command env $outputFile, no? Yes :) The tool_deps directory is set in universe_wsgi.ini under: tool_dependency_dir = ./tool_deps/ Ciao, Bjoern Many thanks, Matthias. On Tue, 23 Apr 2013, Björn Grüning wrote: Hi Matthias, PYTHONPATH will not be changed globally. It's only changed during execution of your tool. Have a look under ./tool_deps/.../.../.../s_mart/ there is a file called env.sh with your PYTHONPATH. That file is executed before your command commandenv $outputFile/command is executed. Hope that helps, Bjoern Dear everyone, I have spent hours trying to set environment variable in Galaxy. I am managing the s_mart repos (you can check it if you wish), and I created the simple files test.xml which prints the environment variables: --- tool id=test name=test descriptionThis is a test./description requirements requirement type=set_environmentPYTHONPATH/requirement /requirements commandenv $outputFile/command outputs data name=outputFile format=txt label=output test file/ /outputs helpThis is a test./help /tool --- and tool_dependencies.xml, which appends something to the PYTHONPATH variable.: --- ?xml version=1.0? tool_dependency set_environment version=1.0 environment_variable name=PYTHONPATH action=append_to$REPOSITORY_INSTALL_DIR/environment_variable /set_environment
[galaxy-dev] Running Galaxy through Apache
Hi folks, I am wanting to run a galaxy instance and serve it at a location other than the webserver root, i.e. at http://mymachine.com/galaxy rather than just at http://mymachine. To do this, I've followed the instructions about proxying Galaxy through Apache at http://wiki.galaxyproject.org/Admin/Config/Apache%20Proxy. I'm pretty sure I've followed the instructions exactly. I enabled the necessary apache proxy modules and then I added these lines to my apache.conf file: RewriteEngine on RewriteRule ^/galaxy$ /galaxy/ [R] RewriteRule^/galaxy/static/style/(.*) /myplace/galaxy-dist/static/june_2007_style/blue/$1 [L] RewriteRule^/galaxy/static/scripts/(.*) /myplace/galaxy-dist/static/scripts/packed/$1 [L] RewriteRule^/galaxy/static/(.*) /myplace/galaxy-dist/static/$1 [L] RewriteRule ^/galaxy/favicon.ico /myplace/galaxy-dist/static/favicon.ico [L] RewriteRule ^/galaxy/robots.txt /myplace/galaxy-dist/static/robots.txt [L] RewriteRule ^/galaxy(.*) http://localhost:8080$1 [P] ...and re-started the apache server without a problem (note: I also tried it commenting out everything but the first, second and last line in case there was an issue with the static stuff). I then made sure the following lines were present and uncommented in my universe_wsgi.ini file [filter:proxy-prefix]use = egg:PasteDeploy#prefixprefix = /galaxy[app:main] filter-with = proxy-prefixcookie_path = /galaxy I start up Galaxy. And still, I can only reach it on http://mymachine:8080, not at http://mymachine/galaxy as I intend. Any help would be appreciated! Thanks! -Jeff ___ 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] Creating multiple datasets in a libset
I'm looking at example_watch_folder.py and it's not clear from the example how you submit multiple datasets to a library. In the example, the first submit returns a libset [] with only a single entry and then proceeds to iterate through each dataset in the libset in the following section: data = {} data['folder_id'] = library_folder_id data['file_type'] = 'auto' data['dbkey'] = '' data['upload_option'] = 'upload_paths' *data['filesystem_paths'] = fullpath* data['create_type'] = 'file' libset = submit(api_key, api_url + libraries/%s/contents % library_id, data, return_formatted = False) time.sleep(5) for ds in libset: if 'id' in ds: wf_data = {} wf_data['workflow_id'] = workflow['id'] wf_data['history'] = %s - %s % (fname, workflow[ 'name']) wf_data['ds_map'] = {} for step_id, ds_in in workflow['inputs' ].iteritems(): wf_data['ds_map'][step_id] = {'src':'ld', 'id' :ds['id']} res = submit( api_key, api_url + 'workflows', wf_data, return_formatted=False) Rob Leclerc, PhD http://www.linkedin.com/in/robleclerc https://twitter.com/#!/robleclerc P: (US) +1-(917)-873-3037 P: (Shanghai) +86-1-(861)-612-5469 Personal Email: rob.lecl...@aya.yale.edu ___ 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/
Re: [galaxy-dev] Running Galaxy through Apache
Jeff, How / Where did you add the apache changes? Are you using VirutalHosts or ... ? Quick glance, everything appears correct. Its been a while since I used Apache (switched everything to nginx) however I believe if you want to setup a Reverse Proxy, you need to add / use the proxy pass lines which does not appear in the Galaxy Wiki. Something like this should work: (untested...) IfModule mod_proxy.c ProxyRequests Off Proxy * AddDefaultCharset off Order Deny,Allow Deny from all Allow from *.ualberta.ca # Change / Remove as needed /Proxy ProxyPass /galaxy http://localhost:8080/ ProxyPassReverse /galaxy http://localhost:8080/ # Line below is optional Redirect permanent /galaxy http://mymachine.com/galaxy ProxyVia On /IfModule Let us know, -Adam -- Adam Brenner Computer Science, Undergraduate Student Donald Bren School of Information and Computer Sciences Research Computing Support Office of Information Technology http://www.oit.uci.edu/rcs/ University of California, Irvine www.ics.uci.edu/~aebrenne/ aebre...@uci.edu On Fri, Apr 26, 2013 at 2:56 PM, Jeffrey Long jlo...@ualberta.ca wrote: Hi folks, I am wanting to run a galaxy instance and serve it at a location other than the webserver root, i.e. at http://mymachine.com/galaxy rather than just at http://mymachine. To do this, I've followed the instructions about proxying Galaxy through Apache at http://wiki.galaxyproject.org/Admin/Config/Apache%20Proxy. I'm pretty sure I've followed the instructions exactly. I enabled the necessary apache proxy modules and then I added these lines to my apache.conf file: RewriteEngine on RewriteRule ^/galaxy$ /galaxy/ [R] RewriteRule ^/galaxy/static/style/(.*) /myplace/galaxy-dist/static/june_2007_style/blue/$1 [L] RewriteRule ^/galaxy/static/scripts/(.*) /myplace/galaxy-dist/static/scripts/packed/$1 [L] RewriteRule ^/galaxy/static/(.*) /myplace/galaxy-dist/static/$1 [L] RewriteRule ^/galaxy/favicon.ico /myplace/galaxy-dist/static/favicon.ico [L] RewriteRule ^/galaxy/robots.txt /myplace/galaxy-dist/static/robots.txt [L] RewriteRule ^/galaxy(.*) http://localhost:8080$1 [P] ...and re-started the apache server without a problem (note: I also tried it commenting out everything but the first, second and last line in case there was an issue with the static stuff). I then made sure the following lines were present and uncommented in my universe_wsgi.ini file [filter:proxy-prefix] use = egg:PasteDeploy#prefix prefix = /galaxy [app:main] filter-with = proxy-prefix cookie_path = /galaxy I start up Galaxy. And still, I can only reach it on http://mymachine:8080, not at http://mymachine/galaxy as I intend. Any help would be appreciated! Thanks! -Jeff ___ 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/