aboutsummaryrefslogtreecommitdiff
path: root/qc_app/upload/rqtl2.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-01-17 05:38:29 +0300
committerFrederick Muriuki Muriithi2024-01-17 05:39:10 +0300
commitbf1c2ec1b16b50f419a349a54031baf85fcd4abd (patch)
tree3cd3bfdce0430f657457986becce7483a7172c16 /qc_app/upload/rqtl2.py
parent4e3f6e51b92d9c56f77452bd4b723323a526bc52 (diff)
downloadgn-uploader-bf1c2ec1b16b50f419a349a54031baf85fcd4abd.tar.gz
UI: Initialise summary page.
Diffstat (limited to 'qc_app/upload/rqtl2.py')
-rw-r--r--qc_app/upload/rqtl2.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/qc_app/upload/rqtl2.py b/qc_app/upload/rqtl2.py
index 7db005c..9bed4f1 100644
--- a/qc_app/upload/rqtl2.py
+++ b/qc_app/upload/rqtl2.py
@@ -23,8 +23,9 @@ from qc_app.db import (
species_by_id,
save_population,
populations_by_species,
- population_by_species_and_id,
- geno_dataset_by_species_and_population)
+ population_by_species_and_id,)
+from qc_app.db.datasets import (
+ geno_dataset_by_id, geno_dataset_by_species_and_population)
rqtl2 = Blueprint("rqtl2", __name__)
@@ -214,20 +215,27 @@ def select_dataset_info(species_id: int, population_id: int):
if bool(error_page):
return error_page
+ species = species_by_id(conn, species_id)
+ population = population_by_species_and_id(
+ conn, species_id, population_id)
thefile = fullpath(form["rqtl2_bundle_file"])
with ZipFile(str(thefile), "r") as zfile:
cdata = r_qtl2.control_data(zfile)
if "geno" in cdata and not bool(form.get("geno-dataset-id")):
return render_template(
"rqtl2/select-geno-dataset.html",
- species=species_by_id(conn, species_id),
- population=population_by_species_and_id(
- conn, species_id, population_id),
+ species=species,
+ population=population,
rqtl2_bundle_file=thefile.name,
datasets=geno_dataset_by_species_and_population(
conn, species_id, population_id))
- return "All data points collected. Should proceed to launching the job."
+ geno_dataset = geno_dataset_by_id(conn, form["geno-dataset-id"])
+
+ return render_template("rqtl2/summary-info.html",
+ species=species,
+ population=population,
+ geno_dataset=geno_dataset)
@rqtl2.route(("/upload/species/<int:species_id>/population/<int:population_id>"
"/rqtl2-bundle/select-geno-dataset"),