From 4285cc10e24d6410206329ba079406e9aa21cc30 Mon Sep 17 00:00:00 2001
From: Frederick Muriuki Muriithi
Date: Mon, 23 Sep 2024 14:30:15 -0500
Subject: Move R/qtl2 upload code under the populations package.
---
.../populations/rqtl2/create-tissue-success.html | 106 ++++++++
uploader/templates/populations/rqtl2/index.html | 54 ++++
.../templates/populations/rqtl2/no-such-job.html | 13 +
.../populations/rqtl2/rqtl2-job-error.html | 39 +++
.../populations/rqtl2/rqtl2-job-results.html | 24 ++
.../populations/rqtl2/rqtl2-job-status.html | 20 ++
.../populations/rqtl2/rqtl2-qc-job-error.html | 120 +++++++++
.../populations/rqtl2/rqtl2-qc-job-results.html | 66 +++++
.../populations/rqtl2/rqtl2-qc-job-status.html | 41 +++
.../populations/rqtl2/rqtl2-qc-job-success.html | 37 +++
.../populations/rqtl2/select-geno-dataset.html | 69 ++++++
.../populations/rqtl2/select-population.html | 57 +++++
.../populations/rqtl2/select-probeset-dataset.html | 191 ++++++++++++++
.../rqtl2/select-probeset-study-id.html | 143 +++++++++++
.../templates/populations/rqtl2/select-tissue.html | 115 +++++++++
.../templates/populations/rqtl2/summary-info.html | 65 +++++
.../rqtl2/upload-rqtl2-bundle-step-01.html | 276 +++++++++++++++++++++
.../rqtl2/upload-rqtl2-bundle-step-02.html | 33 +++
18 files changed, 1469 insertions(+)
create mode 100644 uploader/templates/populations/rqtl2/create-tissue-success.html
create mode 100644 uploader/templates/populations/rqtl2/index.html
create mode 100644 uploader/templates/populations/rqtl2/no-such-job.html
create mode 100644 uploader/templates/populations/rqtl2/rqtl2-job-error.html
create mode 100644 uploader/templates/populations/rqtl2/rqtl2-job-results.html
create mode 100644 uploader/templates/populations/rqtl2/rqtl2-job-status.html
create mode 100644 uploader/templates/populations/rqtl2/rqtl2-qc-job-error.html
create mode 100644 uploader/templates/populations/rqtl2/rqtl2-qc-job-results.html
create mode 100644 uploader/templates/populations/rqtl2/rqtl2-qc-job-status.html
create mode 100644 uploader/templates/populations/rqtl2/rqtl2-qc-job-success.html
create mode 100644 uploader/templates/populations/rqtl2/select-geno-dataset.html
create mode 100644 uploader/templates/populations/rqtl2/select-population.html
create mode 100644 uploader/templates/populations/rqtl2/select-probeset-dataset.html
create mode 100644 uploader/templates/populations/rqtl2/select-probeset-study-id.html
create mode 100644 uploader/templates/populations/rqtl2/select-tissue.html
create mode 100644 uploader/templates/populations/rqtl2/summary-info.html
create mode 100644 uploader/templates/populations/rqtl2/upload-rqtl2-bundle-step-01.html
create mode 100644 uploader/templates/populations/rqtl2/upload-rqtl2-bundle-step-02.html
(limited to 'uploader/templates/populations')
diff --git a/uploader/templates/populations/rqtl2/create-tissue-success.html b/uploader/templates/populations/rqtl2/create-tissue-success.html
new file mode 100644
index 0000000..d6fe154
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/create-tissue-success.html
@@ -0,0 +1,106 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_all_messages%}
+
+{%block title%}Upload R/qtl2 Bundle{%endblock%}
+
+{%block contents%}
+
Select Tissue
+
+
+
You have successfully added a new tissue, organ or biological material with
+ the following details:
+
+
+
+ {{flash_all_messages()}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/index.html b/uploader/templates/populations/rqtl2/index.html
new file mode 100644
index 0000000..ec6ffb8
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/index.html
@@ -0,0 +1,54 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_messages%}
+
+{%block title%}Data Upload{%endblock%}
+
+{%block contents%}
+R/qtl2 data upload
+
+R/qtl2 Upload
+
+
+
+
+
R/qtl2 Bundles
+
+
+
This feature combines and extends the two upload methods below. Instead of
+ uploading one item at a time, the R/qtl2 bundle you upload can contain both
+ the genotypes data (samples/individuals/cases and their data) and the
+ expression data.
+
The R/qtl2 bundle, additionally, can contain extra metadata, that neither
+ of the methods below can handle.
+
+
+ upload R/qtl2 bundle
+
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/no-such-job.html b/uploader/templates/populations/rqtl2/no-such-job.html
new file mode 100644
index 0000000..b17004f
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/no-such-job.html
@@ -0,0 +1,13 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_messages%}
+
+{%block title%}Job Status{%endblock%}
+
+{%block contents%}
+R/qtl2 job status
+
+R/qtl2 Upload: No Such Job
+
+No job with ID {{jobid}} was found.
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/rqtl2-job-error.html b/uploader/templates/populations/rqtl2/rqtl2-job-error.html
new file mode 100644
index 0000000..9817518
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/rqtl2-job-error.html
@@ -0,0 +1,39 @@
+{%extends "base.html"%}
+{%from "cli-output.html" import cli_output%}
+
+{%block title%}Job Status{%endblock%}
+
+{%block contents%}
+R/qtl2 job status
+
+R/qtl2 Upload: Job Status
+
+
+
The processing of the R/qtl2 bundle you uploaded has failed. We have
+ provided some information below to help you figure out what the problem
+ could be.
+
If you find that you cannot figure out what the problem is on your own,
+ please contact the team running the system for assistance, providing the
+ following details:
+
+ R/qtl2 bundle you uploaded
+ This URL: {{request_url()}}
+ (maybe) a screenshot of this page
+
+
+
+
+stdout
+{{cli_output(job, "stdout")}}
+
+stderr
+{{cli_output(job, "stderr")}}
+
+Log
+
+ {%for msg in messages%}
+ {{msg}}
+ {%endfor%}
+
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/rqtl2-job-results.html b/uploader/templates/populations/rqtl2/rqtl2-job-results.html
new file mode 100644
index 0000000..4ecd415
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/rqtl2-job-results.html
@@ -0,0 +1,24 @@
+{%extends "base.html"%}
+{%from "cli-output.html" import cli_output%}
+
+{%block title%}Job Status{%endblock%}
+
+{%block contents%}
+R/qtl2 job status
+
+R/qtl2 Upload: Job Status
+
+
+
The processing of the R/qtl2 bundle you uploaded has completed
+ successfully.
+
You should now be able to use GeneNetwork to run analyses on your data.
+
+
+Log
+
+ {%for msg in messages%}
+ {{msg}}
+ {%endfor%}
+
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/rqtl2-job-status.html b/uploader/templates/populations/rqtl2/rqtl2-job-status.html
new file mode 100644
index 0000000..e896f88
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/rqtl2-job-status.html
@@ -0,0 +1,20 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_messages%}
+
+{%block title%}Job Status{%endblock%}
+
+{%block extrameta%}
+
+{%endblock%}
+
+{%block contents%}
+R/qtl2 job status
+
+R/qtl2 Upload: Job Status
+
+Log
+
+
{{"\n".join(messages)}}
+
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/rqtl2-qc-job-error.html b/uploader/templates/populations/rqtl2/rqtl2-qc-job-error.html
new file mode 100644
index 0000000..90e8887
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/rqtl2-qc-job-error.html
@@ -0,0 +1,120 @@
+{%extends "base.html"%}
+{%from "cli-output.html" import cli_output%}
+
+{%block title%}R/qtl2 bundle: QC Job Error{%endblock%}
+
+{%macro errors_table(tableid, errors)%}
+
+ {{caption}}
+
+
+ Line
+ Column
+ Value
+ Message
+
+
+
+ {%for error in errors%}
+
+ {{error.line}}
+ {{error.column}}
+ {{error.value}}
+ {{error.message}}
+
+ {%else%}
+
+ No errors to display here.
+
+ {%endfor%}
+
+
+{%endmacro%}
+
+{%block contents%}
+R/qtl2 bundle: QC job Error
+
+
+
The R/qtl2 bundle has failed some Quality Control checks.
+
We list below some of the errors that need to be fixed before the data can
+ be uploaded onto GeneNetwork.
+
+
+{%if errorsgeneric | length > 0%}
+Generic Errors ({{errorsgeneric | length}})
+
+ We found the following generic errors in your R/qtl2 bundle:
+
+
+Missing Files
+
+
These files are listed in the bundle's control file, but do not actually
+ exist in the bundle
+
+
+
+
+ Control File Key
+ Bundle File Name
+ Message
+
+
+
+ {%for error in (errorsgeneric | selectattr("type", "equalto", "MissingFile"))%}
+
+ {{error.controlfilekey}}
+ {{error.filename}}
+ {{error.message}}
+
+ {%endfor%}
+
+
+
+Other Generic Errors
+{{errors_table("tbl-errors-generic", errorsgeneric| selectattr("type", "ne", "MissingFile"))}}
+{%endif%}
+
+{%if errorsgeno | length > 0%}
+Geno Errors ({{errorsgeno | length}})
+
+ We found the following errors in the 'geno' file in your R/qtl2 bundle:
+
+{{errors_table("tbl-errors-geno", errorsgeno[0:50])}}
+{%endif%}
+
+{%if errorspheno | length > 0%}
+Pheno Errors ({{errorspheno | length}})
+
+ We found the following errors in the 'pheno' file in your R/qtl2 bundle:
+
+{{errors_table("tbl-errors-pheno", errorspheno[0:50])}}
+{%endif%}
+
+{%if errorsphenose | length > 0%}
+Phenose Errors ({{errorsphenose | length}})
+
+ We found the following errors in the 'phenose' file in your R/qtl2 bundle:
+
+{{errors_table("tbl-errors-phenose", errorsphenose[0:50])}}
+{%endif%}
+
+{%if errorsphenocovar | length > 0%}
+Phenocovar Errors ({{errorsphenocovar | length}})
+
+ We found the following errors in the 'phenocovar' file in your R/qtl2 bundle:
+
+{{errorsphenocovar}}
+{%endif%}
+
+stdout
+{{cli_output(job, "stdout")}}
+
+stderr
+{{cli_output(job, "stderr")}}
+
+Log
+
+
{{"\n".join(messages)}}
+
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/rqtl2-qc-job-results.html b/uploader/templates/populations/rqtl2/rqtl2-qc-job-results.html
new file mode 100644
index 0000000..b3c3a8f
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/rqtl2-qc-job-results.html
@@ -0,0 +1,66 @@
+{%extends "base.html"%}
+{%from "cli-output.html" import cli_output%}
+
+{%block title%}R/qtl2 bundle: QC job results{%endblock%}
+
+{%block contents%}
+R/qtl2 bundle: QC job results
+
+
+
The R/qtl2 bundle you uploaded has passed all automated quality-control
+ checks successfully.
+
You may now continue to load the data into GeneNetwork for the bundle, with
+ the following details:
+
+
+
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/rqtl2-qc-job-status.html b/uploader/templates/populations/rqtl2/rqtl2-qc-job-status.html
new file mode 100644
index 0000000..f4a6266
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/rqtl2-qc-job-status.html
@@ -0,0 +1,41 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_messages%}
+
+{%block title%}Job Status{%endblock%}
+
+{%block extrameta%}
+
+{%endblock%}
+
+{%block contents%}
+R/qtl2 bundle: QC job status
+
+{%if geno_percent%}
+
+
Checking 'geno' file:
+
+ {{geno_percent}}%
+ {{geno_percent}}%
+{%endif%}
+
+{%if pheno_percent%}
+
+
Checking 'pheno' file:
+
+ {{pheno_percent}}%
+ {{pheno_percent}}%
+{%endif%}
+
+{%if phenose_percent%}
+
+
Checking 'phenose' file:
+
+ {{phenose_percent}}%
+ {{phenose_percent}}%
+{%endif%}
+
+Log
+
+
{{"\n".join(messages)}}
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/rqtl2-qc-job-success.html b/uploader/templates/populations/rqtl2/rqtl2-qc-job-success.html
new file mode 100644
index 0000000..f126835
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/rqtl2-qc-job-success.html
@@ -0,0 +1,37 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_all_messages%}
+
+{%block title%}R/qtl2 Bundle: Quality Control Successful{%endblock%}
+
+{%block contents%}
+R/qtl2 Bundle: Quality Control Successful
+
+
+
The R/qtl2 bundle you uploaded has passed all quality control
+ checks successfully, and is now ready for uploading into the database.
+
Click "Continue" below to proceed.
+
+
+
+
+
+
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/select-geno-dataset.html b/uploader/templates/populations/rqtl2/select-geno-dataset.html
new file mode 100644
index 0000000..3233abc
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/select-geno-dataset.html
@@ -0,0 +1,69 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_messages%}
+
+{%block title%}Upload R/qtl2 Bundle{%endblock%}
+
+{%block contents%}
+Select Genotypes Dataset
+
+
+
Your R/qtl2 files bundle could contain a "geno" specification. You will
+ therefore need to select from one of the existing Genotype datasets or
+ create a new one.
+
This is the dataset where your data will be organised under.
+
+
+
+
+
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/select-population.html b/uploader/templates/populations/rqtl2/select-population.html
new file mode 100644
index 0000000..ded425f
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/select-population.html
@@ -0,0 +1,57 @@
+{%extends "expression-data/index.html"%}
+{%from "flash_messages.html" import flash_messages%}
+{%from "species/macro-display-species-card.html" import display_species_card%}
+
+{%block title%}Select Grouping/Population{%endblock%}
+
+{%block contents%}
+Select grouping/population
+
+
+
The data is organised in a hierarchical form, beginning with
+ species at the very top. Under species the data is
+ organised by population , sometimes referred to as grouping .
+ (In some really old documents/systems, you might see this referred to as
+ InbredSet .)
+
In this section, you get to define what population your data is to be
+ organised by.
+
+
+
+
+{%endblock%}
+
+{%block sidebarcontents%}
+{{display_species_card(species)}}
+{%endblock%}
+
+
+{%block javascript%}
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/select-probeset-dataset.html b/uploader/templates/populations/rqtl2/select-probeset-dataset.html
new file mode 100644
index 0000000..74f8f69
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/select-probeset-dataset.html
@@ -0,0 +1,191 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_messages%}
+
+{%block title%}Upload R/qtl2 Bundle{%endblock%}
+
+{%block contents%}
+Phenotype(ProbeSet) Dataset
+
+
+
The R/qtl2 bundle you uploaded contains (a) "pheno "
+ file(s). This data needs to be organised under a dataset.
+
This page gives you the ability to do that.
+
+
+{%if datasets | length > 0%}
+
+
+
+{%endif%}
+
+
+
Create an entirely new ProbeSet dataset for your data.
+
+
+
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/select-probeset-study-id.html b/uploader/templates/populations/rqtl2/select-probeset-study-id.html
new file mode 100644
index 0000000..e3fd9cc
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/select-probeset-study-id.html
@@ -0,0 +1,143 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_messages %}
+
+{%block title%}Upload R/qtl2 Bundle{%endblock%}
+
+{%block contents%}
+Phenotype(ProbeSet) Study
+
+
+
The R/qtl2 bundle you uploaded contains (a) "pheno "
+ file(s). This data needs to be organised under a study.
+
In this page, you can either select from a existing dataset:
+
+
+
+
+
+
+
+
+
Create a new ProbeSet dataset below:
+
+
+
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/select-tissue.html b/uploader/templates/populations/rqtl2/select-tissue.html
new file mode 100644
index 0000000..fe3080a
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/select-tissue.html
@@ -0,0 +1,115 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_messages%}
+
+{%block title%}Upload R/qtl2 Bundle{%endblock%}
+
+{%block contents%}
+Tissue
+
+
+
The data you are uploading concerns a tissue, cell, organ, or other
+ biological material used in an experiment.
+
Select the appropriate biological material below
+
+
+{%if tissues | length > 0%}
+
+
+
+{%endif%}
+
+
+
If you cannot find the biological material in the drop-down above, add it
+ to the system below.
+
+
+
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/summary-info.html b/uploader/templates/populations/rqtl2/summary-info.html
new file mode 100644
index 0000000..0adba2e
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/summary-info.html
@@ -0,0 +1,65 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_messages%}
+
+{%block title%}Upload R/qtl2 Bundle{%endblock%}
+
+{%block contents%}
+Summary
+
+
+
This is the information you have provided to accompany the R/qtl2 bundle
+ you have uploaded. Please verify the information is correct before
+ proceeding.
+
+
+
+
+ Species
+ {{species.SpeciesName}} ({{species.FullName}})
+
+ Population
+ {{population.InbredSetName}}
+
+ {%if geno_dataset%}
+ Genotype Dataset
+ {{geno_dataset.Name}} ({{geno_dataset.FullName}})
+ {%endif%}
+
+ {%if tissue%}
+ Tissue
+ {{tissue.TissueName}} ({{tissue.Name}}, {{tissue.Short_Name}})
+ {%endif%}
+
+ {%if probe_study%}
+ ProbeSet Study
+ {{probe_study.Name}} ({{probe_study.FullName}})
+ {%endif%}
+
+ {%if probe_dataset%}
+ ProbeSet Dataset
+ {{probe_dataset.Name2}} ({{probe_dataset.FullName}})
+ {%endif%}
+
+
+
+
+
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/upload-rqtl2-bundle-step-01.html b/uploader/templates/populations/rqtl2/upload-rqtl2-bundle-step-01.html
new file mode 100644
index 0000000..9d45c5f
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/upload-rqtl2-bundle-step-01.html
@@ -0,0 +1,276 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_all_messages%}
+{%from "upload_progress_indicator.html" import upload_progress_indicator%}
+
+{%block title%}Upload R/qtl2 Bundle{%endblock%}
+
+{%block contents%}
+{%macro rqtl2_file_help()%}
+
+
+ Provide a valid R/qtl2 zip file here. In particular, ensure your zip bundle
+ contains exactly one control file and the corresponding files mentioned in
+ the control file.
+
+
+ The control file can be either a YAML or JSON file. ALL other data
+ files in the zip bundle should be CSV files.
+
+ See the
+
+ R/qtl2 file format specifications
+
+ for more details.
+
+
+{%endmacro%}
+{{upload_progress_indicator()}}
+
+
+
+
+Upload R/qtl2 Bundle
+
+
+
+ Browse
+
+
+ You can drag and drop your file here, or click the browse button.
+ Click on the file to remove it.
+
+ {{rqtl2_file_help()}}
+
+
+ start upload
+ cancel upload
+
+
+
+
+
+
+{%endblock%}
+
+{%block javascript%}
+
+
+
+{%endblock%}
diff --git a/uploader/templates/populations/rqtl2/upload-rqtl2-bundle-step-02.html b/uploader/templates/populations/rqtl2/upload-rqtl2-bundle-step-02.html
new file mode 100644
index 0000000..8210ed0
--- /dev/null
+++ b/uploader/templates/populations/rqtl2/upload-rqtl2-bundle-step-02.html
@@ -0,0 +1,33 @@
+{%extends "base.html"%}
+{%from "flash_messages.html" import flash_all_messages%}
+
+{%block title%}Upload R/qtl2 Bundle{%endblock%}
+
+{%block contents%}
+Upload R/qtl2 Bundle
+
+
+
You have successfully uploaded the zipped bundle of R/qtl2 files.
+
The next step is to select the various extra information we need to figure
+ out what to do with the data. You will select/create the relevant studies
+ and/or datasets to organise the data in the steps that follow.
+
Click "Continue" below to proceed.
+
+
+
+
+{%endblock%}
--
cgit v1.2.3