Mercurial > repos > rv43 > chess_tomo
changeset 27:7d9cf7592ad1 draft
planemo upload for repository https://github.com/rolfverberg/galaxytools commit f8c4bdb31c20c468045ad5e6eb255a293244bc6c-dirty
| author | rv43 |
|---|---|
| date | Tue, 21 Mar 2023 17:56:17 +0000 |
| parents | dfe7105739fa |
| children | 562fc79de827 |
| files | tomo_reduce.xml workflow/run_tomo.py |
| diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tomo_reduce.xml Tue Mar 21 17:45:21 2023 +0000 +++ b/tomo_reduce.xml Tue Mar 21 17:56:17 2023 +0000 @@ -26,8 +26,8 @@ </param> <when value="full_range"/> <when value="enter_range"> - <param name="low" type="integer" optional="true" label="Lower image range index in vertical direction"/> - <param name="upp" type="integer" optional="true" label="Upper image range index in vertical direction"/> + <param name="low" type="integer" value="-1" optional="false" label="Lower image range index in vertical direction"/> + <param name="upp" type="integer" value="-1" optional="false" label="Upper image range index in vertical direction"/> </when> </conditional> </inputs>
--- a/workflow/run_tomo.py Tue Mar 21 17:45:21 2023 +0000 +++ b/workflow/run_tomo.py Tue Mar 21 17:56:17 2023 +0000 @@ -988,7 +988,12 @@ if self.galaxy_flag: if img_x_bounds is None: img_x_bounds = (0, first_image.shape[0]) - elif not is_index_range(img_x_bounds, ge=0, le=first_image.shape[0]): + elif is_int_pair(img_x_bounds, ge=-1, le=first_image.shape[0]): + if img_x_bounds[0] == -1: + img_x_bounds[0] = 0 + if img_x_bounds[1] == -1: + img_x_bounds[1] = first_image.shape[0] + if is_index_range(img_x_bounds, ge=0, le=first_image.shape[0]): raise ValueError(f'Invalid parameter img_x_bounds ({img_x_bounds})') else: quick_imshow(first_image, title=title)
