diff options
author | pjotrp | 2016-02-23 11:28:26 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-04-20 09:01:09 +0000 |
commit | e1e6adeb07536b6c4afc849e7f3a994dca3fda1d (patch) | |
tree | 9c01596819199dcc752cd5f20a6b3584e38b5f13 | |
parent | 218fd0c7666583748098f0b7b4286b6d1cbf6838 (diff) | |
download | genenetwork2-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-x | wqflask/wqflask/correlation/show_corr_results.py | 10 |
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 |