about summary refs log tree commit diff
diff options
context:
space:
mode:
authorzsloan2021-03-30 17:14:46 +0000
committerzsloan2021-03-30 17:14:46 +0000
commit6a5576bb1271060c703871aedf16360847c68f8b (patch)
tree21fc08046927f2ba35417655a23cfdd0988cd776
parent0a6b9ec767a12bedeb892f400e6b04bbd6160673 (diff)
downloadgenenetwork2-6a5576bb1271060c703871aedf16360847c68f8b.tar.gz
Shifted the 'try' in a try/except up some to account for a possible error with calculating PCA that I don't know the cause of yet
-rw-r--r--wqflask/wqflask/correlation_matrix/show_corr_matrix.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
index a77877d2..a67ea9f4 100644
--- a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
+++ b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
@@ -150,14 +150,14 @@ class CorrelationMatrix(object):
                     this_trait_vals.append(sample_value)
             self.trait_data_array.append(this_trait_vals)
 
-        corr_result_eigen = np.linalg.eig(np.array(self.pca_corr_results))
-        corr_eigen_value, corr_eigen_vectors = sortEigenVectors(corr_result_eigen)
+        try:
+            corr_result_eigen = np.linalg.eig(np.array(self.pca_corr_results))
+            corr_eigen_value, corr_eigen_vectors = sortEigenVectors(corr_result_eigen)
 
-        groups = []
-        for sample in self.all_sample_list:
-            groups.append(1)
+            groups = []
+            for sample in self.all_sample_list:
+                groups.append(1)
 
-        try:
             if self.do_PCA == True:
                 self.pca_works = "True"
                 self.pca_trait_ids = []