diff options
author | zsloan | 2020-09-30 15:37:10 -0500 |
---|---|---|
committer | zsloan | 2020-09-30 15:37:10 -0500 |
commit | 8a01dca227aa03e794ced5f99513355f2a035f2f (patch) | |
tree | 2cd5f102a72d4dfa6ca157ff82c16c6f8e503aad | |
parent | 4bd5534658fe7ed2a9ffd50c137be81d7a7b190b (diff) | |
download | genenetwork2-8a01dca227aa03e794ced5f99513355f2a035f2f.tar.gz |
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)
-rw-r--r-- | wqflask/wqflask/correlation_matrix/show_corr_matrix.py | 2 |
1 files changed, 1 insertions, 1 deletions
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: |