aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2020-10-02 14:04:21 -0500
committerGitHub2020-10-02 14:04:21 -0500
commit497953c86e9359bc229c7e449c1ff17313dd25bb (patch)
tree08050a3761191935b5111bd97f935cd0af0d5ae7 /wqflask
parent5a91ed3bce93934a224d8fbbb7053a1980dd216c (diff)
parent832ebc46a0e7a6f7c3faef5eb36f1104a66fd626 (diff)
downloadgenenetwork2-497953c86e9359bc229c7e449c1ff17313dd25bb.tar.gz
Merge pull request #450 from zsloan/corr_matrix_error_fix
Corr matrix error fix
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/base/data_set.py34
-rw-r--r--wqflask/wqflask/correlation_matrix/show_corr_matrix.py2
2 files changed, 1 insertions, 35 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index afffe780..e0ef559c 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -1173,40 +1173,6 @@ class TempDataSet(DataSet):
self.fullname = 'Temporary Storage'
self.shortname = 'Temp'
- @staticmethod
- def handle_pca(desc):
- if 'PCA' in desc:
- # Todo: Modernize below lines
- desc = desc[desc.rindex(':')+1:].strip()
- else:
- desc = desc[:desc.index('entered')].strip()
- return desc
-
- def get_desc(self):
- query = 'SELECT description FROM Temp WHERE Name=%s' % self.name
- logger.sql(query)
- g.db.execute(query)
- desc = g.db.fetchone()[0]
- desc = self.handle_pca(desc)
- return desc
-
- def retrieve_sample_data(self, trait):
- query = """
- SELECT
- Strain.Name, TempData.value, TempData.SE, TempData.NStrain, TempData.Id
- FROM
- TempData, Temp, Strain
- WHERE
- TempData.StrainId = Strain.Id AND
- TempData.Id = Temp.DataId AND
- Temp.name = '%s'
- Order BY
- Strain.Name
- """ % escape(trait.name)
-
- logger.sql(query)
- results = g.db.execute(query).fetchall()
-
def geno_mrna_confidentiality(ob):
dataset_table = ob.type + "Freeze"
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: