diff options
author | BonfaceKilz | 2021-04-29 21:51:27 +0300 |
---|---|---|
committer | GitHub | 2021-04-29 21:51:27 +0300 |
commit | 881090ff15a5a563bccefcbd08d373c88a64aa31 (patch) | |
tree | b48693555b97fd21e37b263591685af75a2a4b45 /wqflask | |
parent | 23e8e222e8016ea8335d4850070f884ab9b043fe (diff) | |
parent | bab514be0f0d01fc192638b8e7ccd5909b842b23 (diff) | |
download | genenetwork2-881090ff15a5a563bccefcbd08d373c88a64aa31.tar.gz |
Merge branch 'testing' into Feature/Add-upload-data-forms
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/base/trait.py | 4 | ||||
-rw-r--r-- | wqflask/utility/helper_functions.py | 4 | ||||
-rw-r--r-- | wqflask/wqflask/marker_regression/gemma_mapping.py | 7 | ||||
-rw-r--r-- | wqflask/wqflask/network_graph/network_graph.py | 12 | ||||
-rw-r--r-- | wqflask/wqflask/search_results.py | 2 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/search_results.js | 11 | ||||
-rw-r--r-- | wqflask/wqflask/templates/base.html | 3 |
7 files changed, 25 insertions, 18 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index 968b6d4b..5574128d 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -337,6 +337,10 @@ def jsonable(trait): dataset_name=dataset.shortname, location=trait.location_repr ) + elif dataset.name == "Temp": + return dict(name=trait.name, + dataset="Temp", + dataset_name="Temp") else: return dict() diff --git a/wqflask/utility/helper_functions.py b/wqflask/utility/helper_functions.py index e0ae3414..12fd6be5 100644 --- a/wqflask/utility/helper_functions.py +++ b/wqflask/utility/helper_functions.py @@ -39,8 +39,8 @@ def get_trait_db_obs(self, trait_db_list): for trait in trait_db_list: data, _separator, hmac_string = trait.rpartition(':') data = data.strip() - assert hmac_string == hmac.hmac_creation(data), "Data tampering?" - trait_name, dataset_name = data.split(":") + assert hmac_string==hmac.hmac_creation(data), "Data tampering?" + trait_name, dataset_name = data.split(":")[:2] if dataset_name == "Temp": dataset_ob = data_set.create_dataset( dataset_name=dataset_name, dataset_type="Temp", diff --git a/wqflask/wqflask/marker_regression/gemma_mapping.py b/wqflask/wqflask/marker_regression/gemma_mapping.py index 83ebcdf9..06c9300a 100644 --- a/wqflask/wqflask/marker_regression/gemma_mapping.py +++ b/wqflask/wqflask/marker_regression/gemma_mapping.py @@ -146,7 +146,12 @@ def gen_covariates_file(this_dataset, covariates, samples): for covariate in covariate_list: this_covariate_data = [] trait_name = covariate.split(":")[0] - dataset_ob = create_dataset(covariate.split(":")[1]) + dataset_name = covariate.split(":")[1] + if dataset_name == "Temp": + temp_group = trait_name.split("_")[2] + dataset_ob = create_dataset(dataset_name = "Temp", dataset_type = "Temp", group_name = temp_group) + else: + dataset_ob = create_dataset(covariate.split(":")[1]) trait_ob = create_trait(dataset=dataset_ob, name=trait_name, cellid=None) diff --git a/wqflask/wqflask/network_graph/network_graph.py b/wqflask/wqflask/network_graph/network_graph.py index f5ee5303..c99fce01 100644 --- a/wqflask/wqflask/network_graph/network_graph.py +++ b/wqflask/wqflask/network_graph/network_graph.py @@ -182,15 +182,3 @@ class NetworkGraph: samples=self.all_sample_list, sample_data=self.sample_data, elements=self.elements,) - - def get_trait_db_obs(self, trait_db_list): - self.trait_list = [] - for i, trait_db in enumerate(trait_db_list): - if i == (len(trait_db_list) - 1): - break - trait_name, dataset_name = trait_db.split(":") - dataset_ob = data_set.create_dataset(dataset_name) - trait_ob = create_trait(dataset=dataset_ob, - name=trait_name, - cellid=None) - self.trait_list.append((trait_ob, dataset_ob)) diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py index 36500a8d..fd7c132b 100644 --- a/wqflask/wqflask/search_results.py +++ b/wqflask/wqflask/search_results.py @@ -119,7 +119,7 @@ class SearchResultPage: trait_dict['dataset'] = this_trait.dataset.name trait_dict['hmac'] = hmac.data_hmac('{}:{}'.format(this_trait.name, this_trait.dataset.name)) if this_trait.dataset.type == "ProbeSet": - trait_dict['symbol'] = this_trait.symbol + trait_dict['symbol'] = this_trait.symbol if this_trait.symbol else "N/A" trait_dict['description'] = "N/A" if this_trait.description_display: trait_dict['description'] = this_trait.description_display diff --git a/wqflask/wqflask/static/new/javascript/search_results.js b/wqflask/wqflask/static/new/javascript/search_results.js index ecb1220d..48b9b7be 100644 --- a/wqflask/wqflask/static/new/javascript/search_results.js +++ b/wqflask/wqflask/static/new/javascript/search_results.js @@ -326,4 +326,15 @@ $(function() { } ); } + apply_default = function() { + let default_collection_id = $.cookie('default_collection'); + if (default_collection_id) { + let the_option = $('[name=existing_collection] option').filter(function() { + return ($(this).text().split(":")[0] == default_collection_id); + }) + the_option.prop('selected', true); + } + } + apply_default(); + });
\ No newline at end of file diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index ccb2ac5a..e6f22deb 100644 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -191,7 +191,7 @@ Translational Systems Genetics of Mitochondria, Metabolism, and Aging (R01AG043930, 2013-2018) </li> <li> - <a href="http://www.iniastress.org/">NIAAA</a> + <a href="https://www.ohsu.edu/iniastress-consortium">NIAAA</a> Integrative Neuroscience Initiative on Alcoholism (U01 AA016662, U01 AA013499, U24 AA013513, U01 AA014425, 2006-2017) </li> <li> @@ -257,7 +257,6 @@ <script src="{{ url_for('js', filename='jquery-ui/jquery-ui.min.js') }}" type="text/javascript"></script> <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='colorbox/jquery.colorbox-min.js') }}"></script> - <!--<script type="text/javascript" src="/static/new/javascript/login.js"></script>--> <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/parsley.min.js') }}"></script> |