From d4d1a39c4aa302ee2a074da6fdf76a6fab91c267 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Thu, 21 Jul 2022 23:26:52 +0300 Subject: compute num overlap --- gn3/computations/rust_correlation.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gn3') diff --git a/gn3/computations/rust_correlation.py b/gn3/computations/rust_correlation.py index 4438d79..086db3b 100644 --- a/gn3/computations/rust_correlation.py +++ b/gn3/computations/rust_correlation.py @@ -89,10 +89,9 @@ def parse_correlation_output(result_file: str, top_n: int = 500) -> list[dict]: lines = [next(file_reader) for x in range(top_n)] for line in lines: - - (trait_name, corr_coeff, p_val) = line.rstrip().split(",") + (trait_name, corr_coeff, p_val, num_overlap) = line.rstrip().split(",") corr_data = { - "num_overlap": 00, # to be later fixed + "num_overlap": num_overlap, "corr_coefficient": corr_coeff, "p_value": p_val } @@ -169,3 +168,7 @@ def parse_tissue_corr_data(symbol_name: str, pass return (x_vals, data) + + +def parse_lit_corr_data(trait, dataset): + pass -- cgit v1.2.3