aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpjotrp2016-02-23 11:28:26 +0000
committerPjotr Prins2016-04-20 09:01:09 +0000
commite1e6adeb07536b6c4afc849e7f3a994dca3fda1d (patch)
tree9c01596819199dcc752cd5f20a6b3584e38b5f13
parent218fd0c7666583748098f0b7b4286b6d1cbf6838 (diff)
downloadgenenetwork2-e1e6adeb07536b6c4afc849e7f3a994dca3fda1d.tar.gz
This threw an error when sample is missing in the DB.
Let sample pass without data if the sample/genotype does not exist in the database.
-rwxr-xr-xwqflask/wqflask/correlation/show_corr_results.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py
index 98596ca4..09d5ecdb 100755
--- a/wqflask/wqflask/correlation/show_corr_results.py
+++ b/wqflask/wqflask/correlation/show_corr_results.py
@@ -708,12 +708,12 @@ class CorrelationResults(object):
for sample in sample_names:
if sample not in excluded_samples:
- value = start_vars['value:' + sample]
- if value.strip().lower() == 'x':
- self.sample_data[str(sample)] = None
- else:
+ print("Looking for",sample,"in",start_vars)
+ value = start_vars.get('value:' + sample)
+ if value and not value.strip().lower() == 'x':
self.sample_data[str(sample)] = float(value)
-
+ else:
+ self.sample_data[str(sample)] = None
##XZ, 12/16/2008: the input geneid is of mouse type