aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
Diffstat (limited to 'gn3')
-rw-r--r--gn3/computations/rust_correlation.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gn3/computations/rust_correlation.py b/gn3/computations/rust_correlation.py
index 54d9243..e7f6bba 100644
--- a/gn3/computations/rust_correlation.py
+++ b/gn3/computations/rust_correlation.py
@@ -49,6 +49,8 @@ def run_correlation(
dataset, trait_vals: str, method: str, delimiter: str,
corr_type: str = "sample", top_n: int = 500):
"""entry function to call rust correlation"""
+
+ #pylint: disable=too-many-arguments
(tmp_dir, tmp_file) = generate_input_files(dataset)
(output_file, json_file) = generate_json_file(
tmp_dir=tmp_dir, tmp_file=tmp_file, method=method, delimiter=delimiter,
@@ -62,6 +64,7 @@ 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":
@@ -72,8 +75,7 @@ def parse_correlation_output(result_file: str,
"corr_coefficient": corr_coeff,
"p_value": p_val
})
-
- elif corr_type == "tissue":
+ if corr_type == "tissue":
return (
trait_name,
{