diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index f3468883c17..0001c078874 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -850,8 +850,9 @@ class DrillDownSelectToolParameter( ToolParameter ): # Dynamic options are not yet supported in workflow, allow # specifying the value as text for now. if self.is_dynamic and trans.workflow_building_mode: - assert isinstance( value, UnvalidatedValue ) - value = value.value + if value is not None: + assert isinstance( value, UnvalidatedValue ) + value = value.value if self.multiple: if value is None: value = "" @@ -947,12 +948,17 @@ class DrillDownSelectToolParameter( ToolParameter ): value = value.value else: suffix = "" - if not isinstance( value, list ): + if not value: + value = [] + elif not isinstance( value, list ): value = [ value ] # FIXME: Currently only translating values back to labels if they # are not dynamic if self.is_dynamic: - rval = [ value ] + if value: + rval = [ value ] + else: + rval = [] else: rval = [] for val in value: diff --git a/tools/annotation_profiler/annotation_profiler_for_interval.py b/tools/annotation_profiler/annotation_profiler_for_interval.py index d6f33289f9f..35e7fb5a003 100644 --- a/tools/annotation_profiler/annotation_profiler_for_interval.py +++ b/tools/annotation_profiler/annotation_profiler_for_interval.py @@ -153,6 +153,7 @@ class TableCoverageSummary: end = 0 last_end_index = {} while True: + if end >= chromosome_bitset.size: break start = chromosome_bitset.next_set( end ) if start >= chromosome_bitset.size: break end = chromosome_bitset.next_clear( start )