Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes/gohan end position #119

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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