From 805b781e6eabfb42cbecb319fffc8ade855de914 Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 16 Sep 2024 18:49:34 +0000 Subject: Handle Effect Size plots on the scatterplot page Added a new parameter to the scatterplot page ('effect') that causes the figures to be drawn differently. For example: - The plot width is different - Spearman Rank plot isn't displayed/generated - The number of X-axis ticks is explicitly set to 3, with no decimal places --- gn2/wqflask/templates/corr_scatterplot.html | 177 ++++++++++++++-------------- 1 file changed, 90 insertions(+), 87 deletions(-) (limited to 'gn2/wqflask/templates/corr_scatterplot.html') diff --git a/gn2/wqflask/templates/corr_scatterplot.html b/gn2/wqflask/templates/corr_scatterplot.html index c2586bc0..9532726c 100644 --- a/gn2/wqflask/templates/corr_scatterplot.html +++ b/gn2/wqflask/templates/corr_scatterplot.html @@ -126,18 +126,20 @@
  • Pearson
  • + {% if effect_plot == false %}
  • Spearman Rank
  • + {% endif %} -
    +


    -
    +
    {% if trait_1.dataset.type == "ProbeSet" %}
    @@ -248,101 +250,102 @@
    + {% if effect_plot == false %}


    -
    -
    - {% if trait_1.dataset.type == "ProbeSet" %} - -
    - [{{trait_1.symbol}} on {{trait_1.location_repr}} Mb] - {{trait_1.description_display}} -
    - {% elif trait_1.dataset.type == "Publish" %} - -
    - PubMed: {{trait_1.pubmed_text}} +
    +
    + {% if trait_1.dataset.type == "ProbeSet" %} + +
    + [{{trait_1.symbol}} on {{trait_1.location_repr}} Mb] {{trait_1.description_display}} -
    - {% endif %} +
    + {% elif trait_1.dataset.type == "Publish" %} + +
    + PubMed: {{trait_1.pubmed_text}} + {{trait_1.description_display}} +
    + {% endif %} -
    +
    - {% if trait_2.dataset.type == "ProbeSet" %} - -
    - [{{trait_2.symbol}} on {{trait_2.location_repr}} Mb] - {{trait_2.description_display}} -
    - {% elif trait_2.dataset.type == "Publish" %} - -
    - PubMed: {{trait_2.pubmed_text}} + {% if trait_2.dataset.type == "ProbeSet" %} + +
    + [{{trait_2.symbol}} on {{trait_2.location_repr}} Mb] {{trait_2.description_display}} +
    + {% elif trait_2.dataset.type == "Publish" %} + +
    + PubMed: {{trait_2.pubmed_text}} + {{trait_2.description_display}} +
    + {% endif %} +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StatisticValue
    Number{{jsdata.num_overlap}}
    Slope{{ jsdata.srslope_string }}
    Intercept{{'%0.3f' % jsdata.srintercept}}
    r value{{'%0.3f' % jsdata.srr_value}}
    P value{% if jsdata.srp_value < 0.001 %}{{'%0.3e' % jsdata.srp_value}}{% else %}{{'%0.3f' % jsdata.srp_value}}{% endif %}
    + Regression Line +
    + y = {{ jsdata.srslope_string }} * x {% if jsdata.srintercept < 0 %}- {{'%0.3f' % (jsdata.srintercept * -1)}}{% else %}+ {{'%0.3f' % jsdata.srintercept}}{% endif %} +
    - {% endif %} -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    StatisticValue
    Number{{jsdata.num_overlap}}
    Slope{{ jsdata.srslope_string }}
    Intercept{{'%0.3f' % jsdata.srintercept}}
    r value{{'%0.3f' % jsdata.srr_value}}
    P value{% if jsdata.srp_value < 0.001 %}{{'%0.3e' % jsdata.srp_value}}{% else %}{{'%0.3f' % jsdata.srp_value}}{% endif %}
    - Regression Line -
    - y = {{ jsdata.srslope_string }} * x {% if jsdata.srintercept < 0 %}- {{'%0.3f' % (jsdata.srintercept * -1)}}{% else %}+ {{'%0.3f' % jsdata.srintercept}}{% endif %} -
    -
    -
    - +
    + {% endif %}
    {% endblock %} -- cgit v1.2.3