From 2855a7ae9c01a7203d411e6cd96f61677f3c6bc3 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Thu, 4 Jan 2024 17:58:25 +0300 Subject: Add probeset RDF page. * gn2/wqflask/templates/probeset.html: New probeset HTML file. * gn2/wqflask/views.py (get_probeset): New function. Signed-off-by: Munyoki Kilyungi --- gn2/wqflask/templates/probeset.html | 114 ++++++++++++++++++++++++++++++++++++ gn2/wqflask/views.py | 14 +++++ 2 files changed, 128 insertions(+) create mode 100644 gn2/wqflask/templates/probeset.html (limited to 'gn2') diff --git a/gn2/wqflask/templates/probeset.html b/gn2/wqflask/templates/probeset.html new file mode 100644 index 00000000..53d7136e --- /dev/null +++ b/gn2/wqflask/templates/probeset.html @@ -0,0 +1,114 @@ +{% extends "base.html" %} + +{% block css %} + +{% endblock %} + +{% block title %} +mRNA Expression: +{{ metadata.name or name }} +{% endblock %} + +{% block content %} + + +
+

+ mRNA Expression: + {{ metadata.name or name }} +

+ {% if metadata.description %} +

{{ metadata.description }}

+ {% endif %} + + {% if metadata.dataset %} + + + + + + + + + + + + + {% endif %} + + {% if metadata.symbol %} + + + + + {% endif %} + + {% if metadata.alias %} + + + + {% endif %} + + {% if metadata.location %} + + + + + {% endif %} + + {% if metadata.blatSeq %} + + + + + {% endif %} + + {% if metadata.specificity or metadata.blatScore %} + + + + + {% endif %} + + {% if metadata.references %} + + + + + + {% endif %} +
Group + {{ metadata.dataset }} +
Dataset + {{ metadata.datasetName }} +
Tissue{{ metadata.tissue}}
Gene Symbol + {% if metadata.symbol.__class__.__name__ == 'list' %} + {% for symbol in metadata.symbol %} + {{ symbol.symbol }}; + {% endfor %} + {% else %} + {{ metadata.symbol }} + {% endif %} +
AliasesGeneneNetwork: {{ metadata.alias }}
Location {{ metadata.location }}
BLAT Sequence + {{ metadata.blatSeq }} +
Target Score + {% if metadata.specificity %} + BLAT Specificity: {{ metadata.specificity }} + {% endif %} + + {% if metadata.blatScore %} +  Score: {{ metadata.blatScore }} + {% endif %} +
Resource Links + {% for reference in metadata.references %} + {{ reference.name }}  + {% endfor %} +
+
+ +{% endblock %} diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py index 68413aeb..b70f5721 100644 --- a/gn2/wqflask/views.py +++ b/gn2/wqflask/views.py @@ -1172,6 +1172,20 @@ def get_phenotype(name, group=None): ) +@app.route("/probesets/", methods=('GET',)) +def get_probeset(name): + metadata = requests.get( + urljoin( + GN3_LOCAL_URL, + f"/api/metadata/probesets/{name}") + ).json() + return render_template( + "probeset.html", + name=name, + metadata=metadata, + ) + + @app.route("/genotypes/", methods=('GET',)) def get_genotype(name): metadata = requests.get( -- cgit v1.2.3