From 5b9ddfa1a63e5c717e6f12538156e65d2bb351cd Mon Sep 17 00:00:00 2001 From: Charlotte Weaver Date: Fri, 6 Jul 2018 10:26:46 -0700 Subject: [PATCH] Added documentation to filter --- server/app/util/filter.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/app/util/filter.py b/server/app/util/filter.py index 52da7def..51b7f8c5 100644 --- a/server/app/util/filter.py +++ b/server/app/util/filter.py @@ -25,7 +25,14 @@ def _convert_variable(datatype, variable): def parse_filter(filter, schema): """ + The filter comes in as arguments from a GET/POST request + For categorical metadata keys filter based on key=value + For continuous metadata keys filter by key=min,max + Either value can be replaced by a * To have only a minimum value key=min, To have only a maximum value key=*,max + They combine via AND so a cell's metadata would have to match every filter + + The results is a matrix with the cells the pass the filter and at this point all the genes :param filter: flask's request.args :param schema: dictionary schema :return: