diff options
author | zsloan | 2021-02-10 21:28:00 +0000 |
---|---|---|
committer | zsloan | 2021-02-10 21:28:00 +0000 |
commit | f81e15b4bc723d2dc05ec00226f87f79cb1dfb0c (patch) | |
tree | 777cb17ff7cf6e96814e3e5c359b83c1f2712522 /wqflask | |
parent | ab7ca111ad4feb6869db2f25aba703b45438411d (diff) | |
download | genenetwork2-f81e15b4bc723d2dc05ec00226f87f79cb1dfb0c.tar.gz |
Fixed phenotype sample_data API request to use the correct trait IDs
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/api/router.py | 10 |
1 files changed, 6 insertions, 4 deletions
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: |