From 00be7692a53f0199247a994a6494481f57142a9a Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 3 Sep 2021 15:38:43 +0000 Subject: Add covarstruct as a possible keyword for the rqtl_wrapper.R script (not integrated into the script yet though) --- gn3/api/rqtl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gn3/api') diff --git a/gn3/api/rqtl.py b/gn3/api/rqtl.py index ebb746c..b5627c5 100644 --- a/gn3/api/rqtl.py +++ b/gn3/api/rqtl.py @@ -24,7 +24,7 @@ run the rqtl_wrapper script and return the results as JSON raise FileNotFoundError # Split kwargs by those with values and boolean ones that just convert to True/False - kwargs = ["model", "method", "nperm", "scale", "control_marker"] + kwargs = ["covarstruct", "model", "method", "nperm", "scale", "control_marker"] boolean_kwargs = ["addcovar", "interval", "pstrata"] all_kwargs = kwargs + boolean_kwargs -- cgit v1.2.3 From 7627378dd1eb52055f4e25047ba53a2d2e4c092f Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 6 Oct 2021 11:25:38 +0300 Subject: Enable vertical and horizontal heatmaps Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/non-clustered-heatmaps-and-flipping.gmi * Update the request endpoint, so that it produces a vertical or horizontal heatmap depending on the user's request. --- gn3/api/heatmaps.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gn3/api') diff --git a/gn3/api/heatmaps.py b/gn3/api/heatmaps.py index 62ca2ad..633a061 100644 --- a/gn3/api/heatmaps.py +++ b/gn3/api/heatmaps.py @@ -17,7 +17,9 @@ def clustered_heatmaps(): Parses the incoming data and responds with the JSON-serialized plotly figure representing the clustered heatmap. """ - traits_names = request.get_json().get("traits_names", tuple()) + heatmap_request = request.get_json() + traits_names = heatmap_request.get("traits_names", tuple()) + vertical = heatmap_request.get("vertical", False) if len(traits_names) < 2: return jsonify({ "message": "You need to provide at least two trait names." @@ -30,7 +32,7 @@ def clustered_heatmaps(): traits_fullnames = [parse_trait_fullname(trait) for trait in traits_names] with io.StringIO() as io_str: - _filename, figure = build_heatmap(traits_fullnames, conn) + figure = build_heatmap(traits_fullnames, conn, vertical=vertical) figure.write_json(io_str) fig_json = io_str.getvalue() return fig_json, 200 -- cgit v1.2.3