Question: Problem With New Tool Shed
0
gravatar for Florent Angly
7.2 years ago by
Florent Angly370
Florent Angly370 wrote:
Hi all, I tried the latest stable version of Galaxy: http://wiki.g2.bx.psu.edu/News%20Briefs/2011_08_30. This page has links to how to use the new tool shed including how to automatically deploy tools from the shed in a local Galaxy server. The documentation mentioned some tool shed options available from the the admin section of Galaxy but I could not locate these options in my instance of galaxy. So my question is: Can one only take advantage of the tool deployment from the shed in the development version of Galaxy? If so, I think the Tool shed wiki should be more clear about this. Then I tried the latest development version of Galaxy and could locate the tool shed deployment options. I attempted to install the Grinder wrapper (http://toolshed.g2.bx.psu.edu/repository/manage_repository?sort=name& webapp=community&id=3d8312720a69a558&f-deleted=False&show_item_checkbo xes=false&async=false&operation=view_or_manage_repository&f-free-text- search=grinder&page=1 <http: toolshed.g2.bx.psu.edu="" repository="" manage_repository?sort="name&amp;" webapp="community&amp;id=3d8312720a69a558&amp;f-deleted=False&amp;show_item_checkbo" xes="false&amp;async=false&amp;operation=view_or_manage_repository&amp;f-free-text-" search="grinder&amp;page=1">) but ran into an error that I am pasting below: I get the same problem with other wrappers such as FastQC. Am I doing something wrong? Thanks, Florent
galaxy • 1.1k views
ADD COMMENTlink modified 7.2 years ago by Greg Von Kuster810 • written 7.2 years ago by Florent Angly370
0
gravatar for Greg Von Kuster
7.2 years ago by
Penn State University
Greg Von Kuster810 wrote:
Hello Florent, Sorry for the confusion on this - we are preparing a new Galaxy distribution, and the tool shed wiki has been written in preparation for it. The new distribution will be available fairly soon, and the Galaxy News Brief will include information about these new tool shed features. In any case, you have already discovered that you can use in if you update your Galaxy instance to the latest Galaxy development repository ( Galaxy central ). The problem you see is most likely caused by your not having configured an additional tool_config_file setting in your universe_wsgi.ini. Look for something like following in your latest version of the universe_wsgi.ini.sample that you got when you updated from Galaxy central. # Locally installed tools and tools installed from tool sheds tool_config_file = tool_conf.xml,shed_tool_conf.xml If you add a new additional file name like shed_tool_conf.xml, you should not have a problem installing from a tool shed. I'll have a fix for the bug you've discovered shortly, but making this change will fix the behavior until then. Let me know if you bump into any additional problems. Thanks for finding this! Greg Von Kuster Greg Von Kuster Galaxy Development Team greg@bx.psu.edu
ADD COMMENTlink written 7.2 years ago by Greg Von Kuster810
Hi Greg, Thank you for your help. Your suggestion worked like a charm! I was expecting to see an error because I did not create the ../shed_tool/ folder that contains the tools installed from the shed, but I was happy to see that it was automatically created. I have a few additional comments and questions though: 1/ In the universe_wsgi.ini file, maybe the tool_config_file parameter could be renamed to tool_config_files (plural) to indicate that it takes a list of files. 2/ It seems like the Tools Search box cannot find newly installed tools. However, after I restart Galaxy, it works as intended again. 3/ In the Grinder wrapper, I relied on installing the wrapper under a specific folder: ./tools/ngs simulation/grinder. The new wrapper installation procedure installs the tools in the ../shed_tools/ folder and the admins can choose under what category the tool is to be placed. This means that my Grinder wrapper fails since it does not know where to find the scripts it needs. Is there a way to get the directory where a tool is installed? Here is an excerpt of the Grinder wrapper so you can better understand what I am trying to do. This wrapper first runs Grinder and then moves its files (the number of files is hard to determine ahead of time) to a place where Galaxy will find them (see the wiki page http://wiki.g2.bx.psu.edu/Admin/Tools/Multiple%20Output%20Files under section "Number of Output datasets cannot be determined until tool run"). Thanks, Florent
ADD REPLYlink written 7.2 years ago by Florent Angly370
Hello Florent, Thanks for your comments and suggestions - see my inline comments. I considered this, but held off on making this change since it would require all local Galaxy installations to change as well. I'll soon enhance the setting to behave the same way for both terms (tool_config_file or tool_config_files) , so backward compatibility will not be a problem and using the plural term will be more clear. Thanks for the suggestion. I haven't got the search hooked up to the installed tools yet, but will very soon. Thanks for finding and reporting this issue. I've looked at your tool, and I think it would be beneficial if I provided something like ${tool.install_dir}. This feature would allow you to eliminate the use of hard-coded paths in your tools like the following which can generally be counted on to break at some point. I should have this feature available fairly soon ( I'm out of the lab this week, but will be back next week ). Your tool should then be enhanced to use this new feature - I'll let you know when it's available. #set $tool_dir = os.path.join( os.path.abspath($__root_dir__), 'tools', 'ngs_simulation' ) Greg Von Kuster Galaxy Development Team greg@bx.psu.edu
ADD REPLYlink written 7.2 years ago by Greg Von Kuster810
That would all be terrific. Thanks Greg! Florent
ADD REPLYlink written 7.2 years ago by Florent Angly370
Hello Florent, Change set 6095:540ff06d44b4 allows for both "tool_config_file" and "tool_config_files" to behave the same way. Fixed in change set 6095:540ff06d44b4. I've looked at this a bit more now that I'm back in the lab and feel differently than I did when I initially looked at it - I was on vacation, after all ;) Galaxy automatically adds the path to the tool config file (in your case, ginder.xml), no matter where it is located, so your $tool_dir setting is really not necessary. To simplify the discussion, I'll remove the if blocks from your command, and add an interpreter attribute. So we have something like: <command interpreter="python"> stderr_wrapper.py grinder grinder_multiple_outputs.py $output_dir $base_name </command> The problem with the above is that the use of the interpreter attribute applies only to stderr_wrapper.py, but not grinder_multiple_outputs.py. However, your stderr_wrapper.py and grinder_multiple_outputs.py do not have to be a separate scripts, but can merged into one overall script that uses the same approach as the ~/tools/gatk/gatk_wrapper.py script (among several other examples in the Galaxy distribution). Doing this would allow for something like the following: <command interpreter="python"> grinder_wrapper.py -reference_file<etc> $output_dir $base_name </command> The code inside grinder_wrapper.py would parse the command line, and call the required grinder binary itself. It could also include code like the following, eliminating the need for the separate stderr_wrapper.py. #set up stdout and stderr output options stdout = open_file_from_option( options.stdout, mode = 'wb' ) stderr = open_file_from_option( options.stderr, mode = 'wb' ) #if no stderr file is specified, we'll use our own if stderr is None: stderr = tempfile.NamedTemporaryFile( prefix="grinder- stderr-", dir=tmp_dir ) proc = subprocess.Popen( args=cmd, stdout=stdout, stderr=stderr, shell=True, cwd=tmp_dir ) return_code = proc.wait() if return_code: stderr_target = sys.stderr else: stderr_target = sys.stdout stderr.flush() stderr.seek(0) while True: chunk = stderr.read( CHUNK_SIZE ) if chunk: stderr_target.write( chunk ) else: break stderr.close() Greg Von Kuster Galaxy Development Team greg@bx.psu.edu
ADD REPLYlink written 7.1 years ago by Greg Von Kuster810
Hi Greg, Both changes you made look good. Thanks! The reason I had broken the Grinder wrapper into 2 script executions is that the first script is very generic can be used by other tools (until issue 325 is resolved), while the second is very specific to Grinder since it renames its files so that Galaxy detects the dynamic output files. But, really, the dynamic output files is not needed, and, as far as I understand, prevents Grinder from being used efficiently in a workflow (only the first, dummy output is shown). From the wiki page http://wiki.g2.bx.psu.edu/Admin/Tools/Multiple%20Output%20Files, I'd like to use the method "Variable Static Outputs determined by parameter values" because it is recommended over the method I use and because I assume that it is compatible with workflows. But maybe I need a little bit of guidance with this because the example shown, the user is given a _limited_ number of output datasets to choose from. The Grinder case seems simple: give the user a field where he can specify the number of output he wants, say, 2, 10, or 100 and produce as many datasets as needed. So, in the section, the only reasonable way to process the output would be to have some sort of loop. Is this possible? Thank you, Florent
ADD REPLYlink written 7.1 years ago by Florent Angly370
Hello Forent, This is not yet possible. This is something that has been desired for some time, but is not on our near-future plans for implementation. Greg Von Kuster Galaxy Development Team greg@bx.psu.edu
ADD REPLYlink written 7.1 years ago by Greg Von Kuster810
Hi Greg, Thanks for the reply. I believe that how easy it is to write tools wrappers plays a big role for how widespread Galaxy becomes. I filed an issue at https://bitbucket.org/galaxy/galaxy-central/issue/670/better-support- for-multiple-outputs so that the issue is recorded. Best, Florent
ADD REPLYlink written 7.1 years ago by Florent Angly370
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 171 users visited in the last hour