aboutsummaryrefslogtreecommitdiff
path: root/qc_app/upload
diff options
context:
space:
mode:
Diffstat (limited to 'qc_app/upload')
-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"),