diff options
author | Frederick Muriuki Muriithi | 2022-01-03 11:40:33 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-01-28 08:07:27 +0300 |
commit | 1e7644dd49d7a4af771a1dd00600ae595a9b8d27 (patch) | |
tree | d05a55bfface1dacb35c417e5683fc62c133b4ba /wqflask | |
parent | d210fde99a0537e73b5862f01603f8d8a3546f91 (diff) | |
download | genenetwork2-1e7644dd49d7a4af771a1dd00600ae595a9b8d27.tar.gz |
Add more items to trait string
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
Diffstat (limited to 'wqflask')
4 files changed, 10 insertions, 7 deletions
diff --git a/wqflask/wqflask/partial_correlations_views.py b/wqflask/wqflask/partial_correlations_views.py index 82287312..f3ec0f78 100644 --- a/wqflask/wqflask/partial_correlations_views.py +++ b/wqflask/wqflask/partial_correlations_views.py @@ -9,7 +9,9 @@ from wqflask import app from utility.tools import GN_SERVER_URL def parse_trait(trait_str: str) -> Union[dict, None]: - keys = ("name", "dataset", "symbol", "description", "data_hmac") + keys = ( + "name", "dataset", "symbol", "description", "location", "mean_expr", + "max_lrs", "data_hmac") parts = tuple(part.strip() for part in trait_str.split(":::")) if len(parts) == len(keys): return dict(zip(keys, parts)) diff --git a/wqflask/wqflask/static/new/javascript/partial_correlations.js b/wqflask/wqflask/static/new/javascript/partial_correlations.js index a6a07558..dea4c675 100644 --- a/wqflask/wqflask/static/new/javascript/partial_correlations.js +++ b/wqflask/wqflask/static/new/javascript/partial_correlations.js @@ -18,7 +18,8 @@ function key_value(keys, values) { function trait(trait_str) { return key_value( - ["name", "dataset", "symbol", "description", "data_hmac"], + ["name", "dataset", "symbol", "description", "location", "mean_expr", + "max_lrs", "data_hmac"], trait_str.split(":::")); } diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html index f4270b67..432393a7 100644 --- a/wqflask/wqflask/templates/collections/view.html +++ b/wqflask/wqflask/templates/collections/view.html @@ -42,7 +42,7 @@ value="{{uc.uc_id}}" /> <input type="hidden" name="traits_list" - value="{% for this_trait in trait_obs %}{{ this_trait.name }}:::{{ this_trait.dataset.name }}:::{{this_trait.symbol}}:::{{this_trait.description_display}}:::{{data_hmac('{}:{}'.format(this_trait.name, this_trait.dataset.name))}}|||{% endfor %}" /> + value="{% for this_trait in trait_obs %}{{ this_trait.name }}:::{{ this_trait.dataset.name }}:::{{this_trait.symbol}}:::{{this_trait.description_display}}:::{{this_trait.location_repr}}:::{{this_trait.mean}}:::{{this_trait['LRS_location_repr']}}:::{{data_hmac('{}:{}'.format(this_trait.name, this_trait.dataset.name))}}|||{% endfor %}" /> <button id="run-partial-correlations" class="btn btn-primary" title="Run partial correlations" diff --git a/wqflask/wqflask/templates/partial_correlations.html b/wqflask/wqflask/templates/partial_correlations.html index c565d4bf..54468155 100644 --- a/wqflask/wqflask/templates/partial_correlations.html +++ b/wqflask/wqflask/templates/partial_correlations.html @@ -142,12 +142,12 @@ <input type="hidden" name="step" id="step-indicator" value="{{step}}" /> <input type="hidden" name="traits_list" - value="{% for trait in traits_list %}{{trait['name']}}:::{{trait['dataset']}}:::{{trait['symbol']}}:::{{trait['description']}}:::{{trait['data_hmac']}}|||{% endfor %}"> + value="{% for trait in traits_list %}{{trait['name']}}:::{{trait['dataset']}}:::{{trait['symbol']}}:::{{trait['description']}}:::{{trait['location']}}:::{{trait['mean_expr']}}:::{{trait['max_lrs']}}:::{{trait['data_hmac']}}|||{% endfor %}"> {%if primary_trait:%} <input type="hidden" name="primary_trait" - value="{{primary_trait['name']}}:::{{primary_trait['dataset']}}:::{{primary_trait['symbol']}}:::{{primary_trait['description']}}:::{{primary_trait['data_hmac']}}" + value="{{primary_trait['name']}}:::{{primary_trait['dataset']}}:::{{primary_trait['symbol']}}:::{{primary_trait['description']}}:::{{primary_trait['location']}}:::{{primary_trait['mean_expr']}}:::{{primary_trait['max_lrs']}}:::{{primary_trait['data_hmac']}}" id="trait_{{primary_trait['data_hmac']}}" /> <div class="panel panel-info"> @@ -162,7 +162,7 @@ {%if target_traits:%} <input type="hidden" name="target_traits" - value="{%for trait in target_traits:%}{{trait['name']}}:::{{trait['dataset']}}:::{{trait['symbol']}}:::{{trait['description']}}:::{{trait['data_hmac']}},{%endfor%}" /> + value="{%for trait in target_traits:%}{{trait['name']}}:::{{trait['dataset']}}:::{{trait['symbol']}}:::{{trait['description']}}:::{{trait['location']}}:::{{trait['mean_expr']}}:::{{trait['max_lrs']}}:::{{trait['data_hmac']}}|||{%endfor%}" /> <div class="panel panel-info"> <div class="panel-heading">Target Traits (Y)</div> <div class="panel-body"> @@ -180,7 +180,7 @@ {%if control_traits:%} <input type="hidden" name="control_traits" - value="{%for trait in control_traits:%}{{trait['name']}}:::{{trait['dataset']}}:::{{trait['symbol']}}:::{{trait['description']}}:::{{trait['data_hmac']}}|||{%endfor%}" /> + value="{%for trait in control_traits:%}{{trait['name']}}:::{{trait['dataset']}}:::{{trait['symbol']}}:::{{trait['description']}}:::{{trait['location']}}:::{{trait['mean_expr']}}:::{{trait['max_lrs']}}:::{{trait['data_hmac']}}|||{%endfor%}" /> <div class="panel panel-info"> <div class="panel-heading">Control Traits (Z)</div> <div class="panel-body"> |