diff options
author | zsloan | 2022-02-01 20:48:33 +0000 |
---|---|---|
committer | BonfaceKilz | 2022-02-02 11:04:40 +0300 |
commit | 9ac9e6a305e5e96d24a67a7469e3f2ea66fc0c72 (patch) | |
tree | 9f3fa205484b5a622783a89db709b116d1469aa5 /gn3/db | |
parent | eede05baf5e7573a7d29398a517e10b6c441145a (diff) | |
download | genenetwork3-9ac9e6a305e5e96d24a67a7469e3f2ea66fc0c72.tar.gz |
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)
Diffstat (limited to 'gn3/db')
-rw-r--r-- | gn3/db/traits.py | 5 |
1 files changed, 2 insertions, 3 deletions
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, |