Skip to content

Commit

Permalink
Merge pull request #119 from bento-platform/fixes/gohan-end-position
Browse files Browse the repository at this point in the history
Fixes/gohan end position
  • Loading branch information
gsfk authored Nov 26, 2024
2 parents 5b52f14 + fb223b6 commit 45350d3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions bento_beacon/utils/gohan_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
# -------------------------------------------------------
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 45350d3

Please sign in to comment.