aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gn3/computations/correlations.py2
-rw-r--r--tests/unit/computations/test_correlation.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/gn3/computations/correlations.py b/gn3/computations/correlations.py
index d496cec..4fdf8cf 100644
--- a/gn3/computations/correlations.py
+++ b/gn3/computations/correlations.py
@@ -257,7 +257,7 @@ def fetch_lit_correlation_data(
cursor.execute(query_formatter(query,
*tuple(reversed(query_values))))
lit_corr_results = cursor.fetchone()
- lit_results = (gene_id, lit_corr_results.val)\
+ lit_results = (gene_id, lit_corr_results[1])\
if lit_corr_results else (gene_id, 0)
return lit_results
diff --git a/tests/unit/computations/test_correlation.py b/tests/unit/computations/test_correlation.py
index 52c1f85..d264738 100644
--- a/tests/unit/computations/test_correlation.py
+++ b/tests/unit/computations/test_correlation.py
@@ -276,7 +276,7 @@ class TestCorrelation(TestCase):
input trait mouse gene id and mouse gene id
"""
- expected_db_results = [namedtuple("lit_coeff", "val")(x*0.1)
+ expected_db_results = [("val", x*0.1)
for x in range(1, 4)]
conn = DataBase(expected_results=expected_db_results)
expected_results = ("1", 0.1)