From f81e15b4bc723d2dc05ec00226f87f79cb1dfb0c Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 10 Feb 2021 21:28:00 +0000 Subject: Fixed phenotype sample_data API request to use the correct trait IDs --- wqflask/wqflask/api/router.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/api/router.py b/wqflask/wqflask/api/router.py index 8e59ef27..60e163f2 100644 --- a/wqflask/wqflask/api/router.py +++ b/wqflask/wqflask/api/router.py @@ -869,18 +869,20 @@ def get_dataset_trait_ids(dataset_name, start_vars): query = """ SELECT - PublishXRef.PhenotypeId + PublishXRef.PhenotypeId, PublishXRef.Id, InbredSet.InbredSetCode FROM - PublishXRef + PublishXRef, InbredSet WHERE - PublishXRef.InbredSetId = "{0}" + PublishXRef.InbredSetId = "{0}" AND + InbredSet.Id = PublishXRef.InbredSetId {1} """.format(dataset_id, limit_string) results = g.db.execute(query).fetchall() trait_ids = [result[0] for result in results] - trait_names = trait_ids + trait_names = [str(result[2]) + "_" + str(result[1]) for result in results] + return trait_ids, trait_names, data_type, dataset_id else: -- cgit v1.2.3