aboutsummaryrefslogtreecommitdiff
path: root/uploader/population/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/population/views.py')
-rw-r--r--uploader/population/views.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/uploader/population/views.py b/uploader/population/views.py
index 84dffdb..5be19ae 100644
--- a/uploader/population/views.py
+++ b/uploader/population/views.py
@@ -18,7 +18,9 @@ from uploader.species.models import (all_species,
order_species_by_family)
from .models import (save_population,
+ population_families,
populations_by_species,
+ population_genetic_types,
population_by_species_and_id)
__active_link__ = "populations"
@@ -100,6 +102,14 @@ def create_population(species_id: int):
return render_template(
"populations/create-population.html",
species=species,
+ families = population_families(conn),
+ genetic_types = population_genetic_types(conn),
+ mapping_methods=(
+ {"id": "0", "value": "No mapping support"},
+ {"id": "1", "value": "GEMMA, QTLReaper, R/qtl"},
+ {"id": "2", "value": "GEMMA"},
+ {"id": "3", "value": "R/qtl"},
+ {"id": "4", "value": "GEMMA, PLINK"}),
activelink="create-population",
**error_values)
@@ -142,8 +152,11 @@ def create_population(species_id: int):
"Name": population_name,
"InbredSetName": population_fullname,
"FullName": population_fullname,
- "Family": request.form.get("inbredset_family") or None,
- "Description": request.form.get("population_description") or None
+ "InbredSetCode": request.form.get("population_code") or None,
+ "Description": request.form.get("population_description") or None,
+ "Family": request.form.get("population_family") or None,
+ "MappingMethodId": request.form.get("population_mapping_method_id"),
+ "GeneticType": request.form.get("population_genetic_type") or None
})
return redirect(url_for("species.populations.view_population",