aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/trait.py
diff options
context:
space:
mode:
authorBonfaceKilz2020-09-28 13:38:23 +0300
committerGitHub2020-09-28 13:38:23 +0300
commit131bfa7bf63ec7d92f5734bddcd46c50f00f85ea (patch)
treef11a3373654016bd333c77ef4bff6d0dc26eff7d /wqflask/base/trait.py
parent3ec4eb6b831eaa5adcf32a9fca8a60ea229cc1c4 (diff)
parent312835014d8d243c72f3520bb116eb3c36cd6b85 (diff)
downloadgenenetwork2-131bfa7bf63ec7d92f5734bddcd46c50f00f85ea.tar.gz
Merge pull request #446 from BonfaceKilz/Bug/Fix-casting-error
Bug/fix casting error
Diffstat (limited to 'wqflask/base/trait.py')
-rw-r--r--wqflask/base/trait.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 7666348e..bdd9c3d6 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -599,12 +599,11 @@ def retrieve_trait_info(trait, dataset, get_qtl_info=False):
trait.locus = trait.locus_chr = trait.locus_mb = trait.additive = ""
else:
trait.locus = trait.lrs = trait.additive = ""
-
- if (dataset.type == 'Publish' or dataset.type == "ProbeSet") and trait.locus_chr != "" and trait.locus_mb != "":
+ if (dataset.type == 'Publish' or dataset.type == "ProbeSet") and str(trait.locus_chr or "") != "" and str(trait.locus_mb or "") != "":
trait.LRS_location_repr = LRS_location_repr = 'Chr%s: %.6f' % (trait.locus_chr, float(trait.locus_mb))
- if trait.lrs != "":
+ if str(trait.lrs or "") != "":
trait.LRS_score_repr = LRS_score_repr = '%3.1f' % trait.lrs
else:
raise KeyError, `trait.name`+' information is not found in the database.'
- return trait \ No newline at end of file
+ return trait