From 319d4bf99a67aa7183c5cf5ee4f60e56a558d624 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 13 Sep 2024 11:49:51 -0500 Subject: Leave notes on things that need to be handled in code and UI --- uploader/population/views.py | 3 ++ uploader/samples/views.py | 5 ++++ .../templates/populations/create-population.html | 32 ++++++++++++++++++++-- 3 files changed, 38 insertions(+), 2 deletions(-) (limited to 'uploader') 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" /> - … document what this field is for … +

+ + What is this field is for? Confirm with Arthur and the rest. +

@@ -159,7 +162,10 @@ {%endfor%} -

… provide some documentation on what this field does …

+

+ This is a rough grouping of the populations in GeneNetwork into lists + of common types of populations. +

@@ -207,6 +213,28 @@ {%endif%}>{{gtype}} {%endfor%} + +

+ + This might be a poorly named field. +

+

+ 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. +

+

+ I still don't know what riset is.
+ … probably something to do with Recombinant Inbred Strains +

+

+ Possible resources for this: +

+

+
-- cgit v1.2.3