diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index 7a0b34cd8b0..4a1d14ae91d 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -2561,10 +2561,12 @@ Set to ``false`` to not force user to select an option in the list. Used only if the ``type`` attribute -value is ``data_column``, if ``true`` Galaxy assumes first row of ``data_ref`` +value is ``data_column``. If ``true``, Galaxy assumes the first row of ``data_ref`` is a header and builds the select list with these values rather than the more -generic ``c1`` ... ``cN``. - +generic ``c1`` ... ``cN`` (i.e. it will be ``c1: head1`` ... ``cN: headN``). +Note that the content of the Cheetah variable is still +the column index. + @@ -4830,7 +4832,7 @@ write out a JSON representation of the tool parameters. *Example* -The following will create a cheetah variable that can be evaluated as ``$inputs`` that +The following will create a Cheetah variable that can be evaluated as ``$inputs`` that will contain the tool parameter inputs. ```xml diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index 8f64a80c050..cc44f6b4108 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -1258,7 +1258,7 @@ class ColumnListParameter(SelectToolParameter): try: with open(dataset.get_file_name(), 'r') as f: head = f.readline() - cnames = head.rstrip().split('\t') + cnames = head.rstrip("\n\r ").split('\t') column_list = [('%d' % (i + 1), 'c%d: %s' % (i + 1, x)) for i, x in enumerate(cnames)] if self.numerical: # If numerical was requested, filter columns based on metadata if hasattr(dataset, 'metadata') and hasattr(dataset.metadata, 'column_types'): diff --git a/test/functional/tools/column_param.xml b/test/functional/tools/column_param.xml index 92b979210e7..b5933606e48 100644 --- a/test/functional/tools/column_param.xml +++ b/test/functional/tools/column_param.xml @@ -1,23 +1,34 @@ - - cut -f '$col' '$input1' > '$output1' - + '$output1' && +echo "col $col" > '$output2' && +echo "col_names $col_names" >> '$output2' + ]]> + + + + + + + + +