aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander_Kabui2022-10-05 18:04:45 +0300
committerAlexander_Kabui2022-10-05 18:04:45 +0300
commit4a8cf274dd72f13118d0f704f5e5e9fcf12dd202 (patch)
treebcd2aa1f88367121a199d475a1d35d78056887bf
parentff34aee0f39c2e91db243461d7d67405e7aea0e3 (diff)
downloadgenenetwork3-4a8cf274dd72f13118d0f704f5e5e9fcf12dd202.tar.gz
remove data preprocessing for tissue databugfix/remove-pre-data-parsing
-rw-r--r--gn3/computations/rust_correlation.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/gn3/computations/rust_correlation.py b/gn3/computations/rust_correlation.py
index 8c3a0d3..5103de7 100644
--- a/gn3/computations/rust_correlation.py
+++ b/gn3/computations/rust_correlation.py
@@ -48,6 +48,7 @@ def generate_json_file(
return (output_file, tmp_json_file)
+
def run_correlation(
dataset, trait_vals: str, method: str, delimiter: str,
corr_type: str = "sample", top_n: int = 500):
@@ -67,7 +68,6 @@ def run_correlation(
def parse_correlation_output(result_file: str,
corr_type: str, top_n: int = 500) -> dict:
"""parse file output """
- #current types are sample and tissue
def __parse_line__(line):
(trait_name, corr_coeff, p_val, num_overlap) = line.rstrip().split(",")
if corr_type == "sample":
@@ -155,12 +155,8 @@ def parse_tissue_corr_data(symbol_name: str,
for (trait, symbol) in dataset_symbols.items():
try:
corr_vals = dataset_vals.get(symbol.lower())
-
if corr_vals:
- corr_vals = [str(trait)] + corr_vals
-
- data.append(",".join([str(x) for x in corr_vals]))
-
+ data.append([trait] + [str(val) for val in corr_vals])
except AttributeError:
pass