diff options
author | Zachary Sloan | 2013-10-25 18:16:54 -0500 |
---|---|---|
committer | Zachary Sloan | 2013-10-25 18:16:54 -0500 |
commit | 6fc0b92ad14bfbc8c752b7730f70c6b22294f667 (patch) | |
tree | b62f6f4b667161742437ca433e62f0033132de83 /wqflask/base | |
parent | 4eb2c2244b083d6522db02dff5ddb036af496392 (diff) | |
download | genenetwork2-6fc0b92ad14bfbc8c752b7730f70c6b22294f667.tar.gz |
Began working on color coding bar chart by extra attributes
Diffstat (limited to 'wqflask/base')
-rwxr-xr-x | wqflask/base/data_set.py | 1 | ||||
-rwxr-xr-x | wqflask/base/trait.py | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index f25e7974..cd8c1ac1 100755 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -224,6 +224,7 @@ class DatasetGroup(object): """ def __init__(self, dataset): """This sets self.group and self.group_id""" + print("dataset name:", dataset.name) self.name, self.id = g.db.execute(dataset.query_for_group).fetchone() if self.name == 'BXD300': self.name = "BXD" diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index 6a64eeaf..77e451a1 100755 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -382,6 +382,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 @@ -390,8 +391,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 = "" |