-
Notifications
You must be signed in to change notification settings - Fork 994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tool wrapper <options from_dataset> with undocumented behavior #14324
Comments
Docs seem missing. Alternatively it should be possible to use filters, which are better documented. |
Can you check if we have a tool test for this? |
There don't seem to be any tests here and I don't find an example in tools-iuc either. Everything seems to be using tabular input. Filters? How? With something like |
There are some tests here
My expectation would be:
Sill, you are absolutely right, this needs documentation. Btw. does the xml linter complain about the |
Ah, that's a good point. Had forgotten linting before and, yes, you're right it's failing as you expected. |
Alright, that's exactly what it does. Unfortunately the result is not very helpful for my usecase since (again, exactly as explained in the tests) it splits every line into mutliple (1-column) options. So the resulting options list consists of all elements of the original table, but I really only want those from one particular column. |
We can still think of getting the separator from the datatype.. But I would still keep the separator attribute, since I could also imagine cases where txt files are used. Could you open a new issue if you agree. |
https://docs.galaxyproject.org/en/latest/dev/schema.html#from-dataset doesn not really talk about which kind of format the dataset from which to populate the dropdown should have. Since you populate the dropdown from columns of the dataset, at a minimum those must be defined somehow.
I tested this today with input of format="csv" and it turns out that you never get any options in that case.
Looking into the source code I found that
galaxy/lib/galaxy/tools/parameters/dynamic_options.py
Line 555 in 80b726e
describes an undocumented attribute "separator", and when I include this in the options like so:
<options from_dataset="my_input_dataset" separator=",">
then Galaxy will happily populate my dropdown with the selected columns of a csv.For my specific usecase this is good enough, but:
So is it just oversight that the separator attribute isn't documented and it can be used safely?
Should Galaxy introspect the separator instead?
The text was updated successfully, but these errors were encountered: