From d6c8505606b7b9fa1e41b3ee8bca303a0f8d6597 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Wed, 31 Aug 2022 18:02:35 +0300 Subject: integrate text files --- wqflask/wqflask/correlation/rust_correlation.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'wqflask') diff --git a/wqflask/wqflask/correlation/rust_correlation.py b/wqflask/wqflask/correlation/rust_correlation.py index 5109c72e..f06ee95c 100644 --- a/wqflask/wqflask/correlation/rust_correlation.py +++ b/wqflask/wqflask/correlation/rust_correlation.py @@ -8,6 +8,8 @@ from wqflask.correlation.correlation_functions\ from wqflask.correlation.correlation_gn3_api import create_target_this_trait from wqflask.correlation.correlation_gn3_api import lit_for_trait_list from wqflask.correlation.correlation_gn3_api import do_lit_correlation +from wqflask.correlation.pre_computes import fetch_text_file +from wqflask.correlation.pre_computes import read_text_file from gn3.computations.correlations import compute_all_lit_correlation from gn3.computations.rust_correlation import run_correlation from gn3.computations.rust_correlation import get_sample_corr_data @@ -210,6 +212,15 @@ def __compute_sample_corr__( sample_data = get_sample_corr_data( sample_type=start_vars["corr_samples_group"], all_samples=all_samples, dataset_samples=this_dataset.group.all_samples_ordered()) + + if target_dataset.type == "ProbeSet": + with database_connector() as conn: + file_path = fetch_text_file(target_dataset.name, conn) + if file_path: + (sample_vals, target_data) = read_text_file( + sample_data, file_path) + return run_correlation(target_data, sample_vals, method, ",", corr_type, n_top) + target_dataset.get_trait_data(list(sample_data.keys())) target_data = [] -- cgit v1.2.3