From 74e81163fb3c2418b88f6d4fbb99760c63a3fea6 Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 14 Nov 2019 12:03:09 -0600 Subject: Changed code to rebuild dataset list each time you view the trait page to avoid having to restart each time a new dataset is added. Will need to keep an eye out for any issues, but doesn't seem to affect speed much Fixed logic for UniProt link to use UniProtId instead of protein ID --- wqflask/base/data_set.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'wqflask/base') diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index d9b7f668..f58367ca 100644 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -119,8 +119,12 @@ Publish or ProbeSet. E.g. def __call__(self, name): return self.datasets[name] +def rebuild_dataset_ob(): + Dataset_Getter = Dataset_Types() + return Dataset_Getter + # Do the intensive work at startup one time only -Dataset_Getter = Dataset_Types() +Dataset_Getter = rebuild_dataset_ob() def create_datasets_list(): if USE_REDIS: @@ -922,7 +926,7 @@ class MrnaAssayDataSet(DataSet): 'blatseq', 'targetseq', 'chipid', 'comments', 'strand_probe', 'strand_gene', - 'proteinid', + 'proteinid', 'uniprotid', 'probe_set_target_region', 'probe_set_specificity', 'probe_set_blat_score', -- cgit v1.2.3