diff --git a/bento_beacon/utils/gohan_utils.py b/bento_beacon/utils/gohan_utils.py index 3e2f185..a2b5c34 100644 --- a/bento_beacon/utils/gohan_utils.py +++ b/bento_beacon/utils/gohan_utils.py @@ -52,10 +52,6 @@ def zero_to_one(start, end=None): return int(start) + 1 if end is None else (int(start) + 1, end) -def one_to_zero(start, end): - return (int(start) - 1, end) - - # ------------------------------------------------------- # gohan calls # ------------------------------------------------------- @@ -124,8 +120,7 @@ def sequence_query_to_gohan(beacon_args, granularity, ids_only): def range_query_to_gohan(beacon_args, granularity, ids_only): current_app.logger.debug("RANGE QUERY") gohan_args = beacon_to_gohan_generic_mapping(beacon_args) - gohan_args["lowerBound"] = zero_to_one(beacon_args["start"][0]) - gohan_args["upperBound"] = zero_to_one(beacon_args["end"][0]) + gohan_args["lowerBound"], gohan_args["upperBound"] = zero_to_one(beacon_args["start"][0], beacon_args["end"][0]) gohan_args["getSampleIdsOnly"] = ids_only return generic_gohan_query(gohan_args, granularity, ids_only)