aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-06-16 21:54:45 +0000
committerzsloan2021-06-16 21:54:45 +0000
commitf2e035bb4ff5a1dd5b465ae694105b1a7de956c8 (patch)
treec078daa816c173f6e8dfdb1a292895cdc68ce529
parentc327905af1ef1a0c66a453127ee8f5ba4a824573 (diff)
downloadgenenetwork2-f2e035bb4ff5a1dd5b465ae694105b1a7de956c8.tar.gz
Added compute_all as parameter to compute_correlation and keyword arguments to docstring
-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,