aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uploader/population/views.py3
-rw-r--r--uploader/samples/views.py5
-rw-r--r--uploader/templates/populations/create-population.html32
3 files changed, 38 insertions, 2 deletions
diff --git a/uploader/population/views.py b/uploader/population/views.py
index e870c85..f9041be 100644
--- a/uploader/population/views.py
+++ b/uploader/population/views.py
@@ -151,6 +151,9 @@ def create_population(species_id: int):
species_id=species["SpeciesId"],
error_values=values))
+ # TODO: Setup auth
+ # 1. Create new resource in gn-auth and add this population to it
+ # 2. Assign active user the "resource-creator" rights to the new resource
new_population = save_population(conn, {
"SpeciesId": species["SpeciesId"],
"Name": population_name,
diff --git a/uploader/samples/views.py b/uploader/samples/views.py
index f444497..4332c21 100644
--- a/uploader/samples/views.py
+++ b/uploader/samples/views.py
@@ -200,6 +200,11 @@ def upload_samples(species_id: int, population_id: int):#pylint: disable=[too-ma
redisuri = app.config["REDIS_URL"]
with Redis.from_url(redisuri, decode_responses=True) as rconn:
+ #TODO: Add a QC step here — what do we check?
+ # 1. Does any sample in the uploaded file exist within the database?
+ # If yes, what is/are its/their species and population?
+ # 2. If yes 1. above, provide error with notes on which species and
+ # populations already own the samples.
the_job = jobs.launch_job(
jobs.initialise_job(
rconn,
diff --git a/uploader/templates/populations/create-population.html b/uploader/templates/populations/create-population.html
index b57afba..b05ce37 100644
--- a/uploader/templates/populations/create-population.html
+++ b/uploader/templates/populations/create-population.html
@@ -107,7 +107,10 @@
value="{{error_values.population_code or ''}}"
class="form-control" />
<small class="form-text text-muted">
- … document what this field is for …
+ <p class="text-danger">
+ <span class="glyphicon glyphicon-exclamation-sign"></span>
+ What is this field is for? Confirm with Arthur and the rest.
+ </p>
</small>
</div>
@@ -159,7 +162,10 @@
{%endfor%}
</select>
<small class="form-text text-muted">
- <p>… provide some documentation on what this field does …</p>
+ <p>
+ This is a rough grouping of the populations in GeneNetwork into lists
+ of common types of populations.
+ </p>
</small>
</div>
@@ -207,6 +213,28 @@
{%endif%}>{{gtype}}</option>
{%endfor%}
</select>
+ <small class="form-text text-muted text-danger">
+ <p>
+ <span class="glyphicon glyphicon-exclamation-sign"></span>
+ This might be a poorly named field.
+ </p>
+ <p>
+ It probably has more to do with the mating crosses/crossings used to
+ produce the individuals in the population. I am no biologist, however,
+ and I'm leaving this here to remind myself to confirm this.
+ </p>
+ <p>
+ I still don't know what riset is.<br />
+ … probably something to do with Recombinant Inbred Strains
+ </p>
+ <p>
+ Possible resources for this:
+ <ul>
+ <li>https://www.informatics.jax.org/silver/chapters/3-2.shtml</li>
+ <li>https://www.informatics.jax.org/silver/chapters/9-2.shtml</li>
+ </ul>
+ </p>
+ </small>
</div>
<div class="form-group">