diff options
author | Munyoki Kilyungi | 2022-10-09 18:23:47 +0300 |
---|---|---|
committer | BonfaceKilz | 2022-11-10 09:00:04 +0300 |
commit | a83d95c707dbf4480a568bae4203ed5f2476cb53 (patch) | |
tree | b64e5095e878fcbf828eab7c3a56d0f184f5d74f /wqflask | |
parent | 30c31955df6a9d20c28e0dcd9f99f06cbfd51a77 (diff) | |
download | genenetwork2-a83d95c707dbf4480a568bae4203ed5f2476cb53.tar.gz |
Rename dataset.as_dict to dataset.as_monadic_dict
* wqflask/base/data_set/dataset.py (DataSet.as_dict): Rename this to ...
(as_monadic_dict): ... this.
* wqflask/wqflask/correlation/show_corr_results.py
(set_template_vars): Rename as_dict to as_monadic_dict.
(correlation_json_for_table): Ditto.
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/correlation/show_corr_results.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index d776c8d3..01772544 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -40,16 +40,17 @@ def set_template_vars(start_vars, correlation_data): name=start_vars['trait_id']) correlation_data['this_trait'] = jsonable(this_trait, this_dataset_ob) - correlation_data['this_dataset'] = this_dataset_ob.as_dict() + correlation_data['this_dataset'] = this_dataset_ob.as_monadic_dict() target_dataset_ob = create_dataset(correlation_data['target_dataset']) - correlation_data['target_dataset'] = target_dataset_ob.as_dict() - correlation_data['table_json'] = correlation_json_for_table( - start_vars, - correlation_data, - correlation_data['this_trait'], - correlation_data['this_dataset'], - target_dataset_ob) + correlation_data['target_dataset'] = target_dataset_ob.as_monadic_dict() + + table_json = correlation_json_for_table(correlation_data, + correlation_data['this_trait'], + correlation_data['this_dataset'], + target_dataset_ob) + + correlation_data['table_json'] = table_json if target_dataset_ob.type == "ProbeSet": filter_cols = [7, 6] @@ -74,12 +75,12 @@ def correlation_json_for_table(start_vars, correlation_data, this_trait, this_da Keyword arguments: correlation_data -- Correlation results this_trait -- Trait being correlated against a dataset, as a dict - this_dataset -- Dataset of this_trait, as a dict + this_dataset -- Dataset of this_trait, as a monadic dict target_dataset_ob - Target dataset, as a Dataset ob """ this_trait = correlation_data['this_trait'] this_dataset = correlation_data['this_dataset'] - target_dataset = target_dataset_ob.as_dict() + target_dataset = target_dataset_ob.as_monadic_dict() corr_results = correlation_data['correlation_results'] results_list = [] |