aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-08-10 20:19:27 +0000
committerzsloan2021-08-10 20:19:27 +0000
commit10ef0e532324e838c7be5a0f7f451dcaec9c2ce8 (patch)
tree3e05a1ea2c102cb0fd66763a1b3cdb4f0a95ce0e
parent162851e8f92ed6d01c25d4f6034bcac4986e8094 (diff)
downloadgenenetwork2-10ef0e532324e838c7be5a0f7f451dcaec9c2ce8.tar.gz
Fixed issue that caused correlations to not work with temp traits after switching to using the GN3 code
-rw-r--r--wqflask/wqflask/correlation/correlation_gn3_api.py7
-rw-r--r--wqflask/wqflask/correlation/show_corr_results.py5
2 files changed, 9 insertions, 3 deletions
diff --git a/wqflask/wqflask/correlation/correlation_gn3_api.py b/wqflask/wqflask/correlation/correlation_gn3_api.py
index c96da8ee..f7c06a46 100644
--- a/wqflask/wqflask/correlation/correlation_gn3_api.py
+++ b/wqflask/wqflask/correlation/correlation_gn3_api.py
@@ -18,7 +18,10 @@ from gn3.db_utils import database_connector
def create_target_this_trait(start_vars):
"""this function creates the required trait and target dataset for correlation"""
- this_dataset = data_set.create_dataset(dataset_name=start_vars['dataset'])
+ if start_vars['dataset'] == "Temp":
+ this_dataset = data_set.create_dataset(dataset_name="Temp", dataset_type="Temp", group_name=start_vars['group'])
+ else:
+ this_dataset = data_set.create_dataset(dataset_name=start_vars['dataset'])
target_dataset = data_set.create_dataset(
dataset_name=start_vars['corr_dataset'])
this_trait = create_trait(dataset=this_dataset,
@@ -306,4 +309,4 @@ def get_tissue_correlation_input(this_trait, trait_symbol_dict):
"trait_symbol_dict": trait_symbol_dict,
"symbol_tissue_vals_dict": corr_result_tissue_vals_dict
}
- return (primary_tissue_data, target_tissue_data) \ No newline at end of file
+ return (primary_tissue_data, target_tissue_data)
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py
index e2daa991..d73965da 100644
--- a/wqflask/wqflask/correlation/show_corr_results.py
+++ b/wqflask/wqflask/correlation/show_corr_results.py
@@ -30,7 +30,10 @@ def set_template_vars(start_vars, correlation_data):
corr_type = start_vars['corr_type']
corr_method = start_vars['corr_sample_method']
- this_dataset_ob = create_dataset(dataset_name=start_vars['dataset'])
+ if start_vars['dataset'] == "Temp":
+ this_dataset_ob = create_dataset(dataset_name="Temp", dataset_type="Temp", group_name=start_vars['group'])
+ else:
+ this_dataset_ob = create_dataset(dataset_name=start_vars['dataset'])
this_trait = create_trait(dataset=this_dataset_ob,
name=start_vars['trait_id'])