Thanks John,
For now I am setting both the value and default_value tags, e.g.
https://github.com/peterjc/galaxy_blast/blob/master/tools/blastxml_to_top...
However, in usability testing I have found a related problem/issue.
In this tool I ask for several columns, including one which defaults
to column 25. Provided the most recent tabular file in the history
has this many (or more) columns, everything is fine.
The problem is that if the most recent tabular file has less columns
(e.g. 12), then the default value cannot be used - thus it is *silently*
replaced with 1.
The same problem of the column parameters being changed to
column one can happen with switching the input file too.
Once the user then switches to an appropriate tabular input file
(which does have enough columns), but the column defaults are
not reapplied, so column one gets used - and the output is wrong :(
However, if I manually change a column option (e.g. to 24), then
switch to an input file with less columns, rather than a *silent*
substitution, although column one is picked, there is a nice red
warning:
"An invalid option was selected, please verify "
I think the simplest fix would be to reapply the defaults everytime
the associated input file is changed - but this might upset anyone
who had for whatever reason manually picked different columns.
Can we have this red warning when the default value is not
possible and column one is substituted instead?
Thanks,
Peter
P.S. Should this get a new Trello issue, or is the old one enough?
https://trello.com/c/6ugfcLgI/435-507-default-value-for-data-column-not-w...
On Mon, May 12, 2014 at 6:07 PM, John Chilton <jmchilton(a)gmail.com> wrote:
Hey Peter,
I opened a pull request to allow the use of the value attribute and
to allow column numbers to be prefixed by c. I cannot see any problem
with either change and I have added some unit tests. Hopefully, this
makes things more intuitive.
https://bitbucket.org/galaxy/galaxy-central/pull-request/389/small-column...
Thanks,
-John