aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2019-03-29 16:27:29 -0500
committerzsloan2019-03-29 16:27:29 -0500
commitded2b49421cb10f668fc15a1fdd2a6efc3b2fc20 (patch)
tree676984ec3dc7f8cc4f09b5c61bdf22093b613b9b /wqflask
parenta11493b11b006cb8f49f77cba31e4d76b454a25b (diff)
downloadgenenetwork2-ded2b49421cb10f668fc15a1fdd2a6efc3b2fc20.tar.gz
Fixed issue that caused PCA results to be different in GN2 than in GN1; one result needed to be transposed
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/correlation_matrix/show_corr_matrix.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
index 1bc2fb2f..5a1f464b 100644
--- a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
+++ b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
@@ -231,13 +231,13 @@ class CorrelationMatrix(object):
self.scale = pca.rx('scale')
trait_array = zScore(self.trait_data_array)
- trait_array = trait_array
trait_array_vectors = np.dot(corr_eigen_vectors, trait_array)
pca_traits = []
for i, vector in enumerate(trait_array_vectors):
- if corr_eigen_value[i-1] < 100.0/len(self.trait_list):
- pca_traits.append((vector*-1.0).tolist())
+ #ZS: Check if below check is necessary
+ #if corr_eigen_value[i-1] > 100.0/len(self.trait_list):
+ pca_traits.append((vector*-1.0).tolist())
this_group_name = self.trait_list[0][1].group.name
temp_dataset = data_set.create_dataset(dataset_name = "Temp", dataset_type = "Temp", group_name = this_group_name)
@@ -298,7 +298,7 @@ def zScore(trait_data_array):
def sortEigenVectors(vector):
try:
eigenValues = vector[0].tolist()
- eigenVectors = vector[1].tolist()
+ eigenVectors = vector[1].T.tolist()
combines = []
i = 0
for item in eigenValues: