I get it now!!
I did my Rename Dataset/output_file with a variable ${input}.
I chose that because I thought that would give me the name of the input file to that module, which I'm looking to carry on through out the run of my workflow (though actually I'd like the file name minus the file extension, but that's another problem).
When I did this, I ended up with a field "Input" at the top of my workflow form when I went to run it. I typed a value in and sure enough, all my output files now contained what I typed into the field.
So, this is certainly useful, but the question I have, and I believe it's what Matthew is getting at too is:
Is there anyway to access the value of fields that are part of the workflow. Taking the "Input Dataset" example, that is an input file that goes into my next module. I'd like to grab the name of that input file, and then append it with a new extension. So if the module is grooming fastq, I'd like to grab my file name that is given to the fastq groomer, and append ".fastqsanger" to it, and have that be my output file name.
Is this possible?
Thanks,
Dave
On Apr 13, 2011, at 11:20 AM, Dannon Baker wrote:
Ahh, I understand your confusion now. The previous bit you pointed out was an error indeed, but not the one you were running into. The variable name should be whatever you want it to be, it doesn't have to map to an existing value like "Input Dataset", but there's an issue with the way the tags are handled for parameter replacement that causes a failure when the name contains spaces. Instead of ${Input Dataset}, try ${input_dataset}. I have a fix for this that should be available in the near future, as part of a larger set of changes that should make parameters much more accessible.
On 04/13/2011 10:11 AM, Matthew Conte wrote:
Hi Dannon,
Sorry, I guess I still don't quite get it. So I should keep the Input Dataset name the default which is "Input Dataset". In the next subsequent step in the workflow I then edit step actions Rename Dataset/output_file with "${Input Dataset} groomed", for example. This gives me the same error as before. It is still unclear to me what the actual variable name is for the input dataset so that I can use it to rename output in later steps. Do you have an example workflow that uses the input data set name to name the output of downstream workflow steps that you could share with me as an example so I can see the usage? Even a simple two step workflow would do.
Thanks again, Matt
On Wed, Apr 13, 2011 at 6:09 AM, Dannon Bakerdannonbaker@me.com wrote:
The input dataset steps do not use workflow parameters as they don't actually create output datasets, but rather act as more of a temporary handle. Remove the parameter tags from the input steps and just referring to those same parameter names in the subsequent steps you wanted to use them with should work and I think will allow you to do what you want.
Thank you for pointing out the error though, this should definitely be more gracefully handled and supported with some help text in the editor, I'll see what I can do about that. Let me know if this doesn't get up and running and I'll do what I can to help!
-Dannon
On 04/12/2011 06:20 PM, Matthew Conte wrote:
I'd like to do the same thing that Tanguy described. I'm trying to figure out the syntax to this within the workflow editor, but can't quite get it right. In your example Dannon, would you just set ${dataset_name} as the "Name" for your "Input dataset" to capture the input dataset name as a variable? When I do that and then try to run the workflow I get the following error:
Error -<type 'exceptions.KeyError'>: 'dataset_name' URL: http://localhost:8080/galaxy/workflow/run?id=f597429621d6eb2b File
'/path-to-galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/exceptions/errormiddleware.py', line 143 in __call__ app_iter = self.application(environ, start_response) File '/path-to-galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/recursive.py', line 80 in __call__ return self.application(environ, start_response) File '/path-to-galaxy-dist/eggs/Paste-1.6-py2.6.egg/paste/httpexceptions.py', line 632 in __call__ return self.application(environ, start_response) File '/path-to-galaxy-dist/lib/galaxy/web/framework/base.py', line 145 in __call__ body = method( trans, **kwargs ) File '/path-to-galaxy-dist/lib/galaxy/web/controllers/workflow.py', line 1397 in run incoming=kwargs ) File '/path-to-galaxy-dist/lib/galaxy/web/framework/__init__.py', line 650 in fill_template return self.fill_template_mako( filename, **kwargs ) File '/path-to-galaxy-dist/lib/galaxy/web/framework/__init__.py', line 661 in fill_template_mako return template.render( **data ) File '/path-to-galaxy-dist/eggs/Mako-0.2.5-py2.6.egg/mako/template.py', line 133 in render return runtime._render(self, self.callable_, args, data) File '/path-to-galaxy-dist/eggs/Mako-0.2.5-py2.6.egg/mako/runtime.py', line 364 in _render _render_context(template, callable_, context, *args, **_kwargs_for_callable(callable_, data)) File '/path-to-galaxy-dist/eggs/Mako-0.2.5-py2.6.egg/mako/runtime.py', line 381 in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File '/path-to-galaxy-dist/eggs/Mako-0.2.5-py2.6.egg/mako/runtime.py', line 414 in _exec_template callable_(context, *args, **kwargs) File '/path-to-galaxy-dist/database/compiled_templates/base.mako.py', line 40 in render_body __M_writer(unicode(next.body())) File '/path-to-galaxy-dist/eggs/Mako-0.2.5-py2.6.egg/mako/runtime.py', line 255 in<lambda> return lambda *args, **kwargs:callable_(self.context, *args, **kwargs) File '/path-to-galaxy-dist/database/compiled_templates/workflow/ run.mako.py', line 172 in render_body pja_ss = pja_ss.replace(rematch, '<span style="background-color:%s" class="wfpspan wf_parm__%s pja_wfp">%s</span>' % (wf_parms[rematch[2:-1]], rematch[2:-1], rematch[2:-1])) KeyError: 'dataset_name'
Perhaps I'm missing something obvious?
Thanks, Matt
\
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: