Re: [galaxy-dev] Workflow param error leads to template error [patch]
Dear Devs, I recently ran into a problem where attempting to run a workflow resulted in an uninformative error and a traceback in the logs, that I put into Google. This led me to the message below from 2012. As far as I can see it got no reply at the time and I have hit the same issue. I modified database/compiled_templates/workflow/run.mako.py and this resulted in a much more useful error report appearing in the browser. Obviously this is a generated file, so attached is a patch for templates/webapps/galaxy/workflow/run.mako that I propose you add to Galaxy. As you'll see it just adds a single try block and then ignores the exception, which I would say in this case is not actually a bad thing to do even if it is not the ideal fix. Should be fairly explanatory from the patch. Cheers, TIM Way way back in Jun 2012, Paul-Michael.Agapow at hpa.org.uk wrote: Looking for pointers on what might be causing this problem: A user had a moderately complicated workflow that when run under certain parameter values results in a traceback that ends: Module workflow_run_mako:232 in render_body for ic in oc.input_step.module.get_data_inputs(): AttributeError: 'WorkflowStep' object has no attribute 'module' After some puzzling, I realized one of the parameters was outside the allowed range (a max on an integer param) and that Galaxy was trying to render run.mako flagging up the error but erroring out. Why Galaxy tries to call this non-existent member is unclear to me. Any insight or places I should start exploring? Galaxy version: various (started with an 6-month old one, upgraded to latest production to see if it would fix error, it didn't) Hosting OS: CentOS 6 -- Paul Agapow (paul-michael.agapow at hpa.org.uk) Bioinformatics, Health Protection Agency (UK) -- Tim Booth tbo...@ceh.ac.uk NERC Environmental Bioinformatics Centre Centre for Ecology and Hydrology Maclean Bldg, Benson Lane Crowmarsh Gifford Wallingford, England OX10 8BB http://nebc.nerc.ac.uk +44 1491 69 2705 # This patch addresses http://lists.bx.psu.edu/pipermail/galaxy-dev/2012-June/010303.html --- a/templates/webapps/galaxy/workflow/run.mako +++ b/templates/webapps/galaxy/workflow/run.mako @@ -582,9 +582,12 @@ # Filter possible inputs to data types that are valid for subsequent steps type_filter = [] for oc in step.output_connections: +try: for ic in oc.input_step.module.get_data_inputs(): if 'extensions' in ic and ic['name'] == oc.input_name: type_filter += ic['extensions'] +except AttributeError: + pass if not type_filter: type_filter = ['data'] % ___ 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] find bam index files
Hi Ulf, Unfortunately, metadata files are assigned an id that is unrelated to the dataset id. To link the files you'll need to use the database. The numerical id you see in the filename is the id of the dataset in the `dataset` table. From this you can go backward to the history_dataset_association (hda) table, where hda.dataset_id = dataset.id. Finally, from there, hda.id can be used to find the metadata_file via metadata_file.hda_id. More succinctly: dataset.id = history_dataset_association.dataset_id history_dataset_association.id = metadata_file.hda_id --nate On Mon, Sep 15, 2014 at 6:34 AM, Ulf Schaefer ulf.schae...@phe.gov.uk wrote: Dear all For each bam file in my history I can download the associated bai (bam index) file. I assume these files are stored somewhere under /mount/galaxy/database/files/_metadata_files. Correct? Is there an easy way to find the bam index file for a bam file, given only the internal file name of the bam (e.g. /mont/galaxy/database/files/089/dataset_89231.dat)? I am asking because I would like to use the files_to_ftp tool to automatically download bams together with their associated indices. Thanks Ulf ** The information contained in the EMail and any attachments is confidential and intended solely and for the attention and use of the named addressee(s). It may not be disclosed to any other person without the express authority of Public Health England, or the intended recipient, or both. If you are not the intended recipient, you must not disclose, copy, distribute or retain this message or any part of it. This footnote also confirms that this EMail has been swept for computer viruses by Symantec.Cloud, but please re-sweep any attachments before opening or saving. http://www.gov.uk/PHE ** ___ 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/
Re: [galaxy-dev] Workflow param error leads to template error [patch]
Hi Tim, Thanks for this. If you still have it handy, what was the exact attribute error? -Dannon On Thu, Sep 18, 2014 at 10:28 AM, Tim Booth tbo...@ceh.ac.uk wrote: Dear Devs, I recently ran into a problem where attempting to run a workflow resulted in an uninformative error and a traceback in the logs, that I put into Google. This led me to the message below from 2012. As far as I can see it got no reply at the time and I have hit the same issue. I modified database/compiled_templates/workflow/run.mako.py and this resulted in a much more useful error report appearing in the browser. Obviously this is a generated file, so attached is a patch for templates/webapps/galaxy/workflow/run.mako that I propose you add to Galaxy. As you'll see it just adds a single try block and then ignores the exception, which I would say in this case is not actually a bad thing to do even if it is not the ideal fix. Should be fairly explanatory from the patch. Cheers, TIM Way way back in Jun 2012, Paul-Michael.Agapow at hpa.org.uk wrote: Looking for pointers on what might be causing this problem: A user had a moderately complicated workflow that when run under certain parameter values results in a traceback that ends: Module workflow_run_mako:232 in render_body for ic in oc.input_step.module.get_data_inputs(): AttributeError: 'WorkflowStep' object has no attribute 'module' After some puzzling, I realized one of the parameters was outside the allowed range (a max on an integer param) and that Galaxy was trying to render run.mako flagging up the error but erroring out. Why Galaxy tries to call this non-existent member is unclear to me. Any insight or places I should start exploring? Galaxy version: various (started with an 6-month old one, upgraded to latest production to see if it would fix error, it didn't) Hosting OS: CentOS 6 -- Paul Agapow (paul-michael.agapow at hpa.org.uk) Bioinformatics, Health Protection Agency (UK) -- Tim Booth tbo...@ceh.ac.uk NERC Environmental Bioinformatics Centre Centre for Ecology and Hydrology Maclean Bldg, Benson Lane Crowmarsh Gifford Wallingford, England OX10 8BB http://nebc.nerc.ac.uk +44 1491 69 2705 ___ 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/