From 493f8fbe747650a4fbac2e0b153ad0074b4f91e4 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 6 Dec 2023 13:00:53 +0300 Subject: Feature: Upload Samples/Cases Implements the code enabling the upload of the samples/cases to the database. --- qc_app/templates/flash_messages.html | 25 ++++++ qc_app/templates/index.html | 35 +++++++- qc_app/templates/samples/select-population.html | 105 +++++++++++++++++++++++ qc_app/templates/samples/upload-samples.html | 107 ++++++++++++++++++++++++ 4 files changed, 269 insertions(+), 3 deletions(-) create mode 100644 qc_app/templates/flash_messages.html create mode 100644 qc_app/templates/samples/select-population.html create mode 100644 qc_app/templates/samples/upload-samples.html (limited to 'qc_app/templates') diff --git a/qc_app/templates/flash_messages.html b/qc_app/templates/flash_messages.html new file mode 100644 index 0000000..b7af178 --- /dev/null +++ b/qc_app/templates/flash_messages.html @@ -0,0 +1,25 @@ +{%macro flash_all_messages()%} +{%with messages = get_flashed_messages(with_categories=true)%} +{%if messages:%} + +{%endif%} +{%endwith%} +{%endmacro%} + +{%macro flash_messages(filter_class)%} +{%with messages = get_flashed_messages(with_categories=true)%} +{%if messages:%} + +{%endif%} +{%endwith%} +{%endmacro%} diff --git a/qc_app/templates/index.html b/qc_app/templates/index.html index 2db6048..e534bcb 100644 --- a/qc_app/templates/index.html +++ b/qc_app/templates/index.html @@ -1,9 +1,11 @@ {%extends "base.html"%} -{%block title%}Upload File{%endblock%} +{%block title%}Data Upload{%endblock%} {%block contents%} -

upload file

+

data upload

+ +

Expression Data

This application assumes that you are familiar with the basics of data @@ -26,7 +28,7 @@

- upload file + upload expression data {%with messages = get_flashed_messages(with_categories=True) %} {%if messages %}
@@ -81,6 +83,33 @@
+ +

samples/cases

+ +
+

For the expression data above, you need the samples/cases in your file to + already exist in the GeneNetwork database. If there are any samples that do + not already exist the upload of the expression data will fail.

+

This section gives you the opportunity to upload any missing samples

+
+ +
+ upload samples +
+ + +
+ +
+ +
+
+ {%endblock%} diff --git a/qc_app/templates/samples/select-population.html b/qc_app/templates/samples/select-population.html new file mode 100644 index 0000000..24decb4 --- /dev/null +++ b/qc_app/templates/samples/select-population.html @@ -0,0 +1,105 @@ +{%extends "base.html"%} +{%from "flash_messages.html" import flash_messages%} + +{%block title%}Select Grouping/Population{%endblock%} + +{%block contents%} +

Select grouping/population

+ +
+

We organise the samples/cases/strains in a hierarchichal form, starting + with species at the very top. Under species, we have a + grouping in terms of the relevant population + (e.g. Inbred populations, cell tissue, etc.)

+
+ +
+ +
+ select grouping/population + {{flash_messages("error-select-population")}} + + +
+ + +
+ +
+ +
+
+ +

OR

+ +
+ create new grouping/population + {{flash_messages("error-create-population")}} + + +
+ mandatory + + + + + +
+
+ Optional + + + + + + + + + +
+ +
+ +
+
+ +{%endblock%} + + +{%block javascript%} +{%endblock%} diff --git a/qc_app/templates/samples/upload-samples.html b/qc_app/templates/samples/upload-samples.html new file mode 100644 index 0000000..b19e38c --- /dev/null +++ b/qc_app/templates/samples/upload-samples.html @@ -0,0 +1,107 @@ +{%extends "base.html"%} +{%from "flash_messages.html" import flash_messages%} + +{%block title%}Upload Samples{%endblock%} + +{%block css%} + +{%endblock%} + +{%block contents%} +

upload samples

+ +{{flash_messages("alert-success")}} + +

You can now upload a character-separated value (CSV) file that contains + details about your samples. The CSV file should have the following fields: +

+
Name
+
The primary name for the sample
+ +
Name2
+
A secondary name for the sample. This can simply be the same as + Name above. This field MUST contain a + value.
+ +
Symbol
+
A symbol for the sample. Can be an empty field.
+ +
Alias
+
An alias for the sample. Can be an empty field.
+
+

+ +
+ upload samples +
+ + + +
+ +
+ + + +
+ +
+ + + + +
+ +
+ + + +
+ +
+ + +
+ +
+ +
+
+ +{%endblock%} + + +{%block javascript%} +{%endblock%} -- cgit v1.2.3