def wrap_input(interval): if interval is None: raise TypeError("'filter_intervals' does not allow missing values in 'intervals'.") elif needs_wrapper: return Interval(Struct(**{k_name: interval.start}), Struct(**{k_name: interval.end}), interval.includes_start, interval.includes_end) else: return interval
def _convert_from_json(self, x): from hail.utils import Interval return Interval(self.point_type._convert_from_json_na(x['start']), self.point_type._convert_from_json_na(x['end']), x['includeStart'], x['includeEnd'])
def _convert_to_py(self, annotation): if annotation is not None: return Interval._from_java(annotation, self._point_type) else: return None
def _convert_to_py(self, annotation): if annotation is not None: return Interval._from_java(annotation, self._point_type) else: return None