aboutsummaryrefslogtreecommitdiff
path: root/qc_app/templates
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-03-29 13:14:14 +0300
committerFrederick Muriuki Muriithi2024-03-29 13:14:14 +0300
commit6326357250711650bc8b4c0b90f8c0b94d72c39e (patch)
tree26bfb9f169f45176dbc439839b7d96d07de52627 /qc_app/templates
parent62e54fd5b457d67f3f01a35e28eae94d653d9908 (diff)
downloadgn-uploader-6326357250711650bc8b4c0b90f8c0b94d72c39e.tar.gz
Add UI to select/create tissue.
Diffstat (limited to 'qc_app/templates')
-rw-r--r--qc_app/templates/rqtl2/create-tissue-success.html104
-rw-r--r--qc_app/templates/rqtl2/select-probeset-study-id.html20
-rw-r--r--qc_app/templates/rqtl2/select-tissue.html112
3 files changed, 218 insertions, 18 deletions
diff --git a/qc_app/templates/rqtl2/create-tissue-success.html b/qc_app/templates/rqtl2/create-tissue-success.html
new file mode 100644
index 0000000..ea05624
--- /dev/null
+++ b/qc_app/templates/rqtl2/create-tissue-success.html
@@ -0,0 +1,104 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_all_messages%}
+
+{%block title%}Upload R/qtl2 Bundle{%endblock%}
+
+{%block contents%}
+<h2 class="heading">Select Tissue</h2>
+
+<div class="explainer">
+ <p>You have successfully added a new tissue, organ or biological material with
+ the following details:</p>
+</div>
+
+{{flash_all_messages()}}
+
+<form id="frm-create-tissue-display"
+ method="POST"
+ action="#">
+ <legend class="heading">Create Tissue</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}}" />
+ <input type="hidden" name="geno-dataset-id" value="{{geno_dataset.Id}}" />
+ <input type="hidden" name="tissueid" value="{{tissue.Id}}" />
+
+ <fieldset>
+ <label>Name</label>
+ <label>{{tissue.TissueName}}</label>
+ </fieldset>
+
+ <fieldset>
+ <label>Short Name</label>
+ <label>{{tissue.Short_Name}}</label>
+ </fieldset>
+
+ {%if tissue.BIRN_lex_ID%}
+ <fieldset>
+ <label>BIRN Lex ID</label>
+ <label>{{tissue.BIRN_lex_ID}}</label>
+ </fieldset>
+ {%endif%}
+
+ {%if tissue.BIRN_lex_Name%}
+ <fieldset>
+ <label>BIRN Lex Name</label>
+ <label>{{tissue.BIRN_lex_Name}}</label>
+ </fieldset>
+ {%endif%}
+</form>
+
+<div id="action-buttons"
+ style="width:65ch;display:inline-grid;column-gap:5px;">
+
+ <form id="frm-create-tissue-success-continue"
+ method="POST"
+ action="{{url_for('upload.rqtl2.select_dataset_info',
+ species_id=species.SpeciesId,
+ population_id=population.InbredSetId)}}"
+ style="display: inline; width: 100%; grid-column: 1 / 2;
+ padding-top: 0.5em; text-align: center; border: none;
+ background-color: inherit;">
+
+ <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}}" />
+ <input type="hidden" name="geno-dataset-id" value="{{geno_dataset.Id}}" />
+ <input type="hidden" name="tissueid" value="{{tissue.Id}}" />
+
+ <input type="submit"
+ value="continue"
+ class="btn btn-main form-col-2" />
+ </form>
+
+ <p style="display:inline;width:100%;grid-column:2/3;text-align:center;
+ color:#336699;font-weight:bold;">
+ OR
+ </p>
+
+ <form id="frm-create-tissue-success-select-existing"
+ method="POST"
+ action="{{url_for('upload.rqtl2.select_tissue',
+ species_id=species.SpeciesId,
+ population_id=population.InbredSetId)}}"
+ style="display: inline; width: 100%; grid-column: 3 / 4;
+ padding-top: 0.5em; text-align: center; border: none;
+ background-color: inherit;">
+
+ <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}}" />
+ <input type="hidden" name="geno-dataset-id" value="{{geno_dataset.Id}}" />
+
+ <input type="submit"
+ value="select from existing tissues"
+ class="btn btn-main form-col-2" />
+ </form>
+
+</div>
+
+{%endblock%}
diff --git a/qc_app/templates/rqtl2/select-probeset-study-id.html b/qc_app/templates/rqtl2/select-probeset-study-id.html
index 3bbb94a..23bbbf0 100644
--- a/qc_app/templates/rqtl2/select-probeset-study-id.html
+++ b/qc_app/templates/rqtl2/select-probeset-study-id.html
@@ -26,6 +26,7 @@
<input type="hidden" name="rqtl2_bundle_file"
value="{{rqtl2_bundle_file}}" />
<input type="hidden" name="geno-dataset-id" value="{{geno_dataset.Id}}" />
+ <input type="hidden" name="tissueid" value="{{tissue.Id}}" />
<fieldset>
<label for="select:probe-study">Study</label>
@@ -71,6 +72,7 @@
<input type="hidden" name="rqtl2_bundle_file"
value="{{rqtl2_bundle_file}}" />
<input type="hidden" name="geno-dataset-id" value="{{geno_dataset.Id}}" />
+ <input type="hidden" name="tissueid" value="{{tissue.Id}}" />
<fieldset>
<label for="select:platform">Platform</label>
@@ -90,24 +92,6 @@
</fieldset>
<fieldset>
- <label for="select:tissue">Tissue</label>
- <select id="select:tissue"
- name="tissueid"
- required="required"
- {%if tissues | length == 0%}disabled="disabled"{%endif%}>
- <option value="">Select tissue</option>
- {%for tissue in tissues%}
- <option value="{{tissue.Id}}">
- {{tissue.TissueName}} ({{tissue.Short_Name}})
- </option>
- {%endfor%}
- </select>
- <span class="form-col-2">
- Select the Tissue to which the data is concerned.
- </span>
- </fieldset>
-
- <fieldset>
<label for="txt:studyname">Study name</label>
<input type="text" id="txt:studyname" name="studyname"
placeholder="Name of the study. (Required)"
diff --git a/qc_app/templates/rqtl2/select-tissue.html b/qc_app/templates/rqtl2/select-tissue.html
new file mode 100644
index 0000000..6f7d134
--- /dev/null
+++ b/qc_app/templates/rqtl2/select-tissue.html
@@ -0,0 +1,112 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_messages%}
+
+{%block title%}Upload R/qtl2 Bundle{%endblock%}
+
+{%block contents%}
+<h2 class="heading">Tissue</h2>
+
+<div class="explainer">
+ <p>The data you are uploading concerns a tissue, cell, organ, or other
+ biological material used in an experiment.</p>
+ <p>Select the appropriate biological material below</p>
+</div>
+
+{%if tissues | length > 0%}
+<form method="POST"
+ action="{{url_for('upload.rqtl2.select_tissue',
+ species_id=species.SpeciesId, population_id=population.Id)}}"
+ id="frm:select-probeset-dataset">
+ <legend class="heading">Select from existing ProbeSet datasets</legend>
+ {{flash_messages("error-select-tissue")}}
+
+ <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}}" />
+ <input type="hidden" name="geno-dataset-id" value="{{geno_dataset.Id}}" />
+
+ <fieldset>
+ <label for="select-tissue">Tissue</label>
+ <select id="select-tissue"
+ name="tissueid"
+ required="required"
+ {%if tissues | length == 0%}disabled="disabled"{%endif%}>
+ <option value="">Select a tissue</option>
+ {%for tissue in tissues%}
+ <option value={{tissue.Id}}>
+ {{tissue.Name}}
+ {%if tissue.Short_Name%}
+ -- ({{tissue.Short_Name}})
+ {%endif%}
+ </option>
+ {%endfor%}
+ </select>
+
+ <span class="form-col-2">Select from existing biological material.</span>
+ </fieldset>
+
+ <fieldset>
+ <input type="submit"
+ value="use selected"
+ class="btn btn-main form-col-2" />
+ </fieldset>
+</form>
+
+<p style="color:#FE3535; padding-left:20em; font-weight:bolder;">OR</p>
+{%endif%}
+
+<div class="explainer">
+ <p>If you cannot find the biological material in the drop-down above, add it
+ to the system below.</p>
+</div>
+
+<form method="POST"
+ action="{{url_for('upload.rqtl2.create_tissue',
+ species_id=species.SpeciesId, population_id=population.Id)}}"
+ id="frm:create-probeset-dataset">
+ <legend class="heading">Add new tissue, organ or biological material</legend>
+ {{flash_messages("error-create-tissue")}}
+
+ <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}}" />
+ <input type="hidden" name="geno-dataset-id" value="{{geno_dataset.Id}}" />
+
+ <fieldset>
+ <label for="tissue-name">name</label>
+ <input type="text"
+ id="txt-tissuename"
+ name="tissuename"
+ required="required"
+ title = "A name to identify the tissue, organ or biological material." />
+
+ <span class="form-col-2">
+ A name to identify the tissue, organ or biological material.
+ </span>
+ </fieldset>
+
+ <fieldset>
+ <label for="txt-shortname">short name</label>
+ <input type="text" id="txt-tissueshortname" name="tissueshortname"
+ required="required"
+ maxlength="7"
+ title="A short name (e.g. 'Mam') for the biological material." />
+
+ <span class="form-col-2">
+ Provide a short name for the tissue, organ or biological material used in
+ the experiment.
+ </span>
+ </fieldset>
+
+ <fieldset>
+ <input type="submit"
+ value="add new material"
+ class="btn btn-main form-col-2" />
+ </fieldset>
+</form>
+
+{%endblock%}