aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/correlation/correlation_gn3_api.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/wqflask/wqflask/correlation/correlation_gn3_api.py b/wqflask/wqflask/correlation/correlation_gn3_api.py
index 6974dbd5..df0afba6 100644
--- a/wqflask/wqflask/correlation/correlation_gn3_api.py
+++ b/wqflask/wqflask/correlation/correlation_gn3_api.py
@@ -131,8 +131,14 @@ def fetch_sample_data(start_vars, this_trait, this_dataset, target_dataset):
return (this_trait_data, results)
-def compute_correlation(start_vars, method="pearson"):
- """compute correlation for to call gn3 api"""
+def compute_correlation(start_vars, method="pearson", compute_all=False):
+ """Compute correlations using GN3 API
+
+ Keyword arguments:
+ start_vars -- All input from form; includes things like the trait/dataset names
+ method -- Correlation method to be used (pearson, spearman, or bicor)
+ compute_all -- Include sample, tissue, and literature correlations (when applicable)
+ """
# pylint: disable-msg=too-many-locals
corr_type = start_vars['corr_type']
@@ -186,8 +192,6 @@ def compute_correlation(start_vars, method="pearson"):
correlation_results = correlation_results[0:corr_return_results]
- compute_all = True # later to be passed as argument
-
if (compute_all):
correlation_results = compute_corr_for_top_results(correlation_results,