aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2020-12-03 13:45:21 -0600
committerzsloan2020-12-03 13:45:21 -0600
commit5506ac96077db794c945cc1325300dead8073eea (patch)
tree549311971d6e6d2130990d71b891d551bb31c4fd /wqflask
parent3147f1eec3aee3b7844a3ac88cd58fafe53207b3 (diff)
downloadgenenetwork2-5506ac96077db794c945cc1325300dead8073eea.tar.gz
Convert trait/dataset names to strings, since phenotype names were being treated as integers
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/correlation/show_corr_results.py1
-rw-r--r--wqflask/wqflask/export_traits.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py
index 1b801b1d..51aa1622 100644
--- a/wqflask/wqflask/correlation/show_corr_results.py
+++ b/wqflask/wqflask/correlation/show_corr_results.py
@@ -487,6 +487,7 @@ def generate_corr_json(corr_results, this_trait, dataset, target_dataset, for_ap
results_dict['index'] = i + 1
results_dict['trait_id'] = trait.name
results_dict['dataset'] = trait.dataset.name
+ results_dict['hmac'] = hmac.data_hmac('{}:{}'.format(trait.name, trait.dataset.name))
if target_dataset.type == "ProbeSet":
results_dict['symbol'] = trait.symbol
results_dict['description'] = "N/A"
diff --git a/wqflask/wqflask/export_traits.py b/wqflask/wqflask/export_traits.py
index b14c55db..6fb760e0 100644
--- a/wqflask/wqflask/export_traits.py
+++ b/wqflask/wqflask/export_traits.py
@@ -86,7 +86,7 @@ def export_search_results_csv(targs):
trait_symbol = "N/A"
row_contents = [
i + 1,
- "https://genenetwork.org/show_trait?trait_id=" + trait.name + "&dataset=" + trait.dataset.name,
+ "https://genenetwork.org/show_trait?trait_id=" + str(trait.name) + "&dataset=" + str(trait.dataset.name),
trait.dataset.group.species,
trait.dataset.group.name,
trait.dataset.name,