about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMuriithi Frederick Muriuki2021-07-26 15:40:50 +0300
committerMuriithi Frederick Muriuki2021-07-26 15:40:50 +0300
commitbf4e211ea1e639a6a50046ec598e2b4aed40b0ca (patch)
treeabd3b1ed73ea1e3ada8d210c41bee45c1ff780d4
parent4c8c13814a22fe6b40081ecfa1f957bc5bf99930 (diff)
parentcbb8029746400a299b9c65c5cd7be9a38cade189 (diff)
downloadgenenetwork3-bf4e211ea1e639a6a50046ec598e2b4aed40b0ca.tar.gz
Merge branch 'main' of github.com:genenetwork/genenetwork3
-rw-r--r--gn3/computations/correlations.py3
-rw-r--r--sql/update/metadata_audit.sql2
2 files changed, 3 insertions, 2 deletions
diff --git a/gn3/computations/correlations.py b/gn3/computations/correlations.py
index bc738a7..56f483c 100644
--- a/gn3/computations/correlations.py
+++ b/gn3/computations/correlations.py
@@ -1,4 +1,5 @@
 """module contains code for correlations"""
+import math
 import multiprocessing
 
 from typing import List
@@ -90,7 +91,7 @@ def compute_sample_r_correlation(trait_name, corr_method, trait_vals,
                                        target_values=sanitized_target_vals,
                                        corr_method=corr_method)
 
-        if corr_coefficient is not None:
+        if corr_coefficient is not None and not math.isnan(corr_coefficient):
             return (trait_name, corr_coefficient, p_value, num_overlap)
     return None
 
diff --git a/sql/update/metadata_audit.sql b/sql/update/metadata_audit.sql
index 514a2fc..5055666 100644
--- a/sql/update/metadata_audit.sql
+++ b/sql/update/metadata_audit.sql
@@ -26,4 +26,4 @@ CREATE TABLE metadata_audit (
     json_diff_data  VARCHAR(2048)                           NOT NULL,
     time_stamp      timestamp     DEFAULT CURRENT_TIMESTAMP NOT NULL,
                     CHECK (JSON_VALID(json_diff_data))
-);
+) CHARACTER SET 'utf8mb4';