diff options
author | zsloan | 2022-02-01 20:01:23 +0000 |
---|---|---|
committer | BonfaceKilz | 2022-02-02 11:04:40 +0300 |
commit | 679c9733cc71f88c14eb79d4b2fa8ed2bdd23b13 (patch) | |
tree | 56b203061c62f72ea268ca73a9e1ff327a9fbf3f /gn3/db | |
parent | 0f9e3a24b120db9c00e8b6be93194c2be392a3ab (diff) | |
download | genenetwork3-679c9733cc71f88c14eb79d4b2fa8ed2bdd23b13.tar.gz |
Fix retrieve_publish_trait_data query
The PublishFreeeze table is actually unnecessary for this query, since
the group ID (inbred_set_id) should be passed in and that ID is in the
PublishXRef table (so no neeed to join with PublishFreeze)
Diffstat (limited to 'gn3/db')
-rw-r--r-- | gn3/db/traits.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gn3/db/traits.py b/gn3/db/traits.py index 5985c3f..cad53e7 100644 --- a/gn3/db/traits.py +++ b/gn3/db/traits.py @@ -715,17 +715,16 @@ def retrieve_publish_trait_data(trait_info: Dict, conn: Any): "SELECT " "Strain.Name, PublishData.value, PublishSE.error, NStrain.count, " "PublishData.Id " - "FROM (PublishData, Strain, PublishXRef, PublishFreeze) " + "FROM (PublishData, Strain, PublishXRef) " "LEFT JOIN PublishSE ON " "(PublishSE.DataId = PublishData.Id " "AND PublishSE.StrainId = PublishData.StrainId) " "LEFT JOIN NStrain ON " "(NStrain.DataId = PublishData.Id " "AND NStrain.StrainId = PublishData.StrainId) " - "WHERE PublishXRef.InbredSetId = PublishFreeze.InbredSetId " - "AND PublishData.Id = PublishXRef.DataId " + "WHERE PublishData.Id = PublishXRef.DataId " "AND PublishXRef.Id = %(trait_name)s " - "AND PublishFreeze.Id = %(dataset_id)s " + "AND PublishXRef.InbredSetId = %(dataset_id)s " "AND PublishData.StrainId = Strain.Id " "ORDER BY Strain.Name") with conn.cursor() as cursor: |