aboutsummaryrefslogtreecommitdiff
path: root/qc_app/dbinsert.py
diff options
context:
space:
mode:
Diffstat (limited to 'qc_app/dbinsert.py')
-rw-r--r--qc_app/dbinsert.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/qc_app/dbinsert.py b/qc_app/dbinsert.py
index 2282c8d..881c913 100644
--- a/qc_app/dbinsert.py
+++ b/qc_app/dbinsert.py
@@ -5,7 +5,6 @@ from typing import Union
from functools import reduce
from datetime import datetime
-import MySQLdb as mdb
from redis import Redis
from MySQLdb.cursors import DictCursor
from flask import (
@@ -31,28 +30,6 @@ def make_menu_items_grouper(grouping_fn=lambda item: item):
return {**acc, grouping: (acc[grouping] + (row_values,))}
return __grouper__
-def species() -> tuple:
- "Retrieve the species from the database."
- with database_connection() as conn:
- with conn.cursor(cursorclass=DictCursor) as cursor:
- cursor.execute(
- "SELECT SpeciesId, SpeciesName, LOWER(Name) AS Name, MenuName "
- "FROM Species")
- return tuple(cursor.fetchall())
-
- return tuple()
-
-def species_by_id(conn: mdb.Connection, speciesid) -> Union[dict, None]:
- "Retrieve the species from the database by id."
- with conn.cursor(cursorclass=DictCursor) as cursor:
- cursor.execute(
- (
- "SELECT "
- "SpeciesId, SpeciesName, LOWER(Name) AS Name, MenuName "
- "FROM Species WHERE SpeciesId=%s"),
- (speciesid,))
- return cursor.fetchone()
-
def genechips():
"Retrieve the genechip information from the database"
def __organise_by_species__(acc, chip):
@@ -94,16 +71,6 @@ def studies_by_species_and_platform(speciesid:int, genechipid:int) -> tuple:
return tuple()
-def groups_by_species(speciesid:int) -> tuple:
- "Retrieve group (InbredSet) information from the database."
- with database_connection() as conn:
- with conn.cursor(cursorclass=DictCursor) as cursor:
- query = "SELECT * FROM InbredSet WHERE SpeciesId=%s"
- cursor.execute(query, (speciesid,))
- return tuple(cursor.fetchall())
-
- return tuple()
-
def organise_groups_by_family(acc:dict, group:dict) -> dict:
"Organise the group (InbredSet) information by the group field"
family = group["Family"]