From e1e6adeb07536b6c4afc849e7f3a994dca3fda1d Mon Sep 17 00:00:00 2001 From: pjotrp Date: Tue, 23 Feb 2016 11:28:26 +0000 Subject: 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. --- wqflask/wqflask/correlation/show_corr_results.py | 10 +++++----- 1 file 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 -- cgit v1.2.3