aboutsummaryrefslogtreecommitdiff
path: root/qc_app/upload/rqtl2.py
diff options
context:
space:
mode:
Diffstat (limited to 'qc_app/upload/rqtl2.py')
-rw-r--r--qc_app/upload/rqtl2.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/qc_app/upload/rqtl2.py b/qc_app/upload/rqtl2.py
index 0b446ac..7609fa9 100644
--- a/qc_app/upload/rqtl2.py
+++ b/qc_app/upload/rqtl2.py
@@ -34,6 +34,7 @@ from qc_app.db.datasets import (
probeset_study_by_id,
probeset_create_study,
+ probeset_dataset_by_id,
probeset_create_dataset,
probeset_datasets_by_study,
probeset_studies_by_species_and_population)
@@ -512,8 +513,30 @@ def select_dataset_info(species_id: int, population_id: int):
datasets=probeset_datasets_by_study(
conn, int(form["probe-study-id"])),
avgmethods=averaging_methods(conn))
+ probeset_study = probeset_study_by_id(
+ conn, int(form["probe-study-id"]))
+ probeset_dataset = probeset_dataset_by_id(
+ conn, int(form["probe-dataset-id"]))
return render_template("rqtl2/summary-info.html",
species=species,
population=population,
- geno_dataset=geno_dataset)
+ geno_dataset=geno_dataset,
+ probe_study=probeset_study,
+ probe_dataset=probeset_dataset)
+
+
+
+@rqtl2.route(("/upload/species/<int:species_id>/population/<int:population_id>"
+ "/rqtl2-bundle/confirm-bundle-details"),
+ methods=["POST"])
+def confirm_bundle_details(species_id: int, population_id: int):
+ """Confirm the details and trigger R/qtl2 bundle processing..."""
+ with database_connection(app.config["SQL_URI"]) as conn:
+ error = check_errors(
+ conn, "species", "population", "rqtl2_bundle_file", "geno-dataset",
+ "probe-study-id", "probe-dataset-id")
+ if bool(error):
+ return error
+
+ raise NotImplementedError