aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
authorArun Isaac2023-01-24 13:44:00 +0000
committerArun Isaac2023-01-24 13:44:00 +0000
commitecb8929c4a749ff24e8d3086331ce149dc66b574 (patch)
tree7a0cab6d896f2076dd5ce9e83a82b36fa8dd78a9 /gn3
parentbe2034b4e6666861c42702d663e1638c06e4793a (diff)
downloadgenenetwork3-ecb8929c4a749ff24e8d3086331ce149dc66b574.tar.gz
search: Rename the mb prefix to position.
* gn3/api/search.py (parse_query): Rename the mb prefix to position.
Diffstat (limited to 'gn3')
-rw-r--r--gn3/api/search.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gn3/api/search.py b/gn3/api/search.py
index d25f362..e47e2f1 100644
--- a/gn3/api/search.py
+++ b/gn3/api/search.py
@@ -194,7 +194,7 @@ def parse_query(synteny_files_directory: Path, query: str):
queryparser.add_boolean_prefix("chr", chromosome_prefix)
queryparser.add_boolean_prefix("peakchr", "XPC")
queryparser.add_prefix("description", "XD")
- range_prefixes = ["mean", "peak", "mb", "peakmb", "additive", "year"]
+ range_prefixes = ["mean", "peak", "position", "peakmb", "additive", "year"]
for i, prefix in enumerate(range_prefixes):
queryparser.add_rangeprocessor(xapian.NumberRangeProcessor(i, prefix + ":"))
@@ -205,7 +205,7 @@ def parse_query(synteny_files_directory: Path, query: str):
field_processors = [partial(parse_location_field,
xapian.Query(species_prefix + species),
chromosome_prefix,
- range_prefixes.index("mb"),
+ range_prefixes.index("position"),
Just)]
# With synteny search, we search for the same gene sequences
# across different species. But, the same gene sequences may be
@@ -220,7 +220,7 @@ def parse_query(synteny_files_directory: Path, query: str):
partial(parse_location_field,
xapian.Query(species_prefix + lifted_species),
chromosome_prefix,
- range_prefixes.index("mb"),
+ range_prefixes.index("position"),
partial(liftover_interval,
synteny_files_directory / chain_file)))
queryparser.add_boolean_prefix(