diff --git a/planet/controllers/help.py b/planet/controllers/help.py index 917ba10..15edc4a 100644 --- a/planet/controllers/help.py +++ b/planet/controllers/help.py @@ -14,7 +14,10 @@ "neighborhood": "modals/help/neighborhood.html", "hrr": "modals/help/hrr.html", "blast": "modals/help/blast.html", - "pcc": "modals/help/pcc.html"} + "pcc": "modals/help/pcc.html", + "lowabundance": "modals/help/low_abundance.html"} + +__POPUPS = {"lowabundance": "tooltips/low_abundance.html"} help = Blueprint('help', __name__) @@ -32,3 +35,17 @@ def help_topic(topic): else: abort(404) + +@help.route('/popup/') +def help_popup(topic): + """ + Generic function to get help popups + + :param topic: name of the topic + :return: renders template for the topic if found, 404 if not. + """ + if topic in __POPUPS.keys(): + return render_template(__POPUPS[topic]) + else: + abort(404) + diff --git a/planet/templates/expression_profile.html b/planet/templates/expression_profile.html index 1b187e6..4bf3c02 100644 --- a/planet/templates/expression_profile.html +++ b/planet/templates/expression_profile.html @@ -34,7 +34,7 @@

Expression profile for: {{ profile.probe }}

{% if profile.low_abundance %}
- Attention: This gene has low abundance. + Attention: This gene has low abundance.

{% endif %} diff --git a/planet/templates/modals/help/low_abundance.html b/planet/templates/modals/help/low_abundance.html new file mode 100644 index 0000000..3e6d1d5 --- /dev/null +++ b/planet/templates/modals/help/low_abundance.html @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/planet/templates/search_specific_profiles.html b/planet/templates/search_specific_profiles.html index f47e8bf..8a8bfbc 100644 --- a/planet/templates/search_specific_profiles.html +++ b/planet/templates/search_specific_profiles.html @@ -92,7 +92,8 @@

{{species.name}} profiles specific for {{condition}}{{ r.entropy|round(2) }} {% if r.tau %}{{ r.tau|round(2) }}{% else %}None{% endif %} view profile - {% if r.profile.low_abundance %}{% endif %} + {% if r.profile.low_abundance %}{% endif %} {% endif %} {% endfor %} diff --git a/planet/templates/tooltips/low_abundance.html b/planet/templates/tooltips/low_abundance.html new file mode 100644 index 0000000..f18f1e2 --- /dev/null +++ b/planet/templates/tooltips/low_abundance.html @@ -0,0 +1,7 @@ +
+
Low (Transcript) Abundance
+
+

Some transcripts have low abundance in all conditions in the expression profiles. For these genes, random + stochastic effects can cause sharp peaks in their profile. These are likely not biologically + relevant and should be interpreted with caution.

+
\ No newline at end of file