From 204a308be0f741726b9a620d88fbc22b22124c81 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 29 Dec 2023 18:55:37 +0000 Subject: Namespace all modules under gn2. We move all modules under a gn2 directory. This is important for "correct" packaging and deployment as a Guix service. --- gn2/wqflask/templates/correlation_matrix.html | 203 ++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 gn2/wqflask/templates/correlation_matrix.html (limited to 'gn2/wqflask/templates/correlation_matrix.html') diff --git a/gn2/wqflask/templates/correlation_matrix.html b/gn2/wqflask/templates/correlation_matrix.html new file mode 100644 index 00000000..17fd66fa --- /dev/null +++ b/gn2/wqflask/templates/correlation_matrix.html @@ -0,0 +1,203 @@ +{% extends "base.html" %} +{% block title %}Correlation Matrix{% endblock %} +{% block css %} + + + + + +{% endblock %} +{% block content %} + +
+

Correlation Matrix

+
Select any cell in the matrix to generate a scatter plot.
Lower left cells list Pearson product-moment correlations; upper right cells list Spearman rank order correlations. Each cell also contains the n of cases in parenthesis. Values ranging from 0.4 to 1.0 range from orange to white, while values ranging from –0.4 to –1.0 range from dark blue to white.
+
+{% if lowest_overlap < 8 %} +
Caution: This matrix of correlations contains some cells with small sample sizes of fewer than 8.
+{% endif %} + + + + + + + + + + + {% for trait in traits %} + + {% endfor %} + + {% for trait in traits %} + {% set outer_loop = loop.index %} + + + + {% for result in corr_results[loop.index-1] %} + {% if result[0].name == trait.name and result[0].dataset == trait.dataset %} + + {% else %} + {% if result[1] == 0 %} + + {% else %} + + {% endif %} + {% endif %} + {% endfor %} + + {% endfor %} + +
Spearman Rank Correlation (rho)
P e a r s o n     r
  
+ {{ loop.index }} +
+ {{ loop.index }}: {{ trait.dataset.name }}  {{ trait.name }} +
{% if trait.dataset.type == "ProbeSet" %}Gene Symbol: {{ trait.symbol }}{% elif trait.dataset.type == "Publish" %}Trait Symbol: {{ trait.post_publication_abbreviation }}{% elif trait.dataset.type == "Geno" %}Genotype{% endif %}
+ +
n
{{ result[2] }}
N/A{{ '%0.2f' % result[1] }}
({{ result[2] }})
+
+
+ + + +
+
+ +{% if pca_works == "True" %} +
+ {% include 'pca_scree_plot.html' %} +
+ +

PCA Traits

+
+ + + + + + + + + + + + + + + + {% for this_trait_id in pca_trait_ids %} + + + + + + {% endfor %} + +
IndexPCA Trait
{{ loop.index }}{{ pca_trait_ids[loop.index - 1] }}
+
+ + + +
+

Factor Loadings Plot

+
+

Factor Loadings Table

+ + + + + + + {% if trait_list|length > 2 %}{% endif %} + + + + {% for row in loadings_array %} + {% set row_counter = loop.index-1 %} + + + {% for column in row %} + + {% endfor %} + + {% endfor %} + + +
TraitFactor 1Factor 2Factor 3
+ + {{ traits[loop.index-1].name }} + + {{ '%0.3f' % loadings_array[row_counter][loop.index-1]|float }}
+
+{% endif %} +
+{% endblock %} + +{% block js %} + + + + + + + + + + + + + + + + +{% endblock %} -- cgit v1.2.3