Tool XML Question - using option/from_file name in 'label'
Hello, I have a tool which has an <option> with 'from_file' attribute: ... <param name="database" type="select" label="Mapping Database"> <options from_file="mapping_filter_databases.txt"> <column name="name" index="1"/> <column name="value" index="0"/> </options> </param> ... I want to use the database name in the label of the output dataset: <outputs> <data format="fasta" name="output_mapped" label="Mappers of $input.name to $database" /> </outputs> The '$database' variables is replaced with the database's filename (the 'value' column). I'd like it to be the 'name' column, but using "$database.name" throws an runtime exception: NotFound: cannot find 'name' while searching for 'database.name' (full backtrace is listed below). Is there a way to display the name instead of the value in an <option> clause ? Thanks! Gordon. URL: http://tango/tool_runner/index File 'build/bdist.solaris-2.11-i86pc/egg/weberror/evalexception/middleware.py', line 364 in respond File 'build/bdist.solaris-2.11-i86pc/egg/paste/debug/prints.py', line 98 in __call__ File 'build/bdist.solaris-2.11-i86pc/egg/paste/wsgilib.py', line 539 in intercept_output File 'build/bdist.solaris-2.11-i86pc/egg/beaker/session.py', line 103 in __call__ File 'build/bdist.solaris-2.11-i86pc/egg/paste/recursive.py', line 80 in __call__ File 'build/bdist.solaris-2.11-i86pc/egg/paste/httpexceptions.py', line 632 in __call__ File '/media/sdb1/galaxy/galaxy_devel/lib/galaxy/web/framework/base.py', line 126 in __call__ body = method( trans, **kwargs ) File '/media/sdb1/galaxy/galaxy_devel/lib/galaxy/web/controllers/tool_runner.py', line 45 in index template, vars = tool.handle_input( trans, params.__dict__ ) File '/media/sdb1/galaxy/galaxy_devel/lib/galaxy/tools/__init__.py', line 708 in handle_input out_data = self.execute( trans, incoming=params ) File '/media/sdb1/galaxy/galaxy_devel/lib/galaxy/tools/__init__.py', line 915 in execute return self.tool_action.execute( self, trans, incoming=incoming, set_output_hid=set_output_hid ) File '/media/sdb1/galaxy/galaxy_devel/lib/galaxy/tools/actions/__init__.py', line 159 in execute data.name = fill_template( output.label, context=params ) File '/media/sdb1/galaxy/galaxy_devel/lib/galaxy/util/template.py', line 9 in fill_template return str( Template( source=template_text, searchList=[context] ) ) File '<string>', line 28 in respond NotFound: cannot find 'name' while searching for 'database.name'
Hello Assaf, This item is on our development plans and we'll let yo know as soon as it is available. Greg Von Kuster Galaxy Development Team Assaf Gordon wrote:
Hello,
I have a tool which has an <option> with 'from_file' attribute: ... <param name="database" type="select" label="Mapping Database"> <options from_file="mapping_filter_databases.txt"> <column name="name" index="1"/> <column name="value" index="0"/> </options> </param> ...
I want to use the database name in the label of the output dataset: <outputs> <data format="fasta" name="output_mapped" label="Mappers of $input.name to $database" /> </outputs>
The '$database' variables is replaced with the database's filename (the 'value' column). I'd like it to be the 'name' column, but using "$database.name" throws an runtime exception: NotFound: cannot find 'name' while searching for 'database.name' (full backtrace is listed below).
Is there a way to display the name instead of the value in an <option> clause ?
Thanks! Gordon.
URL: http://tango/tool_runner/index File 'build/bdist.solaris-2.11-i86pc/egg/weberror/evalexception/middleware.py', line 364 in respond File 'build/bdist.solaris-2.11-i86pc/egg/paste/debug/prints.py', line 98 in __call__ File 'build/bdist.solaris-2.11-i86pc/egg/paste/wsgilib.py', line 539 in intercept_output File 'build/bdist.solaris-2.11-i86pc/egg/beaker/session.py', line 103 in __call__ File 'build/bdist.solaris-2.11-i86pc/egg/paste/recursive.py', line 80 in __call__ File 'build/bdist.solaris-2.11-i86pc/egg/paste/httpexceptions.py', line 632 in __call__ File '/media/sdb1/galaxy/galaxy_devel/lib/galaxy/web/framework/base.py', line 126 in __call__ body = method( trans, **kwargs ) File '/media/sdb1/galaxy/galaxy_devel/lib/galaxy/web/controllers/tool_runner.py', line 45 in index template, vars = tool.handle_input( trans, params.__dict__ ) File '/media/sdb1/galaxy/galaxy_devel/lib/galaxy/tools/__init__.py', line 708 in handle_input out_data = self.execute( trans, incoming=params ) File '/media/sdb1/galaxy/galaxy_devel/lib/galaxy/tools/__init__.py', line 915 in execute return self.tool_action.execute( self, trans, incoming=incoming, set_output_hid=set_output_hid ) File '/media/sdb1/galaxy/galaxy_devel/lib/galaxy/tools/actions/__init__.py', line 159 in execute data.name = fill_template( output.label, context=params ) File '/media/sdb1/galaxy/galaxy_devel/lib/galaxy/util/template.py', line 9 in fill_template return str( Template( source=template_text, searchList=[context] ) ) File '<string>', line 28 in respond NotFound: cannot find 'name' while searching for 'database.name'
_______________________________________________ galaxy-user mailing list galaxy-user@bx.psu.edu http://mail.bx.psu.edu/cgi-bin/mailman/listinfo/galaxy-user
participants (2)
-
Assaf Gordon
-
Greg Von Kuster