From 8a01dca227aa03e794ced5f99513355f2a035f2f Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 30 Sep 2020 15:37:10 -0500 Subject: Changed the logic for adding 0 to the PCA results to do so when the shared samples are < 2 instead of 0; this fixed the error when running the correlation matrix, but results in the PCA traits having no values * wqflask/wqflask/correlation_matrx/show_corr_matrix.py - changed "if num_overlap == 0" to "if num_overlap < 2" because correlations can't be run if there are fewer than 2 shared samples (and previously would throw an error if there was exactly 1 shared sample) --- wqflask/wqflask/correlation_matrix/show_corr_matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py index 0ac94139..3beee84f 100644 --- a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py +++ b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py @@ -147,7 +147,7 @@ class CorrelationMatrix(object): if num_overlap < self.lowest_overlap: self.lowest_overlap = num_overlap - if num_overlap == 0: + if num_overlap < 2: corr_result_row.append([target_trait, 0, num_overlap]) pca_corr_result_row.append(0) else: -- cgit v1.2.3