diff options
author | Frederick Muriuki Muriithi | 2022-02-18 14:17:29 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-02-18 14:17:29 +0300 |
commit | 75dcfe295af57b16428c586cc11dbaa827a5feba (patch) | |
tree | f24fe87f97a278552f7d1d9ad4b998339a1affe8 /gn3/db/datasets.py | |
parent | 83a7aa7533f8f4ecac049dc0e93aff6429e6e5ae (diff) | |
download | genenetwork3-75dcfe295af57b16428c586cc11dbaa827a5feba.tar.gz |
Remove code trying to query non-existent `TempFreeze` table
The code was migrated from GN1 with a faulty assumption that all trait types
have a corresponding `*Freeze` table in the database. This assumption is not
true for the `Temp` traits.
This commit removes the buggy code.
Diffstat (limited to 'gn3/db/datasets.py')
-rw-r--r-- | gn3/db/datasets.py | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/gn3/db/datasets.py b/gn3/db/datasets.py index a41e228..1d6cdf8 100644 --- a/gn3/db/datasets.py +++ b/gn3/db/datasets.py @@ -82,30 +82,6 @@ def retrieve_geno_trait_dataset_name( "dataset_shortname"], cursor.fetchone())) -def retrieve_temp_trait_dataset_name( - threshold: int, name: str, connection: Any): - """ - Get the ID, DataScale and various name formats for a `Temp` trait. - """ - query = ( - "SELECT Id, Name, FullName, ShortName " - "FROM TempFreeze " - "WHERE " - "public > %(threshold)s " - "AND " - "(Name = %(name)s OR FullName = %(name)s OR ShortName = %(name)s)") - with connection.cursor() as cursor: - cursor.execute( - query, - { - "threshold": threshold, - "name": name - }) - return dict(zip( - ["dataset_id", "dataset_name", "dataset_fullname", - "dataset_shortname"], - cursor.fetchone())) - def retrieve_dataset_name( trait_type: str, threshold: int, trait_name: str, dataset_name: str, conn: Any): @@ -120,9 +96,7 @@ def retrieve_dataset_name( "ProbeSet": retrieve_probeset_trait_dataset_name, "Publish": retrieve_publish_trait_dataset_name, "Geno": retrieve_geno_trait_dataset_name, - "Temp": retrieve_temp_trait_dataset_name} - if trait_type == "Temp": - return retrieve_temp_trait_dataset_name(threshold, trait_name, conn) + "Temp": lambda threshold, dataset_name, conn: {}} return fn_map[trait_type](threshold, dataset_name, conn) |