aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/trait.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/base/trait.py')
-rwxr-xr-xwqflask/base/trait.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index aea1f9a9..731f99eb 100755
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -387,6 +387,7 @@ class GeneralTrait(object):
#trait_qtl = self.cursor.fetchone()
if trait_qtl:
self.locus, self.lrs, self.pvalue, self.mean = trait_qtl
+ print("self.locus:", self.locus)
if self.locus:
query = """
select Geno.Chr, Geno.Mb from Geno, Species
@@ -395,8 +396,9 @@ class GeneralTrait(object):
Geno.SpeciesId = Species.Id
""".format(self.dataset.group.species, self.locus)
result = g.db.execute(query).fetchone()
- self.locus_chr = result[0]
- self.locus_mb = result[1]
+ if result:
+ self.locus_chr = result[0]
+ self.locus_mb = result[1]
else:
self.locus = self.locus_chr = self.locus_mb = self.lrs = self.pvalue = self.mean = ""