galaxyproject / galaxy

Data intensive science for everyone.
https://galaxyproject.org
Other
1.41k stars 1.01k forks source link

The " Extract MAF by block number" (`maf_by_block_number1`) tool requires a value for an optional non-defaulted parameter #16969

Open natefoo opened 1 year ago

natefoo commented 1 year ago

Describe the bug The Column containing Block number parameter is marked as optional and has no default, but is treated as an int by the tool script, resulting in the following error on tool run:

Traceback (most recent call last):
  File "/jetstream2/scratch/main/jobs/53417612/tool_files/maf_by_block_number.py", line 50, in <module>
    __main__()
  File "/jetstream2/scratch/main/jobs/53417612/tool_files/maf_by_block_number.py", line 20, in __main__
    block_col = int(sys.argv[4].strip()) - 1
ValueError: invalid literal for int() with base 10: 'None'

Galaxy Version and/or server at which you observed the bug Galaxy Version: 23.1.2.dev0 Commit: a2e3972ed290834e956f869a8afc48bbdfaa3031

To Reproduce

galaxy-tool-test -u https://usegalaxy.org/ -t maf_by_block_number1

Expected behavior The tool works with default params and the provided tool test

Screenshots N/A

Additional context https://usegalaxy.org/datasets/f9cad7b01a4721350c3fa136addea5c8/details

nsoranzo commented 1 year ago

I think the block_col parameter makes sense only when input1 is a tabular file, while also txt files are accepted, and the test file is sniffed as txt as it's just one column. It would probably make sense to drop the block_col parameter and require that the input is a single column, as there are other tools to select a column from a tabular file. Another option may be to default block_col to 1 (untested but more conservative).