From 9ac9e6a305e5e96d24a67a7469e3f2ea66fc0c72 Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 1 Feb 2022 20:48:33 +0000 Subject: Remove PublishFreeze from retrieve_publish_trait_info query The PublishFreeze table isn't necessary in phenotype queries, since PublishFreeze.Id = InbredSet.Id (for the purposes of identifying traits, at least) --- gn3/db/traits.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gn3/db') diff --git a/gn3/db/traits.py b/gn3/db/traits.py index fdbba21..062b68c 100644 --- a/gn3/db/traits.py +++ b/gn3/db/traits.py @@ -309,13 +309,12 @@ def retrieve_publish_trait_info(trait_data_source: Dict[str, Any], conn: Any): "SELECT " "{columns} " "FROM " - "PublishXRef, Publication, Phenotype, PublishFreeze " + "PublishXRef, Publication, Phenotype " "WHERE " "PublishXRef.Id = %(trait_name)s AND " "Phenotype.Id = PublishXRef.PhenotypeId AND " "Publication.Id = PublishXRef.PublicationId AND " - "PublishXRef.InbredSetId = PublishFreeze.InbredSetId AND " - "PublishFreeze.Id =%(trait_dataset_id)s").format(columns=columns) + "PublishXRef.InbredSetId = %(trait_dataset_id)s").format(columns=columns) with conn.cursor() as cursor: cursor.execute( query, -- cgit v1.2.3