aboutsummaryrefslogtreecommitdiff
path: root/gn3/api
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/api')
-rw-r--r--gn3/api/search.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gn3/api/search.py b/gn3/api/search.py
index 328baf5..aa844ee 100644
--- a/gn3/api/search.py
+++ b/gn3/api/search.py
@@ -176,7 +176,7 @@ def parse_location_field(species_query: xapian.Query,
def make_query(interval: ChromosomalInterval) -> xapian.Query:
# TODO: Convert the xapian index to use bases instead of megabases.
- to_megabases = lambda x: str(float(x)/1e6)
+ to_megabases = lambda x: str(Decimal(x)/10**6)
return combine_queries(xapian.Query.OP_AND,
species_query,
xapian.Query(chromosome_prefix + interval.chromosome),