about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--uploader/phenotypes/models.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/uploader/phenotypes/models.py b/uploader/phenotypes/models.py
index 7c051d7..a22497c 100644
--- a/uploader/phenotypes/models.py
+++ b/uploader/phenotypes/models.py
@@ -328,35 +328,6 @@ def save_new_dataset(cursor: Cursor,
     return {**params, "Id": cursor.lastrowid}
 
 
-def phenotypes_data_by_ids(
-        conn: mdb.Connection,
-        inbred_pheno_xref: dict[str, int]
-) -> tuple[dict, ...]:
-    """Fetch all phenotype data, filtered by the `inbred_pheno_xref` mapping."""
-    _paramstr = ",".join(["(%s, %s, %s)"] * len(inbred_pheno_xref))
-    _query = ("SELECT "
-              "pub.PubMed_ID, pheno.*, pxr.*, pd.*, str.*, iset.InbredSetCode "
-              "FROM Publication AS pub "
-              "RIGHT JOIN PublishXRef AS pxr0 ON pub.Id=pxr0.PublicationId "
-              "INNER JOIN Phenotype AS pheno ON pxr0.PhenotypeId=pheno.id "
-              "INNER JOIN PublishXRef AS pxr ON pheno.Id=pxr.PhenotypeId "
-              "INNER JOIN PublishData AS pd ON pxr.DataId=pd.Id "
-              "INNER JOIN Strain AS str ON pd.StrainId=str.Id "
-              "INNER JOIN StrainXRef AS sxr ON str.Id=sxr.StrainId "
-              "INNER JOIN PublishFreeze AS pf ON sxr.InbredSetId=pf.InbredSetId "
-              "INNER JOIN InbredSet AS iset ON pf.InbredSetId=iset.InbredSetId "
-              f"WHERE (pxr.InbredSetId, pheno.Id, pxr.Id) IN ({_paramstr}) "
-              "ORDER BY pheno.Id")
-    with conn.cursor(cursorclass=DictCursor) as cursor:
-        cursor.execute(_query, tuple(item for row in inbred_pheno_xref
-                                     for item in (row["population_id"],
-                                                  row["phenoid"],
-                                                  row["xref_id"])))
-        debug_query(cursor, logger)
-        return tuple(
-            reduce(__organise_by_phenotype__, cursor.fetchall(), {}).values())
-
-
 def __pre_process_phenotype_data__(row):
     _desc = row.get("description", "")
     _pre_pub_desc = row.get("pre_publication_description", _desc)