Re: [galaxy-dev] Adding binary datatype: upload problem
Galaxy does indeed print a lot of log data to stdout (when not in daemon mode). But when something fails, it's just an exception; sometimes it's clear what it means, sometimes not. My problem is I can't get print debugging to work. Galaxy captures both stdout and stderr and stashes them in a db somewhere. John Chilton suggested I try using the logging facility, but binary.py throws an exception when I try to do that: An error occurred running this job:uploaded csra file No handlers could be found for logger "galaxy.datatypes.binary" So it's back to square one. Debugging without even a working print statement is pretty difficult. Even trying log = logging.getLogger() or log = logging.getLogger('wsgi') produces exceptions. I would assume there'd be a way to set up logging in universe_wsgi.ini, but none of the logging parameters seem to set up a root logger that tools can use. --mj On 10/10/12 2:45 PM, John Chilton wrote: Hey Mark, A few things, instead of printing stuff out you could use the global variable log in the binary.py file. Maybe something like log.warn("SNIFFING csra"). I think your logging statements will be more likely to show up then. ___ 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/
Re: [galaxy-dev] galaxy-dev Digest, Vol 76, Issue 12
Galaxy assumes that tools that write to stderr indicate failure. There's apparently some way to set up regexps to get around that, but I don't know where to do that (or if indeed that would work). Command-line debugging works some, except when the web server's environment (path, etc.) differs from command line. Or the problem is in how Galaxy interprets output; e.g. stderr means error as described above. John Chilton suggested I try using the logging facility, but binary.py throws an exception when I try to do that: An error occurred running this job:uploaded csra file No handlers could be found for logger galaxy.datatypes.binary So it's back to square one. Debugging without even a working print statement is pretty difficult. Even trying log = logging.getLogger() or log = logging.getLogger('wsgi') produces exceptions. I would assume there'd be a way to set up logging in universe_wsgi.ini, but none of the logging parameters seem to set up a root logger that tools can use. --mj On 10/12/12 10:55 AM, galaxy-dev-requ...@lists.bx.psu.edu wrote: You can get to the captured stdout/stderr in the UI by clicking the info (i) button for the dataset. The way I would normally debug outside of the Galaxy UI is to take the command line generated by Galaxy (which should be logged) and run it outside Galaxy. -- jt ___ 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/
Re: [galaxy-dev] Data source tool doesn't source data
Looks like I'll have to try again. Maybe with a more general question (?) When you're debugging tools, how do you get Galaxy to tell you what the tool is doing? My tool doesn't work properly, but paster.log just shows a line for the request. It doesn't say anything about what tool_runner is trying to do. In short, how do you debug tools? Thanks --Mark Johnson NCBI ___ 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/
[galaxy-dev] Data source tool doesn't source data
I'm working on an data source tool for NCBI's Sequence Read Archive (SRA). I'm currently targeting a small form in the existing SRA application, to allow downloading a part of a specific assembly. The form I'm talking about is labeled "Alignment" on this page: http://www.ncbi.nlm.nih.gov/Traces/sra/?view=run_browserrun=SRR445299 The application is not yet Galaxy-aware (but it will be). I'm currently telling that form to POST to GALAXY_URL, which is defined in the tool file as /tool_runner/sra-trace-download It will essentially do the same thing as the "File" button in that form, except (of course) download to Galaxy. (A related question: will Galaxy tool_runner accept GET requests, or must parameters be POSTed?) The file I'm using appears below. Instead of a download, I simply get the Galaxy home page content (welcome.html) in the center iframe, and no download. Is it clear from the XML what I'm missing? Thanks --Mark Johnson Staff Scientist NCBI tool id="sra-trace-download" name="Download SRA data" URL_method="post" descriptionDownload traces from NCBI SRA database/description !-- This is the program that processes the request. Currently just print the output filename -- command interpreter="python" print "Called tool, output=" % $output /command !-- "action" is the thing the user interacts with -- inputs action="" class="moz-txt-link-rfc2396E" href="http://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=run_browseramp;run=SRR445299amp;">"http://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=run_browseramp;run=SRR445299amp;" check_values="false" method="post" param name="GALAXY_URL" type="baseurl" value="/tool_runner/sra-trace-download"/ param name="sendToGalaxy" type="hidden" value="1"/ /inputs request_param_translation request_param galaxy_name="URL_method" remote_name="URL_method" missing="post" / request_param galaxy_name="URL" remote_name="URL" missing="" / request_param galaxy_name="dbkey" remote_name="db" missing="sra" / /request_param_translation outputs data format="fasta" name="output"/ /outputs helpDownload SRA traces/help /tool ___ 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/
Re: [galaxy-dev] Help writing a tool
On 3/19/12 5:19 PM, Peter Cock wrote: Why do you need to do anything special at all for Galaxy here? I'd just write it as a single command line call which blocks. As far as Galaxy will know it is just a slow tool. I suppose the tool could just poll the server, and only produce results when the process is complete. I could swear I read something somewhere in the Galaxy documentation that described two kinds of tools: one kind that finish quickly, and another that run for awhile (or a long while), and produce results when they're done. Maybe it was among the cloud-related documentation, about using the scheduler. Thanks for the suggestion. I'll try polling. The second question is, besides this mailing list, and the Galaxy wiki, is there are good online video or text resource that explains the Galaxy architecture and how to use it? The docs are good as far as they go, but most of what's in thecommand scripts in the tool files isn't documented. There are quite a few Galaxy videos... not sure if there are any aimed at potential developers. Are you asking about the Cheetah template language used inside the XML for thecommand which is almost a scripting language in itself, or the actual wrapper scripts used in some tools (which can be written in Python, Perl, etc)? Cheetah documentation is findable. I'm asking more about understanding how the inputs relate to what's available in Python in the Cheetah template in the command section. I guess there's not much for developers to get an overview: how inputs, parameters, outputs, the command, the template, and Python all work together. Seems the only way is trial, error, experiment, and trying to understand the existing tools. Thanks --Mark ___ 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/
[galaxy-dev] Help writing a tool
I'm writing some tools to integrate NCBI data resources with Galaxy. I have two questions. The first is simple. I want to write a tool for a long-running process that is handled by some other scheduler, and that produces its own job ids. Some web services, like BLAST, for example, receive a request, and take a while to complete processing. The job id can be used to fetch either job status or results from the server, depending on whether it has completed. How do you make a Galaxy tool that polls the server, and produces an output set only when the process is complete? The second question is, besides this mailing list, and the Galaxy wiki, is there are good online video or text resource that explains the Galaxy architecture and how to use it? The docs are good as far as they go, but most of what's in the command scripts in the tool files isn't documented. Thanks Mark Johnson Staff Scientist, NCBI mjohn...@ncbi.nlm.nih.gov ___ 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/