aboutsummaryrefslogtreecommitdiff
path: root/qc_app/samples.py
diff options
context:
space:
mode:
Diffstat (limited to 'qc_app/samples.py')
-rw-r--r--qc_app/samples.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/qc_app/samples.py b/qc_app/samples.py
index d27164e..107e889 100644
--- a/qc_app/samples.py
+++ b/qc_app/samples.py
@@ -48,35 +48,6 @@ def select_species():
flash("You need to select a species", "alert-error")
return index_page
-def save_population(conn: mdb.Connection, population_details: dict) -> int:
- """Save the population details to the db."""
- with conn.cursor(cursorclass=DictCursor) as cursor:
- cursor.execute("SELECT MAX(Id) AS last_id FROM InbredSet")
- new_id = cursor.fetchone()["last_id"] + 1
- cursor.execute(
- "INSERT INTO InbredSet("
- "Id, InbredSetId, InbredSetName, Name, SpeciesId, FullName, "
- "MenuOrderId, Description"
- ") "
- "VALUES ("
- "%(Id)s, %(InbredSetId)s, %(InbredSetName)s, %(Name)s, "
- "%(SpeciesId)s, %(FullName)s, %(MenuOrderId)s, %(Description)s"
- ")",
- {
- "Id": new_id,
- "InbredSetId": new_id,
- "MenuOrderId": 0,
- **population_details
- })
- return new_id
-
-def population_by_id(conn: mdb.Connection, population_id: int) -> dict:
- """Get the grouping/population by id."""
- with conn.cursor(cursorclass=DictCursor) as cursor:
- cursor.execute("SELECT * FROM InbredSet WHERE InbredSetId=%s",
- (population_id,))
- return cursor.fetchone()
-
@samples.route("/upload/create-population", methods=["POST"])
def create_population():
"""Create new grouping/population."""