From f2e035bb4ff5a1dd5b465ae694105b1a7de956c8 Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 16 Jun 2021 21:54:45 +0000 Subject: Added compute_all as parameter to compute_correlation and keyword arguments to docstring --- wqflask/wqflask/correlation/correlation_gn3_api.py | 12 ++++++++---- 1 file 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, -- cgit v1.2.3