diff workflow/run_tomo.py @ 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 0891477bcb16
children 562fc79de827
line wrap: on
line diff
--- 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)