aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qc_app/templates/rqtl2/select-geno-dataset.html56
-rw-r--r--qc_app/upload/rqtl2.py7
2 files changed, 63 insertions, 0 deletions
diff --git a/qc_app/templates/rqtl2/select-geno-dataset.html b/qc_app/templates/rqtl2/select-geno-dataset.html
index c8623b3..3487b6e 100644
--- a/qc_app/templates/rqtl2/select-geno-dataset.html
+++ b/qc_app/templates/rqtl2/select-geno-dataset.html
@@ -52,4 +52,60 @@
</fieldset>
</form>
+<p style="color:#FE3535; padding-left:20em; font-weight:bolder;">OR</p>
+
+<form id="frm-upload-rqtl2-bundle"
+ action="{{url_for('upload.rqtl2.create_geno_dataset',
+ species_id=species.SpeciesId,
+ population_id=population.InbredSetId)}}"
+ method="POST"
+ enctype="multipart/form-data">
+ <legend class="heading">create a new genotype dataset</legend>
+
+ <input type="hidden" name="species_id" value="{{species.SpeciesId}}" />
+ <input type="hidden" name="population_id"
+ value="{{population.InbredSetId}}" />
+ <input type="hidden" name="rqtl2_bundle_file"
+ value="{{rqtl2_bundle_file}}" />
+
+ {{flash_messages("error-rqtl2")}}
+
+ <fieldset>
+ <label for="txt:dataset-name">Name</label>
+ <input type="text"
+ id="txt:dataset-name"
+ name="dataset-name"
+ required="required" />
+ </fieldset>
+
+ <fieldset>
+ <label for="txt:dataset-fullname">Full Name</label>
+ <input type="text"
+ id="txt:dataset-fullname"
+ name="dataset-fullname"
+ required="required" />
+ </fieldset>
+
+ <fieldset>
+ <label for="txt:dataset-shortname">Short Name</label>
+ <input type="text"
+ id="txt:dataset-shortname"
+ name="dataset-shortname"
+ required="required" />
+ </fieldset>
+
+ <fieldset>
+ <input type="checkbox"
+ id="chk:dataset-public"
+ name="dataset-public" />
+ <label for="chk:dataset-public">Public?</label>
+ </fieldset>
+
+ <fieldset>
+ <input type="submit"
+ value="create new dataset"
+ class="btn btn-main form-col-2" />
+ </fieldset>
+</form>
+
{%endblock%}
diff --git a/qc_app/upload/rqtl2.py b/qc_app/upload/rqtl2.py
index e020d5a..f9185b1 100644
--- a/qc_app/upload/rqtl2.py
+++ b/qc_app/upload/rqtl2.py
@@ -227,3 +227,10 @@ def select_dataset_info(species_id: int, population_id: int):
def select_geno_dataset(species_id: int, population_id: int) -> Response:
"""Select from existing geno datasets."""
return "IMPLEMENT THIS!!!"
+
+@rqtl2.route(("/upload/species/<int:species_id>/population/<int:population_id>"
+ "/rqtl2-bundle/create-geno-dataset"),
+ methods=["POST"])
+def create_geno_dataset(species_id: int, population_id: int) -> Response:
+ """Create a new geno dataset."""
+ return "IMPLEMENT THIS!!!"