aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-09-13 09:18:18 -0500
committerFrederick Muriuki Muriithi2024-09-13 10:40:30 -0500
commit36fc8996fa830078866e17aab7d9c177c74c835b (patch)
tree2cb62c2d5fee89c0c922475a304beb8e8f201122
parent2f1279b5e45dfff972fa6462d94a0b93b6a1144f (diff)
downloadgn-uploader-36fc8996fa830078866e17aab7d9c177c74c835b.tar.gz
Initialise genotypes' UI
-rw-r--r--uploader/genotypes/__init__.py1
-rw-r--r--uploader/genotypes/views.py12
-rw-r--r--uploader/population/views.py4
-rw-r--r--uploader/templates/base.html4
-rw-r--r--uploader/templates/genotypes/base.html12
-rw-r--r--uploader/templates/genotypes/index.html24
6 files changed, 54 insertions, 3 deletions
diff --git a/uploader/genotypes/__init__.py b/uploader/genotypes/__init__.py
new file mode 100644
index 0000000..d0025d6
--- /dev/null
+++ b/uploader/genotypes/__init__.py
@@ -0,0 +1 @@
+"""The Genotypes module."""
diff --git a/uploader/genotypes/views.py b/uploader/genotypes/views.py
new file mode 100644
index 0000000..2b4ed10
--- /dev/null
+++ b/uploader/genotypes/views.py
@@ -0,0 +1,12 @@
+"""Views for the genotypes."""
+from flask import Blueprint, render_template
+
+from uploader.authorisation import require_login
+
+genotypesbp = Blueprint("genotypes", __name__)
+
+@genotypesbp.route("/genotypes")
+@require_login
+def index():
+ """Direct entry-point for genotypes."""
+ return render_template("genotypes/index.html")
diff --git a/uploader/population/views.py b/uploader/population/views.py
index 003787a..e870c85 100644
--- a/uploader/population/views.py
+++ b/uploader/population/views.py
@@ -10,10 +10,11 @@ from flask import (flash,
Blueprint,
current_app as app)
+from uploader.samples.views import samplesbp
from uploader.ui import make_template_renderer
from uploader.authorisation import require_login
from uploader.db_utils import database_connection
-from uploader.samples.views import samplesbp
+from uploader.genotypes.views import genotypesbp
from uploader.species.models import (all_species,
species_by_id,
order_species_by_family)
@@ -27,6 +28,7 @@ from .models import (save_population,
__active_link__ = "populations"
popbp = Blueprint("populations", __name__)
popbp.register_blueprint(samplesbp, url_prefix="/")
+popbp.register_blueprint(genotypesbp, url_prefix="/")
render_template = make_template_renderer("populations")
diff --git a/uploader/templates/base.html b/uploader/templates/base.html
index d68c6c0..cc37c3e 100644
--- a/uploader/templates/base.html
+++ b/uploader/templates/base.html
@@ -46,10 +46,10 @@
<li><a href="/" >Home</a></li>
<li><a href="{{url_for('species.list_species')}}"
title="View and manage species information.">Species</a></li>
- <li><a href="#"
- title="Upload Genotype data.">Genotype Data</a></li>
<li><a href="{{url_for('species.populations.index')}}"
title="View and manage species populations.">Populations</a></li>
+ <li><a href="{{url_for('species.populations.genotypes.index')}}"
+ title="Upload Genotype data.">Genotype Data</a></li>
<li><a href="{{url_for('species.populations.samples.index')}}"
title="Upload population samples.">Samples</a></li>
<li><a href="{{url_for('expression-data.index.index')}}"
diff --git a/uploader/templates/genotypes/base.html b/uploader/templates/genotypes/base.html
new file mode 100644
index 0000000..1b274bf
--- /dev/null
+++ b/uploader/templates/genotypes/base.html
@@ -0,0 +1,12 @@
+{%extends "populations/base.html"%}
+
+{%block lvl3_breadcrumbs%}
+<li {%if activelink=="genotypes"%}
+ class="breadcrumb-item active"
+ {%else%}
+ class="breadcrumb-item"
+ {%endif%}>
+ <a href="{{url_for('species.populations.genotypes.index')}}">Genotypes</a>
+</li>
+{%block lvl4_breadcrumbs%}{%endblock%}
+{%endblock%}
diff --git a/uploader/templates/genotypes/index.html b/uploader/templates/genotypes/index.html
new file mode 100644
index 0000000..4f5c3a8
--- /dev/null
+++ b/uploader/templates/genotypes/index.html
@@ -0,0 +1,24 @@
+{%extends "genotypes/base.html"%}
+{%from "flash_messages.html" import flash_all_messages%}
+{%from "species/macro-select-species.html" import select_species_form%}
+
+{%block title%}Genotypes{%endblock%}
+
+{%block pagetitle%}Genotypes{%endblock%}
+
+
+{%block contents%}
+{{flash_all_messages()}}
+
+<div class="row">
+ <p><strong>We have not implemented this part yet!</strong></p>
+</div>
+
+<div class="row">
+ <h3>Some Important Concepts to Consider/Remember</h3>
+ <ul>
+ <li>Reference vs. Non-reference alleles</li>
+ <li>In <em>GenoCode</em> table, items are ordered by <strong>InbredSet</strong></li>
+ </ul>
+</div>
+{%endblock%}